24,854
社区成员
发帖
与我相关
我的任务
分享
#include <windows.h>
extern "C" __declspec(dllexport) int __stdcall add(int a,int b)
{
return a+b;
}
BOOL WINAPI DllMain(HINSTANCE hModule,DWORD dwReason,LPVOID lpvReserved)
{
MessageBox(NULL,"DllMain",NULL,0);
return TRUE;
}
#include <stdio.h>
extern "C" __declspec(dllimport) __stdcall int add(int a,int b);
int main()
{
printf("a+b=%d\n",add(12,123));
return 0;
}
#include <windows.h>
extern "C" {
__declspec( dllexport ) int __stdcall add( int a, int b )
{
return a + b;
}
BOOL WINAPI DllMain( HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved )
{
MessageBox( NULL, "DllMain", NULL, 0 );
return TRUE;
}
}