Alex Ben-Ari wrote:
How can I catch this violation condition, ignore it and just let the 3rd
party exe die and continue with my own flow of execution ? Is there any
way to do this ?

One, quite involved, idea:


- Run the external executable and inject a special DLL into
  its address space. For details on DLL injection, see
  Matt Pietrek's legendary articles on API spying
  (MSJ December 1994) or one of the following
  articles:

http://www.codeproject.com/useritems/DLL_Injection_tutorial.asp?print=true
   http://www.internals.com/articles/apispy/apispy.htm

- Using injection techniques, have the external executable
  run code in your DLL. That code calls
  SetUnhandledExceptionFilter() to install an exception
  filter. When a unhandled exception occurs, the exception
  filter could simply exit the app.

  Under Windows XP, you can alternatively use the
  AddVectoredExceptionHandler() API to catch the access
  violation.

- After this initialization, continue to run the
  executable as usual.

Hope this helps,

Claus

[EMAIL PROTECTED]
  Claus Brod, CoCreate R&D         Have you hugged your manager today?
  CoCreate Software GmbH           Phone: +49 7031 951 2152
  http://www.cocreate.com          Fax:   +49 7031 951 6152
--http://clausbrod.com --------------------------#include <disclaimer>--

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to