gregghoush
Jul 6th, 2001, 09:29 AM
using the CopyMemory api (rtlmovememory) is there a way to Not pass the length, and have it just take all of the bytes that belong to the Source pointer?
Kaverin
Jul 6th, 2001, 09:13 PM
I don't believe there is. I assume that's why length is a parameter :). But I could be wrong. I don't know if the system has a way to determine how much data is at a particular location or not.
Yonatan
Jul 7th, 2001, 03:41 AM
You can't do that... A pointer just says where in the memory your data is. It's just like a page number in a book. If you tell someone to copy pages from a (really really long) book, starting at page 7, they wouldn't know where to stop. :rolleyes: However, if you tell them to copy 3 pages from a (really really long) book, starting at page 7, they would copy pages 7, 8 and 9.
Similarly, if you tell Windows to copy data from memory position X, it wouldn't know where to stop, but if you tell Windows to copy N bytes from memory position X, it would copy all the bytes from X to (X+N-1).