So, something like this (assuming szMessage has data in it)? How would you go about padding the data? Thanks for the reply.
Stripey
LPTSTR szMessage;
PVOID pvBuffer;
int nSize;
nSize = ((strlen(szMessage) / 8) + (strlen(szMessage) % 8) ? 1 : 0) * 8;
pvBuffer = VirtualAlloc(NULL, nAmount...
I have an MFC application that allows a user to input a string of up to 400 charachters. I need to then allocate memory in a buffer to do some processing on the data (encryption). How can I ensure that the size of the buffer is divisible by 8 and still allocate the memory dynamically?
Thanks...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.