G
Guest
I am trying to use CopyMemory to copy arrays as follows:
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal
pDst As Long, ByVal pSrc As Long, ByVal ByteLen As Integer)
dim kin(11) as Integer
dim kout(11) as Integer
kin(1)= 1 'set values for two elements to see if Kout is the same
kin(5) = 5
CopyMemory(kout(0), kin(0), 48)
It compiles and runs but all I get in Kout is "0" for all elements.
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal
pDst As Long, ByVal pSrc As Long, ByVal ByteLen As Integer)
dim kin(11) as Integer
dim kout(11) as Integer
kin(1)= 1 'set values for two elements to see if Kout is the same
kin(5) = 5
CopyMemory(kout(0), kin(0), 48)
It compiles and runs but all I get in Kout is "0" for all elements.