How to get the line of my source-code from where a system-error-message occurs?


2006-11-06 02:41:43 PM
cppbuilder75
How to get the line of my source-code from where a
system-error-message occurs?
In my case it's a message-box with the text 'no mci-device-open' and
an OK- button to be clicked on.
If I click on 'Pause' in the VCL and examine the calling-stack it's
bottom-entry is
:77d196c7 USER32.DispatchMessageA+0xf
When double-clicking on this entry I get the cpu-window with the
following two lines at the begin
pop ebp
ret $0004
Setting a breakpoint at the second line and continuing the program I
land on my breakpoint and the calling stack now only contains this
:77d196c7 USER32.DispatchMessageA+0xf
line (as supposed).
Stepping through the program using F8 the stack displays the (single)
line
:420792f9; C:\windows\system32\vcl100.bpl
and continuing with F8 I get three entries, where the first is
:77d196c7 USER32.DispatchMessageA+0xf
Continuing with F8 I finally land at the starting situation, where the
last stack-line is again the
:77d196c7 USER32.DispatchMessageA+0xf
~~~~~~~
The problem (with my way) is I am not able to click on the OK-Button
where the program is paused and if I let it run without setting a
breakpoint and click on the OK-Button it will pass the position in my
source-code where this problem does occur?
Perhaps there is a simple solution to let BDS display the full stack
from scratch on? Or another trick to find out the
application-source-line which causes the error.
~~~~~~~
Thank you,
Michael