CString CConfigPro::GetConfigValue(CString strAppName, CString strKeyName)
{
TCHAR szValue[MAX_PATH];
CString strCurrentPath, strConfigPath, strValue;
GetModuleFileName(NULL, strCurrentPath.GetBufferSetLength(MAX_PATH+1), MAX_PATH);
strCurrentPath.ReleaseBuffer();
int nPosIndex = strCurrentPath.ReverseFind('//');
strConfigPath = strCurrentPath.Left(nPosIndex) + _T("//Config.ini");
GetPrivateProfileString(strAppName, strKeyName, _T(""), szValue, MAX_PATH, strConfigPath);
strValue = szValue;
return strValue;
}