获取当前路径
void GetCurrentDir( char * pPathName )
...{
char PathName[MAX_PATH];
char *p = NULL;
GetModuleFileName( NULL , PathName , MAX_PATH);
// (strrchr(filename,''))[1] = 0 ;
p = strrch(PathName,'');
// filename[strlen(filename)-1] = 0;
strncpy(pPathName, PathName, p-PathName);
pPathName[p-PathName] = 0;
return ;
}
...{
char PathName[MAX_PATH];
char *p = NULL;
GetModuleFileName( NULL , PathName , MAX_PATH);
// (strrchr(filename,''))[1] = 0 ;
p = strrch(PathName,'');
// filename[strlen(filename)-1] = 0;
strncpy(pPathName, PathName, p-PathName);
pPathName[p-PathName] = 0;
return ;
}