Hi,
Sorry about taking so long to get back. This is what was in my debug window....
'Ping.exe': Loaded 'C:\CODEBASE\ANDREW_GISLER\Ping\Debug\Ping.exe', Symbols loaded.
'Ping.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\d3d9.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\d3d8thk.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'Ping.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\avgrsstx.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\cryptbase.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\clbcatq.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\d3d9d.dll', Cannot find or open the PDB file
'Ping.exe': Loaded 'C:\Windows\System32\winmm.dll', Cannot find or open the PDB file
Direct3D9: :====> ENTER: DLLMAIN(6820d9a0): Process Attach: 000009fc, tid=00000ff0
Direct3D9: :====> EXIT: DLLMAIN(6820d9a0): Process Attach: 000009fc
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
'Ping.exe': Loaded 'C:\Windows\System32\nvd3dum.dll', Cannot find or open the PDB file
D3D9 Helper: IDirect3D9::CreateDevice failed: D3DERR_NOTAVAILABLE
First-chance exception at 0x009e1a9f in Ping.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x009e1a9f in Ping.exe: 0xC0000005: Access violation reading location 0x00000000.
Here is my code for initialising my parameters and etc.
g_p3DObject = Direct3DCreate9(D3D_SDK_VERSION); if (!g_p3DObject) { } m_iWidth=c_pPlatform->GetMainWindow()->m_iWidth; m_iHeight=c_pPlatform->GetMainWindow()->m_iHeight; g_p3DObject->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &g_displayMode); D3DCAPS9 D3DCaps; g_p3DObject->GetDeviceCaps( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &D3DCaps ); DWORD vertexProcessing = 0; if ( D3DCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT ) { vertexProcessing = D3DCREATE_HARDWARE_VERTEXPROCESSING; // Check for pure device if ( D3DCaps.DevCaps & D3DDEVCAPS_PUREDEVICE ) { vertexProcessing |= D3DCREATE_PUREDEVICE; } } else { vertexProcessing = D3DCREATE_SOFTWARE_VERTEXPROCESSING; } D3DPRESENT_PARAMETERS d3dParam; ZeroMemory (&d3dParam, sizeof (d3dParam)); d3dParam.Windowed =true; d3dParam.AutoDepthStencilFormat = D3DFMT_D24FS8; d3dParam.EnableAutoDepthStencil=TRUE; d3dParam.SwapEffect=D3DSWAPEFFECT_DISCARD; d3dParam.BackBufferFormat=D3DFMT_X8R8G8B8; d3dParam.BackBufferCount=1; d3dParam.BackBufferHeight=m_iHeight; d3dParam.BackBufferWidth=m_iWidth; d3dParam.hDeviceWindow= c_pPlatform->GetMainWindow()->GetHandle();
Quote:
You'll also find it easier to track this stuff if you actually respond to a positive from the FAILED() macro with an error message rather than just ignoring the result.
If i understand this correctly your saying that I should do something other than just simply using the return keyword? I was planning on putting something there more significant at a later time. Its just there for temporary purposes.
Thanks again for all the help.