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

C / C++ / MFC

 
AnswerNah, ... Pin
CPallini22-Jun-10 23:15
mveCPallini22-Jun-10 23:15 
GeneralRe: Nah, ... Pin
Emilio Garavaglia23-Jun-10 1:40
Emilio Garavaglia23-Jun-10 1:40 
GeneralRe: Nah, ... Pin
CPallini23-Jun-10 3:22
mveCPallini23-Jun-10 3:22 
GeneralRe: Nah, ... Pin
David Crow23-Jun-10 3:55
David Crow23-Jun-10 3:55 
AnswerRe: Is time for QT? Pin
Saurabh.Garg22-Jun-10 23:18
Saurabh.Garg22-Jun-10 23:18 
AnswerRe: Is time for QT? Pin
Jackson201023-Jun-10 1:18
Jackson201023-Jun-10 1:18 
GeneralRe: Is time for QT? Pin
Stephen Hewitt27-Jun-10 19:03
Stephen Hewitt27-Jun-10 19:03 
QuestionGetting stack address Pin
Hans Dietrich22-Jun-10 21:23
mentorHans Dietrich22-Jun-10 21:23 
I'm currently updating my XCrashReport article, and I had forgotten that I have some assembler in it:

__asm
{
    // Load the top (highest address) of the stack from the
    // thread information block.
    mov    eax, fs:[4]
    mov pStackTop, eax
}


The purpose of this is to get the top of the stack, so I can do a stack dump. Unfortunately, I need to replace it, since VS doesn't allow asm code when compiling for x64.

I have found this code, which works ok in x86:

NT_TIB *pTib = (NT_TIB *)NtCurrentTeb();
PVOID pStackTop = pTib->StackBase;


I am just wondering if this will work on x64 as well (haven't had a chance to try it yet).

Anyone have any experience with this technique?
Best wishes,
Hans


[Hans Dietrich Software]

AnswerRe: Getting stack address Pin
«_Superman_»22-Jun-10 21:41
professional«_Superman_»22-Jun-10 21:41 
GeneralRe: Getting stack address Pin
Hans Dietrich22-Jun-10 22:31
mentorHans Dietrich22-Jun-10 22:31 
GeneralRe: Getting stack address Pin
«_Superman_»22-Jun-10 23:01
professional«_Superman_»22-Jun-10 23:01 
AnswerRe: Getting stack address Pin
MrWhiteboard23-Jun-10 5:50
MrWhiteboard23-Jun-10 5:50 
Questionenable uac by vc++ Pin
aangerma22-Jun-10 20:45
aangerma22-Jun-10 20:45 
AnswerRe: enable uac by vc++ Pin
«_Superman_»22-Jun-10 21:19
professional«_Superman_»22-Jun-10 21:19 
GeneralRe: enable uac by vc++ Pin
aangerma22-Jun-10 21:28
aangerma22-Jun-10 21:28 
GeneralRe: enable uac by vc++ Pin
«_Superman_»22-Jun-10 21:45
professional«_Superman_»22-Jun-10 21:45 
GeneralRe: enable uac by vc++ Pin
aangerma22-Jun-10 22:49
aangerma22-Jun-10 22:49 
QuestionHow to create a project template in Visual Studio 2008 for MFC... Pin
DevelopmentNoob22-Jun-10 20:13
DevelopmentNoob22-Jun-10 20:13 
AnswerRe: How to create a project template in Visual Studio 2008 for MFC... Pin
Richard MacCutchan22-Jun-10 21:23
mveRichard MacCutchan22-Jun-10 21:23 
AnswerRe: How to create a project template in Visual Studio 2008 for MFC... Pin
Aescleal22-Jun-10 22:07
Aescleal22-Jun-10 22:07 
GeneralRe: How to create a project template in Visual Studio 2008 for MFC... Pin
DevelopmentNoob23-Jun-10 16:50
DevelopmentNoob23-Jun-10 16:50 
Questioncontrolling multiple views Pin
Sakhalean22-Jun-10 19:53
Sakhalean22-Jun-10 19:53 
AnswerRe: controlling multiple views Pin
Cedric Moonen22-Jun-10 20:11
Cedric Moonen22-Jun-10 20:11 
GeneralRe: controlling multiple views Pin
Sakhalean22-Jun-10 20:20
Sakhalean22-Jun-10 20:20 
GeneralRe: controlling multiple views Pin
«_Superman_»22-Jun-10 20:29
professional«_Superman_»22-Jun-10 20:29 

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.