Click here to Skip to main content
15,917,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
David Crow13-Jul-05 5:43
David Crow13-Jul-05 5:43 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Bob Stanneveld13-Jul-05 20:27
Bob Stanneveld13-Jul-05 20:27 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Trollslayer12-Jul-05 21:58
mentorTrollslayer12-Jul-05 21:58 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7712-Jul-05 23:09
firebolt7712-Jul-05 23:09 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
khan++12-Jul-05 23:11
khan++12-Jul-05 23:11 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Stlan12-Jul-05 23:26
Stlan12-Jul-05 23:26 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7713-Jul-05 3:53
firebolt7713-Jul-05 3:53 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Stlan13-Jul-05 3:59
Stlan13-Jul-05 3:59 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
David Crow13-Jul-05 5:45
David Crow13-Jul-05 5:45 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
David Crow13-Jul-05 3:18
David Crow13-Jul-05 3:18 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Joe Woodbury13-Jul-05 8:10
professionalJoe Woodbury13-Jul-05 8:10 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7713-Jul-05 16:27
firebolt7713-Jul-05 16:27 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Joe Woodbury13-Jul-05 17:44
professionalJoe Woodbury13-Jul-05 17:44 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7714-Jul-05 0:21
firebolt7714-Jul-05 0:21 
QuestionDatabase existense in SQL Server ? Pin
Babarsaeed12-Jul-05 19:11
Babarsaeed12-Jul-05 19:11 
AnswerRe: Database existense in SQL Server ? Pin
Christian Graus12-Jul-05 19:51
protectorChristian Graus12-Jul-05 19:51 
AnswerRe: Database existense in SQL Server ? Pin
basementman13-Jul-05 5:00
basementman13-Jul-05 5:00 
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:

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.