Original Post
i have written a new ddraw7 class.it has members m_lpdd (direct draw obj) m_lpddsprimary (front buffer) m_lpddsback( back buffer). It also supports windowed mode to full screen mode switching. in class destructor i have written a code similar to below one.
but on the time destruction i get famous Access Violation 0x000005 error message. i couldn't find the error if any one helps it could be fine...
Life is beautiful
Edited by - yaskil on July 30, 2001 8:39:15 AM
CDirectXApp::~CDirectXApp()
{
if( m_lpdd != NULL )
{
if( m_lpddsback != NULL )
{
m_lpddsback->Release();
m_lpddsback = NULL;
}
if( m_lpddsprimary != NULL )
{
m_lpddsprimary->Release();
m_lpddsprimary = NULL;
}
m_lpdd->Release();
m_lpdd = NULL;
}
}
|