int rst = 0;
//创建dll句柄
HINSTANCE hDll;
//装载dll
//TCHAR ssleay[32] = _T("ssleay.dll");
//调试
TCHAR ssleay[32] = _T("marsdll.dll");
//TCHAR ssleay[32] = _T("..x64Releasemarsdll.dll");
hDll = LoadLibrary(ssleay);
if (NULL == hDll)
{
DWORD dwError = GetLastError();
OutputDebugPrintf("NULL == hDll error:%d
", dwError);
}
if (1)
{
//检索指定DLL中的输出库函数地址
typedef int(*lpCall)();
lpCall CalcLibInit = (lpCall)GetProcAddress(hDll, "StartMars");
if (NULL != CalcLibInit)
{
OutputDebugPrintf("NULL != CalcLibInit
");
}
DWORD dwError = GetLastError();
OutputDebugPrintf("NULL == CalcLibInit error:%d
", dwError);
}