   About lost device: Is sth. different between window mode and fullScreen mode?[solved]
  Hello~I am new in dx programme. And I am weak in english, and I may be bring you some trouble to read my question.I deal with lost device in our game.I release all the default pool resource before reset device, after this, I recreate them. And in the window mode, the device can be restored correctly. But in the full screen mode, the game have focus after dealing with the window message, but the device can not be reset.I don't know why I can restore device in the window mode, but faile in the full screen mode.Now, I can restore the device in the enter interface. But I can't restore it after entering start button.I found that the allocId which the output window shows when I use the debug runtime, is line which the device create or reset(in the enter interface, it can reset).Is there sth. easy to be ignored about device when I deal with lost device?Thank you![Edited by - Living on September 9, 2009 3:17:07 AM]
  You should use the debug runtime. It can tell you why you can’t reset the device. In general window mode is less sensitive when it comes to resets.   ;  Thanks for Demirug.Now, I can restore the device in the enter interface. But I can't restore it after entering start button.I found that the allocId which the output window shows when I use the debug runtime, is line which the device create or reset(in the enter interface, it can reset).Is there sth. easy to be ignored about device when I deal with lost device?Thank you.   ;  Beside of the default resources you create by your own you need to ensure that you release all objects that you have requested from the API. Typical resources of this kind are back buffers and mip map surfaces from textures.   ;  Thanks for Demirug.I solved this problem. The problem is about the back buffer. Someone get the back buffer by device without releasing.I have a backbuffer pointer which pointed to the surface. Some one get another backbuffer without releasing it. // variable bakcbuffer_ pointed to a surface d3d9Device->GetBackBuffer(...);I found that the address of backbuffer_ before calling the function is same with the address of backbuffer_ after.In this case, there is no error when I deal with lost device in window mode. But in full screen mode will get an error.So it should be SAFE_RELEASE( backbuffer_ ); d3d9Device->GetBackBuffer(...);   