SlimDX Device.Reset crashes with a "D3DERR_INVALIDCALL: Invalid call (-2005530516)" error

Posted by ofarooq on Stack Overflow See other posts from Stack Overflow or by ofarooq
Published on 2010-03-23T04:47:22Z Indexed on 2010/03/23 4:51 UTC
Read the original article Hit count: 806

Filed under:
|
|

Hi All,

We recently upgraded from 2005 to VS 2008 (Windows XP). We use SlimDx in one of our projects. All was working ok after the upgrade, except my "Recover" function, which gets called on devicelost/device reset which crashes with

D3DERR_INVALIDCALL: Invalid call (-2005530516)

I use Ctrl-Alt-Del and then "Escape" to simulate device lost.

void Recover()
{
  try
     {
         if (res.Code == D3DERR_DEVICENOTRESET)
         { 
           res = m_device.Reset(m_presentParams); //Crashes on this.
           if (res.IsSuccess)
           {
             m_deviceLost = false; 
            }
          }
     }
   catch(Exception e)
   {}
 }

Is this something to do with VS2008, as it used to work nicely with 2005

Thanks for your help.

© Stack Overflow or respective owner

Related posts about slimdx

Related posts about c#