If you dont have the function params, then this is not an easy task.........You need the params to build a typedef for a function pointer..........
If you know how the function works and its exportable....its relatively easy...
I did this example just now, and it shows how simple it can be - IF YOU HAVE THE FUNCTION INFO!!!
Code:
#include <windows.h>
typedef int (WINAPI *MESSAGEBOXRAW)(HWND hWnd,LPCTSTR lpText,
LPCTSTR lpCaption,UINT uType);
MESSAGEBOXRAW MessageBoxRaw;
int WINAPI WinMain(HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil){
HMODULE hMod;
hMod = LoadLibrary("User32.dll");
if(hMod == NULL)
return 1;
MessageBoxRaw = (MESSAGEBOXRAW)GetProcAddress(hMod,
"MessageBoxA");
if(MessageBoxRaw == NULL)
return 1;
MessageBoxRaw(HWND_DESKTOP,"Success","Whoopee!!",MB_OK);
FreeLibrary(hMod);
return 0;
}