Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Logging exceptions from an external process

Reply
 
Old 08-17-2009   #1 (permalink)
Ian Hannah


 
 

Logging exceptions from an external process

I need to be able to launch (or attach) to another process on my machine from
my application running on the same machine.

The application needs to somehow "catch" unhandled exceptions from this
external process and provide stack trace information.

Does anyone know how this can be done?

Thanks
Ian


My System SpecsSystem Spec
Old 08-17-2009   #2 (permalink)
Gregory A. Beamer


 
 

Re: Logging exceptions from an external process

=?Utf-8?B?SWFuIEhhbm5haA==?= <IanHannah@xxxxxx> wrote
in news:60217A02-49A2-4F0E-9A0D-C532A3326C42@xxxxxx:
Quote:

> I need to be able to launch (or attach) to another process on my
> machine from my application running on the same machine.
>
> The application needs to somehow "catch" unhandled exceptions from
> this external process and provide stack trace information.
>
> Does anyone know how this can be done?
If you can spawn the process in console mode, you can capture the output
stream. If the coder threw errors to the stream, you will catch them.

Attaching is a bit harder, as you have to intercept calls. If it logs to
the event log, you cna potentially poll it for errors. Otherwise, you
don't have a lot of options unless the creator of the process provided
you something to get information from.

If everything is .NET, you can be a bit more tricky, via reflection.
This is not a direct "yes you can", but it makes things easier.

Peace and Grace,


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Failover Guest Cluster -- 'The process cannot access the file becauseit is being used by another process.' Virtual Server
How to trap exceptions? PowerShell
Running an external process asynchronously PowerShell
SMO : Catching Exceptions PowerShell
Trapping exceptions PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46