hwnd issues relating to DirectX10 project framework

Started by
5 comments, last by BinaryDeadBeef 12 years, 4 months ago
I have just written my application frame work again, I am however, currently experiences error relating to hwnd. I've been debugging my program for a couple of hours now, seems like I am out of options, I would appreciate it someone more experienced than I could look over the code and throw me some indications as to were my problems have arisen from.

tl;dr hwnd problem, need help



The problem currently 'seems' related to:

swapChainDesc.OutputWindow = *hWnd;

I am left with an access read violation error


My code is organised such that:

dxGeometry->dxD3D.h->dxSystem->winMain


Screenshot of output:
Autos.jpg


dxGeometry.h
http://pastebin.com/DaifJK15

dxD3D.h
http://pastebin.com/d0RMmNvK

dxSystem.h
http://pastebin.com/a28BV8AX

winMain.cpp
http://pastebin.com/3c9sGcv5

A direct download of the application:
http://hotfile.com/dl/136477984/3be


Many thanks guys.
Advertisement
I'm currently rewriting large areas of the framework, trying to eliminate issues with resources not getting allocated correctly. This should hopefully narrow the problem down.
You can't dereference an HWND. It's a handle, not a pointer. Just copy the handle right into the swap chain description.
I wrote the application frame work out again, I'm down this error now:

m_dxd3d CXX0030: expression cannot be evaluated.

When called from my render method:

void dxSystem::render()
{
m_dxd3d->beginScene();

m_dxd3d->endScene();

}

my render method is what is called in winMain.cpp

begin scene just contain the standard functions:

ClearRenderTargetView()
ClearDepthStencilView()

and

Present()

Thanks
The value 0xcdcdcdcd is a debug fill value used for uninitialised members. You're not initialising your HWND member to NULL, and you access it before setting it to a valid value.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

[color=#181818][font=monospace][/font]
"[font="monospace"][color="#181818"]HWND[/font][color=#000040][font=monospace]*[/font][color=#181818][font=monospace] hWnd[/font][font="monospace"][color="#008080"];[/font]" in dxD3D class that you don't initialize anywhere.[color=#008080][font=monospace][/font]
Thanks for the replies so far, I've applied what you've all said, eliminated those problems. But now there's 'this', a picture will convery the information better perhaps:
Error_report.jpg
The issue has been resolved. The HWND element in create a window was not communicating with createdeviceandswapchain outPutwindow

This topic is closed to new replies.

Advertisement