PDA

Click to See Complete Forum and Search --> : CopyMemory crashes VB


Zvonko
Jul 13th, 2000, 03:42 PM
Hello!

Does anyone know why CopyMemory function crashes VB?

Here's the code I use:
hLock = LockResource(hLoad)
hSize = SizeofResource(hInst, hFind)

ReDim b(0 To lsize) As Byte
CopyMemory b(0), hLock, hSize

FreeLibrary hInst

Stevie-O
Jul 14th, 2000, 08:03 PM
Because hLock is only 4 bytes in size.