"Access violation reading location" troubles retrieveing buffer from directx

Posted by numerical25 on Stack Overflow See other posts from Stack Overflow or by numerical25
Published on 2010-04-27T13:43:26Z Indexed on 2010/04/27 13:53 UTC
Read the original article Hit count: 200

Filed under:
|
|
|

Below is my code...

ID3D10Texture2D *pBackBuffer;

hr = mpSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*) &pBackBuffer);

and I get the following error

chp1.exe': Unloaded 'C:\Windows\SysWOW64\oleaut32.dll'
First-chance exception at 0x757ce124 in chp1.exe: Microsoft C++ exception: _com_error at memory location 0x0018eeb0..
First-chance exception at 0x757ce124 in chp1.exe: Microsoft C++ exception: _com_error at memory location 0x0018edd0..
First-chance exception at 0x757ce124 in chp1.exe: Microsoft C++ exception: _com_error at memory location 0x0018ef1c..
The thread 'Win32 Thread' (0xfc4) has exited with code 0 (0x0).
'chp1.exe': Unloaded 'C:\Windows\SysWOW64\D3D10Ref.DLL'
First-chance exception at 0x00b71894 in chp1.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled ex

ception at 0x00b71894 in chp1.exe: 0xC0000005: Access violation reading location 0x00000000.

It appears that the error occurs in the last parameter. &pBackBuffer. I added this single line of code and the error occurs.

© Stack Overflow or respective owner

Related posts about c

    Related posts about c++