|
Correct way to do what you need:
VirtualAlloc(0x00830000, 0x4000, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE)
The second example works fine because: "If the value of the lpAddress parameter is NULL, specifying MEM_COMMIT without MEM_RESERVE causes the function to BOTH reserve and commit the memory". (MSDN)
|