Jump to content
  • Advertisement
Sign in to follow this  

DD7: No exclusive mode error on initialization

This topic is 4444 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

For demonstration purposes I'm using the old DirectDraw7 interface in VB6 to show off a simple tile engine, but there is a problem occurring. Right in the beginning when initializing DirectDraw for windowed mode sometimes everything works but after a few runs an error eventually starts to popup, the error is DDERR_NOEXCLUSIVEMODE... this happens as follows... First DirectDraw is initialized for windowed mode using: Call DirectDraw.SetCooperativeLevel(WindowHandle, DDSCL_NORMAL) And then anything after it causes an error, in my code the next thing I do is Call DirectDraw.RestoreDisplayMode() just in case of changing to full screen or to windowed, but even if that was skipped to the next skip of creating the primary surface: Dim ddSD As DDSURFACEDESC2 ddSD.lFlags = DDSD_CAPS ddSD.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE Set DDPrimarySurface = DirectDraw.CreateSurface(ddSD) Then the NOEXCLUSIVEMODE error raises, now I've been playing around and back to the DirectDraw.SetCooperativeLevel line, if I changed it to Call DirectDraw.SetCooperativeLevel(WindowHandle, DDSCL_NORMAL or DDSCL_EXCLUSIVEMODE) which won't work because it only works in fullscreen but it causes the error like the following lines would do and then when I change it back to just the DDSCL_NORMAL flag while still in run-time mode, then it runs. The only way to fix this temporary is to reset the computer, but then it eventually happens again after a few runs. I'm stomped about this, few people have mentioned re-installing DirectX, that I have done, and it works for a little while but then this repeats all over again, I don't think I'm doing anything wrong since it's just the first two lines in my code, but I could be wrong. I've already done searches on this in google and on here and no information has been of help or close to my problem. So any help is very appreciated to get this age old problem out of my head. Thanks in advance.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!