Click here to Skip to main content
15,887,476 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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!
GeneralRe: try/catch - getting line number Pin
Shraddhan25-Jan-06 15:38
Shraddhan25-Jan-06 15:38 
QuestionVisual C++ Shortcut Keys Pin
romuzu11-Jan-06 18:59
romuzu11-Jan-06 18:59 
AnswerRe: Visual C++ Shortcut Keys Pin
Owner drawn11-Jan-06 19:08
Owner drawn11-Jan-06 19:08 
Questionhow to capture the DocumentBeforePrint Event in my ActiveX of Word written in VC? Pin
sharkmouse11-Jan-06 18:43
sharkmouse11-Jan-06 18:43 
QuestionTrouble in MFC CFont Pin
LaHaHa11-Jan-06 18:32
LaHaHa11-Jan-06 18:32 
AnswerRe: Trouble in MFC CFont Pin
Owner drawn11-Jan-06 18:40
Owner drawn11-Jan-06 18:40 
GeneralRe: Trouble in MFC CFont Pin
LaHaHa11-Jan-06 21:18
LaHaHa11-Jan-06 21:18 
GeneralRe: Trouble in MFC CFont Pin
Owner drawn11-Jan-06 21:24
Owner drawn11-Jan-06 21:24 
GeneralRe: Trouble in MFC CFont Pin
LaHaHa11-Jan-06 21:46
LaHaHa11-Jan-06 21:46 
QuestionGUI Pin
Aqueel11-Jan-06 17:54
Aqueel11-Jan-06 17:54 
AnswerRe: GUI Pin
Christian Graus11-Jan-06 18:08
protectorChristian Graus11-Jan-06 18:08 
AnswerRe: GUI Pin
Owner drawn11-Jan-06 18:12
Owner drawn11-Jan-06 18:12 
GeneralRe: GUI Pin
Rajesh R Subramanian11-Jan-06 19:24
professionalRajesh R Subramanian11-Jan-06 19:24 
AnswerRe: GUI Pin
ThatsAlok12-Jan-06 1:11
ThatsAlok12-Jan-06 1:11 
QuestionHow to modify the Edit control's(CEdit) context menu? Pin
Owner drawn11-Jan-06 17:33
Owner drawn11-Jan-06 17:33 
AnswerRe: How to modify the Edit control's(CEdit) context menu? Pin
Ryan Binns11-Jan-06 19:20
Ryan Binns11-Jan-06 19:20 
QuestionC++ Win32 Common Controls Pin
Gamer-Owned11-Jan-06 17:26
Gamer-Owned11-Jan-06 17:26 

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.