|
引用 3 楼 crearo 的回复:
我试了各个文件夹如_T(".\\")等都是返回3,
ERROR_PATH_NOT_FOUND The specified path was not found.
郁闷啊,不知道咋整了。。
如果是path not found,试试这个:
- SHELLEXECUTEINFO ShExecInfo = {0};
- ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
- ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
- ShExecInfo.hwnd = NULL;
- ShExecInfo.lpVerb = _T("open");
- ShExecInfo.lpFile = _T("fexplore.exe");
- //注意这里是Personal, 不是"个人". 在中文上面, 显示的是"个人",但实际目录是Personal.
- //fexplore.exe在显示的时候做了转换,实际上没有"个人"这个目录
- ShExecInfo.lpParameters = _T("\\My Documents\\Personal");
- ShExecInfo.lpDirectory = NULL;
- ShExecInfo.nShow = SW_SHOW;
- ShExecInfo.hInstApp = NULL;
- BOOL bRet = ShellExecuteEx(&ShExecInfo);
复制代码 |
|