View Single Post
  #5  
Old 01-19-2006, 06:56
adaptor adaptor is offline
Friend
 
Join Date: Jan 2006
Posts: 27
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 0 Times in 0 Posts
adaptor Reputation: 0
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)
Reply With Quote