I have the .def file, .lib file, the .dll, the source files.
It’s using WINAPI DllMain, all its functions follow that.
It’s like this:
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
extern "C"
{
int WINAPI DoSomething() { return -1; }
int WINAPI DOSOMETHIGNELSE!() { return 202020; }
};
IN the project settings linker I added the .lib file. There is no header file for the actual functions in the extern “C” part.
I include windows.h try to call DoSomething() but doesnt know what it is.
I’m not sure exactly what you’re asking for, but I think at the least you’ll need to create a
.hfile for client code to include so it can call functions in the the DLL – otherwise how will the compiler know what the nameDoSomethingis?The header file should probably look something like: