D
dragonslayer008
I am trying to initialize Direct3D 9 in a C++/CLR application.
However, the create device function gives me a compilation error:
error C2664: 'IDirect3D9::CreateDevice' : cannot convert parameter 6
from 'cli::interior_ptr<Type>' to 'IDirect3DDevice9 **'
1> with
1> [
1> Type=IDirect3DDevice9 *
1> ]
1> Cannot convert a managed type to an unmanaged type
The code giving the error:
HRESULT hr;
hr = pd3dObject->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
hwnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, pd3dPP, &pd3dDevice);
I thought a managed C++ class can have pointers to unmanaged code?
However, the create device function gives me a compilation error:
error C2664: 'IDirect3D9::CreateDevice' : cannot convert parameter 6
from 'cli::interior_ptr<Type>' to 'IDirect3DDevice9 **'
1> with
1> [
1> Type=IDirect3DDevice9 *
1> ]
1> Cannot convert a managed type to an unmanaged type
The code giving the error:
HRESULT hr;
hr = pd3dObject->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
hwnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, pd3dPP, &pd3dDevice);
I thought a managed C++ class can have pointers to unmanaged code?