1) If you are lucky.
Get a copy of
Dependency Walker[
^] and check the function names.
Functions are generally exported using the C convention, this only stores the function name, and without reverse engineering there is no way to get parameters and return type.
If you are lucky, then the functions will be exported with the C++ convention, which mangles the function names to include parameter types and return type. (View>Undecorate C++ Functions to view it in a readable manner in Dependancy Walker)
There may be a tool for doing exactly this if you look on google, however it wont be able to get structures, #defines and the likes back from the missing header files.
2) There is a
DllMain[
^] function that you can export from the DLL which is called when a process/thread attaches/detatches
HMODULE g_hLib = NULL;
BOOL WINAPI DllMain(HINSTANCE hInst, DWORD nReason, LPVOID pReserved) {
switch (nReason) {
case DLL_PROCESS_ATTACH:
g_hLib = LoadLibrary("Base.dll");
break;
case DLL_PROCESS_DETACH:
FreeLibrary(g_hLib);
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}