C/C++ : BLITZ32SDK How to use .DECLS/USERLIB/DLL.
Archives Forums/Blitz3D SDK Programming/C/C++ : BLITZ32SDK How to use .DECLS/USERLIB/DLL.
| ||
| Hi, The only way to use a Blitz3d DECLS/userlib/DLL in C/C++ ( whitout a .DEF or a .LIB file) is the « Explicitly Dll calling method »
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);
}
}
So, my simple routine to do this.. Edit : CODE ARCHIVE LINK : http://www.blitzbasic.com/codearcs/codearcs.php?code=2056 |
| ||
| #### Sorry. I'CAN POST THIS TOPIC. WHY ???. #### Any solution to "backup" this post here? CODE ARCHIVE : http://www.blitzbasic.com/codearcs/codearcs.php?code=2056 |