killocost.blogg.se

Unable to initialize direct3d device
Unable to initialize direct3d device







Thanks a lot, Erik!Īfter adding some extra error handling I did come to the conclusion that the Direct3D code from the DLL is not being executed though. I have added the code and I can now include an argument.

unable to initialize direct3d device

HRESULT hResult = pfnDirect3DInit(hMyWindow)

unable to initialize direct3d device

PFNDirect3DInit pfnDirect3DInit = (PFNDirect3DInit)GetProcAddress(hLib, "Direct3DInit") Typedef HRESULT (* PFNDirect3DInit)(HWND hWnd) You have to define the function-pointer to take the arguments you want.

UNABLE TO INITIALIZE DIRECT3D DEVICE INSTALL

If not, use an ActiveX template to get the code needed to install it on another computer. Remember to test if your engine can be registered in Windows 7. The thing is when I tried that it using the external DLL (calling the function from inside the editor application) it told me it didn't take any arguments which is of course because the DLL is linked on run-time.īut there should be a way to make it happen. As in I'd like to make it like this -> Direct3DInit(). I wish to change Direct3DInit(HWND hShatterViewport) into a more modular function as well. If( NULL = ( g_pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) ) HRESULT _declspec(dllexport) Direct3DInit(HWND hShatterViewport) MessageBox(NULL,L"Message from DLL:\nYou haz executed teh DLLTestFunction() function.\ngreat success !",L"DLLTestFunction()",MB_OK|MB_ICONINFORMATION)

unable to initialize direct3d device

Void _declspec(dllexport) DLLTestFunction() StatusText = L"DLLTestFunction() not executed." StatusText = L"DLLTestFunction() executed." ShatterLib = LoadLibrary(L"ShatterCore.dll") ĭLLTestFunction = (EntryPoint)GetProcAddress(ShatterLib,"DLLTestFunction") ĭirect3DInit = (EntryPoint)GetProcAddress(ShatterLib,"Direct3DInit") (DLLTestFunction() is obviously just a test, it works and displays a message box) Currently I am trying to import just the initialization function from the DLL I coded myself.







Unable to initialize direct3d device