Click here to Skip to main content
15,921,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Global Variable in all the files Pin
Blake Miller13-Jan-06 7:03
Blake Miller13-Jan-06 7:03 
GeneralThanks: Unexpected end of file while looking for precompiled header directive Pin
Sarvan AL12-Jan-06 0:36
Sarvan AL12-Jan-06 0:36 
QuestionCommunication Between EXEs Pin
rider cool11-Jan-06 21:48
rider cool11-Jan-06 21:48 
AnswerRe: Communication Between EXEs Pin
PJ Arends11-Jan-06 21:58
professionalPJ Arends11-Jan-06 21:58 
QuestionCreate Font to match Dialogue Box Pin
LittleYellowBird11-Jan-06 21:17
LittleYellowBird11-Jan-06 21:17 
AnswerRe: Create Font to match Dialogue Box Pin
Owner drawn11-Jan-06 21:51
Owner drawn11-Jan-06 21:51 
GeneralRe: Create Font to match Dialogue Box Pin
LittleYellowBird12-Jan-06 4:32
LittleYellowBird12-Jan-06 4:32 
QuestionFunction as argument Pin
kk.tvm11-Jan-06 20:35
kk.tvm11-Jan-06 20:35 
AnswerRe: Function as argument Pin
Owner drawn11-Jan-06 20:44
Owner drawn11-Jan-06 20:44 
AnswerRe: Function as argument Pin
Zdeslav Vojkovic11-Jan-06 20:47
Zdeslav Vojkovic11-Jan-06 20:47 
AnswerRe: Function as argument Pin
Cedric Moonen11-Jan-06 20:48
Cedric Moonen11-Jan-06 20:48 
GeneralRe: Function as argument Pin
Zdeslav Vojkovic11-Jan-06 21:06
Zdeslav Vojkovic11-Jan-06 21:06 
GeneralRe: Function as argument Pin
Cedric Moonen11-Jan-06 21:13
Cedric Moonen11-Jan-06 21:13 
GeneralRe: Function as argument Pin
kk.tvm11-Jan-06 20:56
kk.tvm11-Jan-06 20:56 
QuestionSticky Windows? Pin
S Douglas11-Jan-06 20:25
professionalS Douglas11-Jan-06 20:25 
AnswerRe: Sticky Windows? Pin
Rage11-Jan-06 22:34
professionalRage11-Jan-06 22:34 
GeneralRe: Sticky Windows? Pin
S Douglas11-Jan-06 22:43
professionalS Douglas11-Jan-06 22:43 
QuestionDBF file usage Pin
<color>Aljechin 11-Jan-06 19:55
<color>Aljechin 11-Jan-06 19:55 
AnswerNo Pin
__yb13-Jan-06 12:15
__yb13-Jan-06 12:15 
QuestionCan a BHO do this? Pin
Chintoo72311-Jan-06 19:18
Chintoo72311-Jan-06 19:18 
AnswerRe: Can a BHO do this? Pin
__yb13-Jan-06 12:18
__yb13-Jan-06 12:18 
Questiontry/catch - getting line number Pin
Chintoo72311-Jan-06 19:09
Chintoo72311-Jan-06 19:09 
AnswerRe: try/catch - getting line number Pin
__yb13-Jan-06 12:22
__yb13-Jan-06 12:22 
AnswerRe: try/catch - getting line number Pin
Shraddhan25-Jan-06 13:09
Shraddhan25-Jan-06 13:09 
GeneralRe: try/catch - getting line number Pin
Chintoo72325-Jan-06 15:18
Chintoo72325-Jan-06 15:18 
1. Thanks for the suggestion, but I think that is not really what I want. If I know where to throw the error I know where the error is really happening. What I was looking for is line number for unexpected errors.

2. To __yb: I learnt that you can do all with C++ try/catch that you do with SEH through _set_se_translator. So if you can use SEH to get the instruction pointer that caused the error, you can obtain the same using C++ try/catch too.

3. For a suggestion to my own query, I can think of a _dirty_ way to obtain the line number in a try/catch or even with SEH. Before compiling the code write a script that will insert this statement after every line of code:
g_lineno = __LINE__;
and then in your exception filter, you can print this global variable g_lineno.

Now what I want to know from you guys is, whether this is going to be a performance hit if I implement it in production. I think _no_big_deal_ but what is your opinion?


thanks!

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.