int GetConfInt(LPCTSTR strKey, int iDefalt)
{
char cSAMSRunPath[MAX_PATH] = { 0 };
GetModuleFileName(NULL, cSAMSRunPath, MAX_PATH); //获取可执行模块的路径
CString strPath = cSAMSRunPath;
int nEnd = strPath.ReverseFind('\\'); //取最后的"\"号之前地址
strPath = strPath.Mid(0, nEnd + 1) + ".ini";
int bLog = GetPrivateProfileInt("Config", strKey, iDefalt, strPath);
return bLog;
}