By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,729 Members | 1,167 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,729 IT Pros & Developers. It's quick & easy.

Catching Exceptions from Global Objects before main()

P: n/a
I am integrating some legacy VC++ 6.0 classes into a managed C++.NET Windows service. After I had the basic framework in place and running, I added in the source files I needed and tried to run the service. Unfortunately, now when I run the service, I get a System.ExecutionEngineException unhandled exception. I suspect that one of the global variables/objects is causing the problem. I've been unable to find a way to trap the unhandled exception so I can look at the stack trace and find the problem. Since global variables/objects are created an initialized before main(), I don't have a chance to install an unhandled exception handler. I've tried using set_unexpected() and set_terminate(), but they don't get call. I'm guessing these aren't compatable with .NET. Any help would be appreciated. Thanks!
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.