Hi Jon:
Unfortunately, AfxMessageBox will be the kiss of death in a web
application. The message box will appear on a hidden desktop and wait
for someone to click and close it.
The best solution would be to recompile the legacy code to be server
friendly (no calls to APIs requiring interactive UI). Either this or
porting the legacy code to .NET.
If that's impossible, you might be able to do something by hooking /
intercepting API calls, but it's not something I'd suggest doing until
it is the last option. If you google for keywords like: intercept hook
thunk win32 api, you'll find some research and articles on the
subject, and there are some commercial toolkits to help also.
--
Scott
http://www.OdeToCode.com/
On Thu, 30 Sep 2004 08:39:41 -0700, "jlea" <jo*@leapsoft.com> wrote:
I have some legacy code wrapped in a .NET managed assembly that I'm using
from within an asp web application and all works fine until the legacy code
detects an error during a function call on an object and it tries to issue
an AfxMessageBox: The browser (IE) hangs.
How does one deal with this situation in a web application? I have a
try-catch in the aspx.cs but it never gets to the catch block.
Thanks.
Jon Lea.