CString strIP;
GetPrivateProfileString(_T("DataBase"), _T("IP"), _T(""), strIP.GetBufferSetLength(MAX_PATH), MAX_PATH, getPath() + "//config.ini");
strIP.ReleaseBuffer();
strIP.TrimLeft();
strIP.TrimRight();
//------------------------------函数--------------------------------------
static CString getPath()
{
CString sPath;
GetModuleFileName(NULL, sPath.GetBufferSetLength(MAX_PATH + 1), MAX_PATH);
sPath.ReleaseBuffer();
int nPos;
nPos = sPath.ReverseFind('//');
sPath = sPath.Left(nPos);
return sPath;
}