Click here to Skip to main content
15,905,558 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how can i reach the same result in vc++? Pin
David Crow21-Oct-03 16:51
David Crow21-Oct-03 16:51 
Generalthanks Pin
Habbit21-Oct-03 16:55
Habbit21-Oct-03 16:55 
GeneralRe: how can i reach the same result in vc++? Pin
includeh1022-Oct-03 4:49
includeh1022-Oct-03 4:49 
GeneralRe: how can i reach the same result in vc++? Pin
David Crow22-Oct-03 5:10
David Crow22-Oct-03 5:10 
GeneralDisable Auto Bitmap Scroll in CScrollView Pin
Swinefeaster21-Oct-03 15:45
Swinefeaster21-Oct-03 15:45 
GeneralRe: Disable Auto Bitmap Scroll in CScrollView Pin
John R. Shaw22-Oct-03 3:53
John R. Shaw22-Oct-03 3:53 
GeneralRe: Disable Auto Bitmap Scroll in CScrollView Pin
Swinefeaster22-Oct-03 7:15
Swinefeaster22-Oct-03 7:15 
GeneralEXCEPTION_ACCESS_VIOLATION Pin
John R. Shaw21-Oct-03 15:05
John R. Shaw21-Oct-03 15:05 
Below you will find a partial copy of the trace output from the code I am currently
working on. The "|" indicate the depth (scope) of th call, "->" indicate of function call, "<-" indicates a return from the function call, and "=" at the right indicate the value returned by the call or the result of a library function call.

Note: If you have a copy of Jeffrey Richters' Book "Programming Applications of Microsoft
Winodows'" then you might have some understanding of my problem here.

According to the book this should not be causing an EXCEPTION_ACCESS_VIOLATION.
But I would like to note that if I ignore the violation then the next allocation made with new (or malloc()) causes the EXCEPTION_ACCESS_VIOLATION "Attempt to WRITE data at address 00555555" instead of "Attempt to WRITE data at address 00414141". Therefore, I tend to beleive the address may be bogus (Windows internal thing). If I allocate using GlobalAllocate() or LocalAllocate() the the assess violation occurs at the next allocation made with new.

I would also like to point out that this only occurs on the second time the high level funtion (not shown) is called.

Questions:
Has any body seen this behavior before?
Has any body any idea what could be causing this to happen.

| |->CExBitmap::CExBitmap()
| |<- CExBitmap::CExBitmap()
| | CreateCompatibleBitmap(dcDest, 220, 240) = TRUE
| |-> CDibData::CDibData()
| |<- CDibData::CDibData()
| |-> CreateDIB(pBitmap, FALSE)
| | |-> CreateBitmapInfo(pBitmap, 0012EFFC)
| | |<- CreateBitmapInfo() = 020F0198
| | | new BYTE[53864] : EXCEPTION_ACCESS_VIOLATION
| | | ExceptionCode = 0xC0000005
| | | ExceptionFlags = 0x00000000
| | | ExceptionAddress = 0x77F596CF
| | | NumberParameters = 0x00000002
| | | ExceptionInformation[0] = 0x00000001
| | | ExceptionInformation[1] = 0x00414141
| | | Attempt to WRITE data at address 00414141
| | | BaseAddress = 00414000
| | | AllocationBase = 00400000
| | | AllocationProtect = PAGE_EXECUTE_WRITECOPY
First-chance exception in SPaint.exe (NTDLL.DLL): 0xC0000005: Access Violation.
First-chance exception in SPaint.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
| | | "There is nothing you can do to this region to raise an
| | | access violation. Attempt to write to memory in this
| | | page cause the system to give the process its own
| | | private copy of the page (backed by the paging file)."
| | | RegionSize = 188416
| | | State = MEM_COMMIT
| | | Protect = 32
| | | Type = MEM_IMAGE


INTP
GeneralOpenGL in SDI/MDI tutorial Pin
ferryc@cbn.net.id21-Oct-03 14:37
ferryc@cbn.net.id21-Oct-03 14:37 
GeneralRe: OpenGL in SDI/MDI tutorial Pin
Snyp21-Oct-03 14:48
Snyp21-Oct-03 14:48 
GeneralRe: OpenGL in SDI/MDI tutorial Pin
Snyp21-Oct-03 14:53
Snyp21-Oct-03 14:53 
GeneralHelp in console c++ Pin
Snyp21-Oct-03 13:39
Snyp21-Oct-03 13:39 
GeneralRe: Help in console c++ Pin
Christian Graus21-Oct-03 13:49
protectorChristian Graus21-Oct-03 13:49 
GeneralRe: Help in console c++ Pin
Snyp21-Oct-03 13:51
Snyp21-Oct-03 13:51 
GeneralRe: Help in console c++ Pin
Christian Graus21-Oct-03 13:52
protectorChristian Graus21-Oct-03 13:52 
GeneralRe: Help in console c++ Pin
Snyp21-Oct-03 14:17
Snyp21-Oct-03 14:17 
GeneralRe: Help in console c++ Pin
Christian Graus21-Oct-03 14:18
protectorChristian Graus21-Oct-03 14:18 
GeneralRe: Help in console c++ Pin
Snyp21-Oct-03 14:21
Snyp21-Oct-03 14:21 
GeneralRe: Help in console c++ Pin
Christian Graus21-Oct-03 14:25
protectorChristian Graus21-Oct-03 14:25 
GeneralRe: Help in console c++ Pin
Snyp21-Oct-03 14:46
Snyp21-Oct-03 14:46 
GeneralRe: Help in console c++ Pin
joshfl23-Oct-03 10:02
joshfl23-Oct-03 10:02 
QuestionWhy wont this compile? Pin
adonisv21-Oct-03 11:32
adonisv21-Oct-03 11:32 
AnswerRe: Why wont this compile? Pin
Kentamanos21-Oct-03 11:51
Kentamanos21-Oct-03 11:51 
GeneralRe: Why wont this compile? Pin
Joel Matthias21-Oct-03 12:06
Joel Matthias21-Oct-03 12:06 
GeneralRe: Why wont this compile? Pin
Terry O'Nolley21-Oct-03 13:40
Terry O'Nolley21-Oct-03 13:40 

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.