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.
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
If I comment out the CopyMemory portion of the code all runs fine but it doesn't insert the FileTime, any suggestions?
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
Call InsertType(VarPtr(FT))