<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=890471801-25072006>Hello
everyone,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=890471801-25072006>I am using Project
JEDI Code Library (JCL) JclDebug.pas to capture stack trace. It works great for
main thread. But using Indy TCP/IP server environment onExecute event handler
code, no stack can be captured. The reason for that is in different thread from
the main thread. Does anyone know how to solve it?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=890471801-25072006>Here is the code
template.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=890471801-25072006>var<BR>
varStringListStack: TStringList;<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=890471801-25072006>
JclStartExceptionTracking;</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=890471801-25072006>
try<BR> try</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006> //
do something might throw thread
......<BR> except<BR>
on E: Exception
do<BR>
begin<BR>
varStringListStack :=
TStringList.Create;<BR>
try<BR>
varStringListStack.BeginUpdate;</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006>
JclLastExceptStackListToStrings(varStringListStack, False, True,
True);<BR>
varStringListStack.EndUpdate;<BR>
finally<BR>
FreeAndNil(varStringListStack);<BR>
end;<BR></SPAN></FONT><FONT face=Arial size=2><SPAN
class=890471801-25072006>
end;<BR> end;<BR>
finally<BR> JclStopExceptionTracking;<BR>
end;<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006>TIA</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006>Regards</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006>Leigh</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=890471801-25072006><A
href="http://www.smootharm.com">www.smootharm.com</A></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890471801-25072006> </DIV></SPAN></FONT></BODY></HTML>