• Advertisement


This topic is now archived and is closed to further replies.

PR 3.00 Shutdown problem

This topic is 6605 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have created an app as a DLL, using PR 3.00. The main app then does a LoadLibrary() call to load this dll and I then call a function to initialise PR.

I want to be able to click on various buttons in the main app to run up different environments. There are very good reasons for doing this as a DLL! We are co-developing a project with another company, who are doing the 2D bit and we decided it would be better for me to give them updates on the 3D side as a DLL which can hook into their code easily. Anyway, all this is irrelevant!

Basically, what is happening is that PR doesn't appear to shutdown properly and return to the main app, because when I then try to initialise it again, I get a DDERR_NOEXCLUSIVEMODE error in the log file.
To get around this I manually set the exclusive mode back to normal before shutting down, by calling:-

wgtpdd->SetCooperativeLevel(hWndMain, DDSCL_NORMAL);

It now lets me re-initialise PR fine. However, the problem now is that when I try to exit the main app, it GPF's! Any clues as to what I'm doing wrong?

Under normal cases, you would only do the shutdown at the end of your game just before exiting the app, and the OS would clean up when finished anyway, which is why noone else has noticed this (I presume).

I have done a test whereby I don't do anything else other than initialise PR and shut it down again. However, this problem still occurs.

And I have also noticed that to get PR to shutdown and return the screen back properly, I have to call PR_ShutdownD3D() as well as PR_Shutdown().

Any help on this would be most welcome!!! as I am being hassled to get this resolved!

If I've missed anything off, please let me know.

Are any of these problems solved in the later releases? I've been trying to download them for a couple of days now and I can't get to the FTP - Yes, I know it's not supposed to be up all the time! Just some of the time would be nice!


[This message has been edited by Tarique (edited December 22, 1999).]

Share this post

Link to post
Share on other sites
By the way, here's my shutdown code:-

VOID CGfx::FreeAll(VOID)
//----- only attempt to close if not already open ----------------


//----- free cameras ---------------------------------------------

for(INT32 i = 0; i < CCamera::MAX_CAMERAS; i++) {
delete Cam[i];
Cam[i] = NULL;

//----- free viewport and closedown ------------------------------




wgtpdd->SetCooperativeLevel(hWndMain, DDSCL_NORMAL);

m_Open = FALSE;

[This message has been edited by Tarique (edited December 22, 1999).]

Share this post

Link to post
Share on other sites

  • Advertisement