Valhalla Legends Forums Archive | Visual Basic Programming | FileTime into a string

AuthorMessageTime
CrAz3D
I'm tyring to basically create a packet for bnet.  I want to add a FileTime into this packet. 

What I have right now keep forcing VisualBasic to crash.
[code]
GetSystemTime ST
SystemTimetoFileTime ST, FT
'& then I call InsertFILETIME & VB crashes...

Public Function InsertFILETIME(FT As FILETIME)
    Dim lReturn As String * 8
    Call CopyMemory(lReturn, FT, Len(FT))
    Buffer = Buffer & lReturn
End Function[/code]

If I comment out the CopyMemory portion of the code all runs fine but it doesn't insert the FileTime, any suggestions?
February 4, 2005, 3:28 AM
UserLoser.
[code]
Public Sub InsertType(t As Long)
    Dim CopyBuffer As String
    Dim Size As Long
   
    Size = Len(t)
    CopyBuffer = Space(Size)
   
    Call CopyMemory(ByVal CopyBuffer, ByVal t, Size)
   
    StoreBuffer = StoreBuffer & CopyBuffer
    Size = Size + Len(t)
End Sub
[/code]

[code]
Call InsertType(VarPtr(FT))
[/code]
February 4, 2005, 4:14 AM

Search