0

Hi,

Im using DX9c and learning from Frank Luna's book to try and handle OnLostDevice and OnResetDevice, when switching to fullscreen and back (and alt+tabbing).
If I dont draw anything I am able to go from windowed to fullscreen, and back, with no trouble. But adding a draw and flush then pressing the fullscreen key causes the following msgbox error: (at the m_pSprite->flush();)

Unhandled exception at 0x56E5B1FC (D3DX9_43.dll) in DXTB 14.exe: 0xC0000005: Access violation writing location 0xCCD020CC.

Although I do enjoy getting stuck on problems I have been rearranging my code and typing like a monkey for 1 week now (on this issue). Please can you correct where I am going wrong?

Resolution is sweeter the longer you wait. (please dont qoute it back at me though! hehe)

1
Contributor
1
Reply
12
Views
4 Years
Discussion Span
Last Post by Elixir42
0

***************SOLVED***********************
anytime there is an access violation, in this context, it means that I was trying to access resources that device->reset had, well, reset! The simple solution was to find and track down which object I had not called OnLostDevice and OnResetDevice for. This includes all ID3DXSprite and D3DXFont and D3DXLine interfaces/objects.

God bless you in Jesus name

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.