Hello,
I added the code in comments to the engine:
class Engine://Public functionsprivate://D3DPRESENT_PARAMETERS m_D3DWindowedParams; Enumerator* m_pEnum;IDirect3DDevice9* m_pD3DDevice;IDirect3D9* m_pD3D;DEV_OBJECT_CALLBACK m_cbInitDeviceObjects;DEV_OBJECT_CALLBACK m_cbRestoreDeviceObjects;DEV_OBJECT_CALLBACK m_cbInvalidateDeviceObjects;DEV_OBJECT_CALLBACK m_cbDeleteDeviceObjects;bool m_bRequiresWindowed;bool m_bRequiresFullscreen;bool m_bRequiresHAL;bool m_bRequiresREF;UINT m_intMinFullscreenWidth;UINT m_intMinFullscreenHeight;UINT m_intMinColorChannelBits;UINT m_intMinAlphaChannelBits;UINT m_intMinDepthBits;UINT m_intMinStencilBits;HINSTANCE m_hInst;HWND m_hWnd;RECT m_rcClient;RECT m_rcBounds;}
And I get an error at this place in code:
HRESULT Engine::Init(){ m_pEnum = new Enumerator; //Errors right here m_pEnum->SetWindowRect(m_rcClient); return S_OK;};
Error:
Unhandled exception at (Memory address) in test.exe: Microsoft C++ exception: std::bad_alloc at memory location(Memory address).
My only guess is something is up with the constructor of the enumerator class, except nothing abnormal is with it:
Enumerator::Enumerator( void ){ m_pD3D = NULL; m_rcWindow.top = 400; m_rcWindow.bottom = 1000; m_rcWindow.left = 200; m_rcWindow.right = 1000; m_cbConfirmDeviceCallback = NULL; m_pAdapterInfoList = NULL; m_pAllowedAdapterFormatList = NULL; m_intMinFullscreenWidth = 640; m_intMinFullscreenHeight = 480; m_intMinColorChannelBits = 5; m_intMinAlphaChannelBits = 0; m_intMinDepthBits = 15; m_intMinStencilBits = 0; m_bRequiresWindowed = true; m_bRequiresFullscreen = false;}
Thanks for your help,
exorcist_bob