Sì, è possibile. Si dovrebbe usare la funzione GetProcAddress, per chiamare la funzione direttamente nella DLL, senza coinvolgere il LIB
processi in modo esplicito il collegamento a un GetProcAddress chiamata DLL per ottenere l'indirizzo di una funzione esportata nella DLL. Si utilizza il puntatore alla funzione restituito per chiamare la funzione DLL.
Per citare l'esempio dal link qui sopra:
typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT);
...
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);
}
}
fonte
2012-07-28 04:23:06
mi sento te bro! C va sempre più lontano sullo sfondo. – displayname