Home > Net >  Windows XP - VirtualAlloc() how to (where is memoryapi.h???)
Windows XP - VirtualAlloc() how to (where is memoryapi.h???)

Time:12-07

I need to use VirtualAlloc() on a C code application in order to run a piece of assembly code using memory pointer. I'm trying to build the code on Windows XP 32 bit for a testing purpose but I can't find a way to use VirtualAlloc().

I installed the last available Visual C Redistributable package using the suggestion of Microsoft from here: https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170

Any tip? Thank you

CodePudding user response:

When I coded for Windows XP, VirtualAlloc was found in windows.h. If you can't locate it, copy/paste the declaration.

LPVOID WINAPI VirtualAlloc(LPVOID lpaddress, SIZE_T size, DWORD flAllocationType, DWORD flProtect);
  • Related