Click here to Skip to main content
15,893,381 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to send a shortcut from a program to the desktop Pin
KellyR13-Jan-06 14:51
KellyR13-Jan-06 14:51 
QuestionAccessing MFC classes in VB Pin
mohanrajh13-Jan-06 14:14
mohanrajh13-Jan-06 14:14 
AnswerRe: Accessing MFC classes in VB Pin
includeh1013-Jan-06 18:02
includeh1013-Jan-06 18:02 
GeneralRe: Accessing MFC classes in VB Pin
mohanrajh14-Jan-06 0:13
mohanrajh14-Jan-06 0:13 
QuestionVS2005 Dialog Editor -> Add Variable - Control Id field is blank Pin
Yak7713-Jan-06 12:47
Yak7713-Jan-06 12:47 
QuestionQuestion when writing an Assert function Pin
Nacho Chip13-Jan-06 12:30
Nacho Chip13-Jan-06 12:30 
AnswerRe: Question when writing an Assert function Pin
Stephen Hewitt13-Jan-06 18:58
Stephen Hewitt13-Jan-06 18:58 
AnswerRe: Question when writing an Assert function Pin
Gary R. Wheeler15-Jan-06 5:24
Gary R. Wheeler15-Jan-06 5:24 
1: The __FILE__ macro.

2: The __LINE__ macro.

3: The __FUNCTION__ macro.

4: This requires that you be able to manipulate the symbolic debugging information for the program in question. Essentially, you have to be able to do the same things as a debugger. This is not trivial, and requires detailed specifications of the debugging symbols, which isn't always available.

5. Yes. Generally, in C, on entry to any given function the top-most item on the stack is the return address. Just above the return address are any function arguments. Since you are now inside your assert function, and you (I would assume) know the arguments, you can 'back up' the stack pointer to reach the stack contents at which your assert function was called.

The question remains, why are you implementing your own assert function?

assert is provided for you.


Software Zen: delete this;
GeneralRe: Question when writing an Assert function Pin
Harold Bamford16-Jan-06 11:52
Harold Bamford16-Jan-06 11:52 
GeneralRe: Question when writing an Assert function Pin
Gary R. Wheeler17-Jan-06 16:13
Gary R. Wheeler17-Jan-06 16:13 
GeneralRe: Question when writing an Assert function Pin
Harold Bamford19-Jan-06 4:40
Harold Bamford19-Jan-06 4:40 
QuestionLAN API Pin
Allad13-Jan-06 11:52
Allad13-Jan-06 11:52 
AnswerRe: LAN API Pin
zubair_ahmed13-Jan-06 19:46
zubair_ahmed13-Jan-06 19:46 
GeneralRe: LAN API Pin
ThatsAlok15-Jan-06 19:12
ThatsAlok15-Jan-06 19:12 
AnswerRe: LAN API Pin
ThatsAlok15-Jan-06 19:10
ThatsAlok15-Jan-06 19:10 
QuestionHow to call CView::OnUpdate Pin
elephantstar13-Jan-06 8:10
elephantstar13-Jan-06 8:10 
AnswerRe: How to call CView::OnUpdate Pin
John M. Drescher13-Jan-06 11:30
John M. Drescher13-Jan-06 11:30 
AnswerRe: How to call CView::OnUpdate Pin
FarPointer13-Jan-06 23:51
FarPointer13-Jan-06 23:51 
QuestionCComboBox GetItemDataPtr ( problem found ) Pin
Maximilien13-Jan-06 5:35
Maximilien13-Jan-06 5:35 
QuestionCOleVariant Empty bstrval Pin
TWS_Dave13-Jan-06 5:34
TWS_Dave13-Jan-06 5:34 
AnswerRe: COleVariant Empty bstrval Pin
James R. Twine13-Jan-06 6:58
James R. Twine13-Jan-06 6:58 
AnswerRe: COleVariant Empty bstrval Pin
Stephen Hewitt14-Jan-06 2:22
Stephen Hewitt14-Jan-06 2:22 
AnswerRe: COleVariant Empty bstrval Pin
TWS_Dave14-Jan-06 4:57
TWS_Dave14-Jan-06 4:57 
QuestionShockwave Flash Control Pin
zubair_ahmed13-Jan-06 3:31
zubair_ahmed13-Jan-06 3:31 
AnswerRe: Shockwave Flash Control Pin
Prakash Nadar13-Jan-06 5:30
Prakash Nadar13-Jan-06 5:30 

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.