G
Guest
Hi,
in my code I have the following declaration:
void *buffer1;
void *buffer2;
Now, buffer1 is allocated (not shown), and its address is copied into
buffer2, like that:
buffer2 = buffer1;
After that, multiple bunches of memory are copied to buffer1, which is
incremented every time:
//here goes the copying...
(PBYTE)buffer1 = (PBYTE)buffer1 + lengthjustcopied;
Now, what I wanted to do is getting the number of all bytes that where
copied to buffer1, so I tried the following:
totalsize = (UINT)((PBYTE)userBuffer - (PBYTE)secBuffer);
This does not seem to work.... can anyone tell me what got wrong here and
how it is done correctly?
Thanks a lot
Sam Johnson
in my code I have the following declaration:
void *buffer1;
void *buffer2;
Now, buffer1 is allocated (not shown), and its address is copied into
buffer2, like that:
buffer2 = buffer1;
After that, multiple bunches of memory are copied to buffer1, which is
incremented every time:
//here goes the copying...
(PBYTE)buffer1 = (PBYTE)buffer1 + lengthjustcopied;
Now, what I wanted to do is getting the number of all bytes that where
copied to buffer1, so I tried the following:
totalsize = (UINT)((PBYTE)userBuffer - (PBYTE)secBuffer);
This does not seem to work.... can anyone tell me what got wrong here and
how it is done correctly?
Thanks a lot
Sam Johnson