welcome
I Have a Classs Called MyDevice I Want To Create Direct3D9 Device but wher i Debug The Project The Pc Show A Message
Say :
Unhandled exception at 0x004114b7 in Direct3d Device.exe: 0xC0000005: Access violation reading location 0x00000000.
I Use Viusal C++ 2005 Pro
The Code Is
void MyDevice::BuildDeviceParameters()
{
ZeroMemory ( &Parameters , sizeof (D3DPRESENT_PARAMETERS));
Direct3D->GetAdapterDisplayMode ( D3DADAPTER_DEFAULT , &DisplayMode );
Parameters.AutoDepthStencilFormat = DisplayMode.Format ;
Parameters.BackBufferCount = 3 ;
Parameters.BackBufferFormat = DisplayMode.Format ;
Parameters.BackBufferHeight = DisplayMode.Height ;
Parameters.BackBufferWidth = DisplayMode.Width ;
Parameters.EnableAutoDepthStencil = TRUE ;
Parameters.hDeviceWindow = hwnd ;
Parameters.SwapEffect = D3DSWAPEFFECT_DISCARD ;
Parameters.Windowed = TRUE ;
}
remark
There Is No Error Whene I Build The Project