//获取ini配置文件完全名称
CHAR FilePath[255];
void CTenergyurlAccess::GetFilePath()
{
memset(FilePath, 0, sizeof(FilePath));
CHAR sFilePath[MAX_PATH];
GetModuleFileName( NULL, sFilePath, MAX_PATH );
char * p=strrchr(sFilePath, '\\');
if (p)
{
*(p+1)=0;
strcat(sFilePath, "driver\\EnergyUrl.ini");
}
memcpy(FilePath,sFilePath,strlen(sFilePath));
//Trace2Logger("ini配置文件:%s", FilePath);
}
LPCSTR GetModuleDir()//返回路径有后斜杠
{
static char dir[_MAX_FNAME]={0};
if (dir[0])
return dir;
GetModuleFileName(NULL, dir, sizeof(dir));
char* pEnd = strrchr(dir, '\\');
if (pEnd) pEnd[1] = 0;
return dir;
}