Thanks for checking thigns out.
I'm pretty sure VB Long is 4 bytes, Double is 8 bytes.
I have tried this
Call code:Code:Public Type HASHINFO pHash As String szPassword As String nPasswordLen As Long szSalt As String nSaltLen As Long szName As String nNameLen As Long dwFlags As Long End Type Public Declare Function GetHash Lib "C:\md5\md5.dll" (ByRef xx As HASHINFO) As Long
I'm not sure if I need to specify something for udt.pHash, have tried various things and it still crashes.Code:Private Sub Command1_Click() Dim test as long Dim udt As HASHINFO udt.szPassword = "test" udt.nPasswordLen = 4 udt.szSalt = "test" udt.nSaltLen = 4 udt.szName = "test" udt.nNameLen = 4 udt.dwFlags = &H0 test = GetHash(udt) End Sub




Reply With Quote