TCHAR chCurDir[MAX_PATH] = { 0 };
GetCurrentDirectory(MAX_PATH, chCurDir);
SetCurrentDirectory(_T("D:\\Project\\MLLock\\Release\\"));
hDll = LoadLibrary(_T("MF1_AnLock2009.dll")); //加载dll
SetCurrentDirectory(chCurDir);
DWORD ds = GetLastError();
SLOG_INFO("ds = %d\n", ds);
char *pathvar = nullptr;
pathvar = getenv("JAVA_HOME");
void FileTool::GetPath(string &path)
{
char szFullPath[MAX_PATH];
ZeroMemory(szFullPath, MAX_PATH);
::GetModuleFileName(NULL, szFullPath, MAX_PATH);
(strrchr(szFullPath, '\\'))[0] = 0; // 删除文件名,只获得路径字串
path = szFullPath;
path.append("\\").append("config");
}