C
cs
We have some code that walks the process tree on windows xp. It uses the
process class in system diagnostic as well as some dllimport calls to
kernel32.dll and ntdll.dll
We also have some code that talks on terminal services virtual channels
using wtsapi32.dll
What we have noticed is that after calling those methods several times
per minute in some cases or at least lots of times per hour all day long
will end up giving a "application has generated an exception that could
not be handled" dialog with a ok and cancel button. Tonight I have
researched and someone suggests using cordbg, so I will try that next.
What I am actually wondering is how can that error show up if I have
some huge TRY-CATCHES around any calls to those lines of code? I am
almost certain its those lines of code that make it fail because I
output to my logs before and after calling methods on those dlls and the
error always happens right after the log says its getting ready to call
one of those methods. So is there some special TRY-CATCH for dll imports
maybe? BTW if I do pass the wrong params or something to those methods I
do get a nice exception I can catch, its just sometimes that I get that
error that I can't do anything about!
Thanks,
process class in system diagnostic as well as some dllimport calls to
kernel32.dll and ntdll.dll
We also have some code that talks on terminal services virtual channels
using wtsapi32.dll
What we have noticed is that after calling those methods several times
per minute in some cases or at least lots of times per hour all day long
will end up giving a "application has generated an exception that could
not be handled" dialog with a ok and cancel button. Tonight I have
researched and someone suggests using cordbg, so I will try that next.
What I am actually wondering is how can that error show up if I have
some huge TRY-CATCHES around any calls to those lines of code? I am
almost certain its those lines of code that make it fail because I
output to my logs before and after calling methods on those dlls and the
error always happens right after the log says its getting ready to call
one of those methods. So is there some special TRY-CATCH for dll imports
maybe? BTW if I do pass the wrong params or something to those methods I
do get a nice exception I can catch, its just sometimes that I get that
error that I can't do anything about!
Thanks,