"Access violation reading location" troubles retrieveing buffer from directx
- by numerical25
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.