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.

Dark GDK / Doing 'stuff' before DirectX

Author
Message
John Y
Synergy Editor Developer
20
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 28th May 2005 00:36
When DirectX 9 is not found on the persons computer the program just exits with a reference to a dll. Although it is obvious what that dll refers to for any programmer, a normal guy is going to stare blankly at the screen

So, my question is can I write code that is executed before the DarkSDK libraries take over?

IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th May 2005 02:16
Yes you can, with a little help from a VC++ extension

http://www.codeguru.com/Cpp/misc/misc/threadsprocesses/article.php/c6945/

You'll need to try it to see if it works with DarkSDK.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 28th May 2005 02:32
Yes, it works well...

Now to write a DX version checker

John Y
Synergy Editor Developer
20
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 28th May 2005 03:31 Edited at: 28th May 2005 04:54
Excelent, thanks a lot!

Would the post methods get called if the error was detected, and is it possible to know if that error occurred rather than making a timer to get the difference between entering the pre and pro methods?

OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 28th May 2005 06:13
The pre routine returns 0 if all is okay, any other value if there is an error, at which point the executable stops.

John Y
Synergy Editor Developer
20
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 28th May 2005 06:38
I mean for example my program runs and then crashes out because of the incorrect directx version being installed. Would the post method still be called, and is it possible to 'know' that the error occured.

IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th May 2005 07:41
If you return a non-zero value from your test function, the program will stop.



*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2023-02-06 19:07:18
Your offset time is: 2023-02-06 19:07:18