顯式調用DLL

 HMODULE hmodule=LoadLibrary(TEXT("Dll4.dll"));
 typedef int(_stdcall * MyAdd4)(int a,int b);
// MyAdd4 myadd4=(MyAdd4)GetProcAddress(hmodule,"MyAdd4");

MyAdd4 myadd4=(MyAdd4)GetProcAddress(hmodule,(LPCSTR)MAKEINTRESOURCE(4));
 int c=myadd4(1,2);

你可能感兴趣的:(c,dll)