Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Error Reporting

Author
Message
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 11th Nov 2005 04:11
This is something I've been wondering about for a while now. How does DBP do its error reporting? What I mean by error reporting is, when it traps an error and it outputs it in a message box, then ending the program. The reason I ask this is because I wonder how to implement that sort of system myself in my own plugins. An obvious thought for at least the message displaying is to use the messagebox API, however knowing that DBP has an exit prompt feature, I thought perhaps it used part of the system to output the error message. Any ideas are appreciated..

Thanks

Tempest - P2P UDP Multiplayer Plugin - 49%
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 13th Nov 2005 19:01
*blimp*
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Nov 2005 14:30
There are several ways to do it.

1. You can trigger a DBPro error by writing a DWORD value to the address pointed to by GlobStruct.g_pErrorHandlerRef. This will cause DBPro to drop out and report the matching DBPro error.

2. Call the CloseDisplay and then Quit functions in the core DLL, display your error message using MessageBox, and then call the ExitProcess API function (how I've done it in the past).

I have a third method that uses point 1, and intercepts the DBPro message box to customise the message box.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 16th Nov 2005 02:12 Edited at: 16th Nov 2005 02:14
Ohhh so thats how it does it. I'll give #2 a try when I have some time. Thank you Ian, I know I can always count on you to give an answer about this kind of thing.

Tempest - P2P UDP Multiplayer Plugin - 50%

Login to post a reply

Server time is: 2024-11-21 19:33:18
Your offset time is: 2024-11-21 19:33:18