Click here to Skip to main content
15,895,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalstatic global variables problem Pin
VV114412-Jul-05 19:07
VV114412-Jul-05 19:07 
GeneralRe: static global variables problem Pin
Christian Graus12-Jul-05 19:47
protectorChristian Graus12-Jul-05 19:47 
GeneralRe: static global variables problem Pin
Bob Stanneveld12-Jul-05 21:04
Bob Stanneveld12-Jul-05 21:04 
GeneralRe: static global variables problem Pin
VV114413-Jul-05 7:06
VV114413-Jul-05 7:06 
GeneralRe: static global variables problem Pin
Bob Stanneveld13-Jul-05 20:28
Bob Stanneveld13-Jul-05 20:28 
GeneralXP-Style menu in win32 Pin
Anonymous12-Jul-05 18:36
Anonymous12-Jul-05 18:36 
GeneralRe: XP-Style menu in win32 Pin
Graham Bradshaw12-Jul-05 22:03
Graham Bradshaw12-Jul-05 22:03 
GeneralVirtualAlloc at specific address Pin
Blake V. Miller12-Jul-05 18:10
Blake V. Miller12-Jul-05 18:10 
I can't seem to get anything but ERROR_INVALID_ADDRESS when I want to allocate memory at a specific address.

I use this Win32 API function:

LPVOID VirtualAlloc(<br />
  LPVOID lpAddress,<br />
  SIZE_T dwSize,<br />
  DWORD flAllocationType,<br />
  DWORD flProtect<br />
);



I have used VirtualQueryEx to verify that the memory region is in the MEM_FREE state prior to attempting to VirtualAlloc memory from a MEM_FREE region.

I also set the argument flAllocationType to MEM_RESERVE and flProtect to PAGE_NOACCESS.

The minute I put NULL in for lpAddress it works fine.

I have tried rounding the address up to the next SYSTEM_INFO.dwPageSize and also tried rounding it up to the next SYSTEM_INFO.dwAllocationGranularity and appropriately adjusting (decreasing) the MEMORY_BASIC_INFORMATION.RegionSize which is used for the dwSize parameter.

Does anyone know what is the problem D'Oh! | :doh:
GeneralRe: VirtualAlloc at specific address Pin
Toby Opferman12-Jul-05 19:56
Toby Opferman12-Jul-05 19:56 
GeneralRe: VirtualAlloc at specific address Pin
Blake Miller13-Jul-05 8:06
Blake Miller13-Jul-05 8:06 
GeneralTLS in a static library Pin
Chintoo72312-Jul-05 18:06
Chintoo72312-Jul-05 18:06 
GeneralRe: TLS in a static library Pin
Chintoo72312-Jul-05 18:15
Chintoo72312-Jul-05 18:15 
GeneralRe: TLS in a static library Pin
Magnus Westin13-Jul-05 2:32
Magnus Westin13-Jul-05 2:32 
GeneralBitmap in headcontrol does not work fine in Windows XP style Pin
lisoft12-Jul-05 16:26
lisoft12-Jul-05 16:26 
Generaltaskbar problem Pin
da^hype12-Jul-05 15:33
da^hype12-Jul-05 15:33 
GeneralRe: How to Insert a number into the Oracle Pin
Christian Graus12-Jul-05 17:33
protectorChristian Graus12-Jul-05 17:33 
Generalgetting yesterday's date Pin
Camron12-Jul-05 9:50
Camron12-Jul-05 9:50 
GeneralRe: getting yesterday's date Pin
Jose Lamas Rios12-Jul-05 10:01
Jose Lamas Rios12-Jul-05 10:01 
GeneralRe: getting yesterday's date Pin
David Crow12-Jul-05 10:09
David Crow12-Jul-05 10:09 
GeneralRe: getting yesterday's date Pin
#realJSOP12-Jul-05 10:13
mve#realJSOP12-Jul-05 10:13 
Generalactivex selft rejistrations Pin
_tasleem12-Jul-05 8:35
_tasleem12-Jul-05 8:35 
GeneralRe: activex selft rejistrations Pin
Aamir Butt12-Jul-05 20:54
Aamir Butt12-Jul-05 20:54 
GeneralRe: activex selft rejistrations Pin
_tasleem13-Jul-05 7:42
_tasleem13-Jul-05 7:42 
GeneralRe: activex selft rejistrations Pin
Aamir Butt13-Jul-05 18:57
Aamir Butt13-Jul-05 18:57 
GeneralRe: activex selft rejistrations Pin
Usman Tasleem Akshaf13-Jul-05 20:22
Usman Tasleem Akshaf13-Jul-05 20:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.