Q
quat
I have two unmanaged pointer in a managed form class:
IDirect3D9* d3dObject;
IDirect3DDevice9* d3dDevice;
In a member function of the form, I call:
d3dObject->CreateDevice(
D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
(HWND)hwnd,
D3DCREATE_HARDWARE_VERTEXPROCESSING,
d3dPP,
&d3dDevice));
I get the error:
error C2664: 'IDirect3D9::CreateDevice' : cannot convert parameter 6 from
'cli::interior_ptr<Type>' to 'IDirect3DDevice9 **'
with
[
Type=IDirect3DDevice9 *
]
Cannot convert a managed type to an unmanaged type
IDirect3D9* d3dObject;
IDirect3DDevice9* d3dDevice;
In a member function of the form, I call:
d3dObject->CreateDevice(
D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
(HWND)hwnd,
D3DCREATE_HARDWARE_VERTEXPROCESSING,
d3dPP,
&d3dDevice));
I get the error:
error C2664: 'IDirect3D9::CreateDevice' : cannot convert parameter 6 from
'cli::interior_ptr<Type>' to 'IDirect3DDevice9 **'
with
[
Type=IDirect3DDevice9 *
]
Cannot convert a managed type to an unmanaged type