Click here to Skip to main content
15,892,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Log file structures Pin
Mark Salsbery11-Feb-07 10:28
Mark Salsbery11-Feb-07 10:28 
GeneralRe: Log file structures Pin
Waldermort11-Feb-07 20:40
Waldermort11-Feb-07 20:40 
GeneralRe: Log file structures Pin
kakan12-Feb-07 1:17
professionalkakan12-Feb-07 1:17 
GeneralRe: Log file structures Pin
Waldermort12-Feb-07 2:00
Waldermort12-Feb-07 2:00 
GeneralRe: Log file structures Pin
kakan12-Feb-07 2:04
professionalkakan12-Feb-07 2:04 
QuestionCreateFileMapping/MapViewOfFile and 0xC0000005 (ACCESS_DENIED) Pin
Jeffrey Walton11-Feb-07 3:59
Jeffrey Walton11-Feb-07 3:59 
AnswerRe: CreateFileMapping/MapViewOfFile and 0xC0000005 (ACCESS_DENIED) Pin
Waldermort11-Feb-07 4:06
Waldermort11-Feb-07 4:06 
GeneralRe: CreateFileMapping/MapViewOfFile and 0xC0000005 (ACCESS_DENIED) Pin
Jeffrey Walton11-Feb-07 10:06
Jeffrey Walton11-Feb-07 10:06 
Hi Waldermort,

WalderMort wrote:
Where exactly are you picking up the error...

From the Output Window in Visual Studio .NET on Windows 2000.

I also confirmed it was a bug Windows XP, and Windows Server 2003. And confirmed the behavior using Visual Studio 2005. The bad thing was, it was my bug...

Basically, when inspecting ones own .CODE section, one of two methods is used:

1) if the image is a disk image, use (.TEXT Section)pSectionHeader-> PointerToRawData to locate the first .CODE page on DISK.

2) if the image is a memory image, use (.TEXT Section)pSectionHeader-> VirtualAddress to locate the first .CODE page in MEMORY.

PointerToRawData is usually 0x1000. VirtualAddress is larger - for example 0x3D00. The previous is added to a image Base Address - 0x400000 (hModule), PVOID from MapViewOfFile(), etc. Under certain circumstances (Debug Builds with large LIB files that cause a cross of Granulation Boundary), an ACCEESS_DENIED occurs - more correctly Access Violation.

With Debug builds, VirtualAddress != PointerToRawData. In Release builds, VirtualAddress == PointerToRawData. Hence the reason why Debug failed, and Release was successful.

My error crept in with the fact that VirtualAddress >>> PointerToRawData, and I was using VirtualAddress when probing the disk image in Debug.

What was especially frustrating was the fact that I wasted time in WinDbg on my spare Server (it only has 700 MHz CPU and 768MB of RAM) - painful. My development machine has dual 1GHz with 2GB of RAM. This is my personal Test lab at the house - complete with a pair of Cisco 1700s for segment testing Smile | :)

Jeff
GeneralRe: CreateFileMapping/MapViewOfFile and 0xC0000005 (ACCESS_DENIED) Pin
Jeffrey Walton11-Feb-07 10:13
Jeffrey Walton11-Feb-07 10:13 
GeneralRe: CreateFileMapping/MapViewOfFile and 0xC0000005 (ACCESS_DENIED) Pin
Waldermort11-Feb-07 20:27
Waldermort11-Feb-07 20:27 
AnswerRe: CreateFileMapping/MapViewOfFile and 0xC0000005 (ACCESS_DENIED) Pin
Jeffrey Walton11-Feb-07 10:09
Jeffrey Walton11-Feb-07 10:09 
GeneralRe: CreateFileMapping/MapViewOfFile and 0xC0000005 (ACCESS_DENIED) Pin
Mark Salsbery11-Feb-07 10:41
Mark Salsbery11-Feb-07 10:41 
QuestionWeb service in the MFC, who can answer??????? Pin
Tarek Jabri11-Feb-07 2:39
Tarek Jabri11-Feb-07 2:39 
AnswerRe: Web service in the MFC, who can answer??????? Pin
Christian Graus11-Feb-07 11:43
protectorChristian Graus11-Feb-07 11:43 
QuestionXML Packet Pin
Member 292037811-Feb-07 2:37
Member 292037811-Feb-07 2:37 
AnswerRe: XML Packet Pin
Hamid_RT12-Feb-07 6:46
Hamid_RT12-Feb-07 6:46 
QuestionUML drawings of class diagrams for a general dialog based GUI application Pin
dtraj110-Feb-07 21:20
dtraj110-Feb-07 21:20 
QuestionPlease Clarify. Pin
ashwath197910-Feb-07 19:45
ashwath197910-Feb-07 19:45 
AnswerRe: Please Clarify. Pin
Hamid_RT10-Feb-07 20:51
Hamid_RT10-Feb-07 20:51 
AnswerRe: Please Clarify. Pin
Sauce!10-Feb-07 23:21
Sauce!10-Feb-07 23:21 
QuestionRe: Please Clarify. Pin
David Crow12-Feb-07 3:00
David Crow12-Feb-07 3:00 
QuestionVisual Studio 2005 application deployment Pin
bigdenny20010-Feb-07 14:28
bigdenny20010-Feb-07 14:28 
AnswerRe: Visual Studio 2005 application deployment Pin
Christian Graus10-Feb-07 14:49
protectorChristian Graus10-Feb-07 14:49 
AnswerRe: Visual Studio 2005 application deployment Pin
PJ Arends10-Feb-07 14:51
professionalPJ Arends10-Feb-07 14:51 
AnswerRe: Visual Studio 2005 application deployment Pin
bigdenny20011-Feb-07 0:00
bigdenny20011-Feb-07 0:00 

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.