Sammi3
Member
I wanted to cast the D3DX11Device and D3DX11Context from the map provided by os_get_info into the correct type using the correct formating. On the C++ side, I currently have my dll setup as follows:
I was under the impression that I had to cast them as the data type and not as a pointer to their datatype as I did the HWND but that doesn't seem to work, I can only cast them as a pointer to their data type. Any ideas on how I should approach this?
Kind thanks,
Sammi3.
Code:
fn_export double Init(void* dx11Device, void* dx11Context, void* windowHwnd) {
//Cast void pointers to correct types
g_pd3dDevice = (ID3D11Device*)dx11Device;
g_pd3dDeviceContext = (ID3D11DeviceContext*)dx11Context;
HWND hwnd = (HWND)windowHwnd;
}
Kind thanks,
Sammi3.