Click here to Skip to main content
16,018,904 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to create a dynamic array? Pin
Hamid Taebi30-Jan-08 22:24
professionalHamid Taebi30-Jan-08 22:24 
GeneralRe: how to create a dynamic array? Pin
gentleguy30-Jan-08 22:52
gentleguy30-Jan-08 22:52 
GeneralRe: how to create a dynamic array? Pin
Hamid Taebi31-Jan-08 6:29
professionalHamid Taebi31-Jan-08 6:29 
GeneralProblem registring Microsoft Text Service Pin
tal111130-Jan-08 12:00
tal111130-Jan-08 12:00 
GeneralRe: Problem registring Microsoft Text Service Pin
Mark Salsbery30-Jan-08 12:49
Mark Salsbery30-Jan-08 12:49 
GeneralCPropertysheet and tab ctrol Pin
misha_grewal30-Jan-08 7:48
misha_grewal30-Jan-08 7:48 
GeneralRe: CPropertysheet and tab ctrol Pin
Mark Salsbery30-Jan-08 11:34
Mark Salsbery30-Jan-08 11:34 
GeneralError in calling StackWalk64 [modified] Pin
manustone30-Jan-08 7:12
manustone30-Jan-08 7:12 
Hi all
I am using debuggin API for my purposes.
After I have initialized everything correctly each time I use StackWalk64 function it doesn't work.
Evenet if it returns TRUE I can see on the debug output

First-chance exception at 0x00000000 in TestMyStackTraceDebugger.exe: 0xC0000005: Access violation reading location 0x00000000.

I notice that the CONTEXT returned is almost all set to 0 and data returned in STACKFRAME sturcture are all 0.

What is wrong?
Each of the following (in order) was successful returning TRUE

-CreateProcess //with Debug permission
-WaitForDebugEvent
-OpenThread

CONTEXT ctx;
memset( &ctx, 0, sizeof( CONTEXT ) ); //init struct!
HANDLE threadHandle = OpenThread( THREAD_GET_CONTEXT , FALSE, de.dwThreadId );
GetThreadContext( threadHandle , &ctx );
-GetThreadContext
-SymSetOptions
-SymInitialize

STACKFRAME64 sf;
memset( &sf, 0, sizeof(STACKFRAME64));
sf.AddrPC.Offset = ctx.Eip;
sf.AddrPC.Mode = AddrModeFlat;
sf.AddrStack.Offset = ctx.Esp;
sf.AddrStack.Mode = AddrModeFlat;
sf.AddrFrame.Offset = ctx.Ebp;
sf.AddrFrame.Mode = AddrModeFlat;
#endif

StackWalk64(
IMAGE_FILE_MACHINE_I386,
gamerProcess,
threadHandle,
&sf,
&ctx,
NULL,
SymFunctionTableAccess64,
SymGetModuleBase64,
NULL );
Kind Regards
ManuStone

<div class="ForumMod">modified on Wednesday, January 30, 2008 1:18:34 PM</div>
GeneralRe: Error in calling StackWalk64 Pin
Cedric Moonen30-Jan-08 7:35
Cedric Moonen30-Jan-08 7:35 
QuestionRe: Error in calling StackWalk64 Pin
CPallini30-Jan-08 9:42
mveCPallini30-Jan-08 9:42 
GeneralHide and Show Dialog... Pin
Manjunath S30-Jan-08 6:37
Manjunath S30-Jan-08 6:37 
GeneralRe: Hide and Show Dialog... Pin
Rajesh R Subramanian30-Jan-08 6:46
professionalRajesh R Subramanian30-Jan-08 6:46 
GeneralRe: Hide and Show Dialog... Pin
Manjunath S30-Jan-08 6:49
Manjunath S30-Jan-08 6:49 
QuestionRe: Hide and Show Dialog... Pin
Rajesh R Subramanian30-Jan-08 6:56
professionalRajesh R Subramanian30-Jan-08 6:56 
GeneralRe: Hide and Show Dialog... Pin
Maximilien30-Jan-08 7:47
Maximilien30-Jan-08 7:47 
GeneralQuestion for Michael A. Barnhart 's CXML class users Pin
doctorpi30-Jan-08 6:29
doctorpi30-Jan-08 6:29 
GeneralRe: Question for Michael A. Barnhart 's CXML class users Pin
doctorpi31-Jan-08 2:57
doctorpi31-Jan-08 2:57 
GeneralMESSAGE MAP Optimization Pin
followait30-Jan-08 5:03
followait30-Jan-08 5:03 
QuestionRe: MESSAGE MAP Optimization Pin
CPallini30-Jan-08 5:09
mveCPallini30-Jan-08 5:09 
QuestionRe: MESSAGE MAP Optimization Pin
Mark Salsbery30-Jan-08 5:51
Mark Salsbery30-Jan-08 5:51 
GeneralRe: MESSAGE MAP Optimization Pin
CPallini30-Jan-08 6:00
mveCPallini30-Jan-08 6:00 
GeneralRe: MESSAGE MAP Optimization Pin
David Crow30-Jan-08 6:23
David Crow30-Jan-08 6:23 
GeneralRe: MESSAGE MAP Optimization Pin
led mike30-Jan-08 6:36
led mike30-Jan-08 6:36 
GeneralRe: MESSAGE MAP Optimization Pin
Mark Salsbery30-Jan-08 6:40
Mark Salsbery30-Jan-08 6:40 
GeneralRe: MESSAGE MAP Optimization Pin
Rajesh R Subramanian30-Jan-08 6:43
professionalRajesh R Subramanian30-Jan-08 6:43 

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.