How to call function in DLL (for B3D) from SDK?
Archives Forums/Blitz3D SDK Programming/How to call function in DLL (for B3D) from SDK?
| ||
I have compiled demo dll which was use with B3D. I want to import that DLL to C++ and use with SDK. I don't know how to import them and call the functions with parameter(s). Anyone could kindly show me the sample code? Thanks so much. * Actually I try to implement FastImage with SDK, I did converted .decl to .h, I have FastImage.dll but do not know how to call them. - -" Please help, |
| ||
Here's an example: http://www.goffconcepts.com/techarticles/development/cpp/calldll.html |
| ||
Thanks so much ^^ |
| ||
I'm found a solution. The Explicitly Dll calling http://msdn2.microsoft.com/en-us/library/784bt7z7 (VS.80).aspx HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer DWORD dwParam1; UINT uParam2, uReturnVal; hDLL = LoadLibrary("MyDLL"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "DLLFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return SOME_ERROR_CODE; } else { // call the function uReturnVal = lpfnDllFunc1(dwParam1, uParam2); } } |
| ||
How to convert the Blitz3D DECLS http://www.blitzbasic.com/Community/posts.php?topic=70890 http://www.blitzbasic.com/codearcs/codearcs.php?code=2056 |
| ||
Thanks so much ZJP, Now I stuck with SystemProperty("Direct3DDevice7") which the SDK does not have it. and I tried several ways to get that pointer. Unfortunately, I can't find a way to do that. Hope BSL can help. T____T. |