• Welcome to Valhalla Legends Archive.
 

FileTime into a string

Started by CrAz3D, February 03, 2005, 09:28 PM

Previous topic - Next topic

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.

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?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

UserLoser.


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))