-
Heres the deal. I have a variable which contains a memory address of a variably sized (but known size) array. The array is not named or anything.
Is it possibly to use just the address and get the array into an array of my making, so as i can get the info i require?
For example...
i have an memory location X, and a byte array,
byteArray(0-numOfBytes)
representation of memory:
blah|blah|Blah|XXXX|XXXX|XXXX|XXXX|XXXX|Blah|Blah|Blah
.....................^
I have this memory location. Each group is a byte. I want to put from the first location to numOfBytes, into a byte array.
I haven't looked too deeply into CopyMemory, although i have heard it should be able to do it.
Any ideas?
BW :cool:
PS Yeah i know this is the same as my last question but i think i have explained it better this time and might have better luck. :D:D:D:D:D
-
Anyone?
Will i be plagued with this dilemma till the end of time??
Can anyone help??
Tune in next week for another exciting episode...
:D
-
CopyMemory will work, but you need to 'own' the source and the destination.
-
Code:
CopyMemory ByVal X, byteArray(0), numOfBytes + 1
you might not need the + 1 part, you declared your array (0 To numOfBytes) (use To instead of -) this means your array has numOfBytes + 1 members, but numOfBytes would suggest the variable represented the number of bytes you have to copy, use the number of bytes you need to copy for the last parameter.
-
Cheers Robin
If only i had read that last night. Thanks heaps, will try that later.