24,860
社区成员




#include <windows.h>
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
{
return TRUE;
}
[XXXX.def]
LIBRARY XXXX.dll
EXPORTS
Fun1
Fun2
...
Fun1, Fun2 ... 为xxxx.lib中的函数
编译:
cl /c DllMain.cpp
link /subsystem:windows /DLL /def:XXXX.def /out:$(XXXX.dll) DllMain.obj xxxx.lib
#include <third_party.h>
int foo(char* p)
{
//forward it to third party library
return third_party_foo(p);
}