2010.7.2
1、如何获得当前程序工作目录:
//获得当前工作目录,包括进程
CString dir;
GetModuleFileName(NULL,dir.GetBufferSetLength (MAX_PATH+1),MAX_PATH);
如:d:\Projects\Pioneer\Src\Debug\PnrNetCfg.exe
//获得当前目录
TCHAR *path = new TCHAR[MAX_PATH];
ZeroMemory(path, MAX_PATH);
GetCurrentDirectory(MAX_PATH, path);
如:d:\Projects\Pioneer\Src\PnrNetCfg