- WIN32_FIND_DATA fd;
- HANDLE hd=INVALID_HANDLE_VALUE;
- int iCount = 20;
- while(iCount--)
- {
- hd=::FindFirstFile(lpCmdLine,&fd);
- Sleep(500);
- if(INVALID_HANDLE_VALUE!=hd) break;
- }
- if(0==iCount) return 0;
- FindClose(hd);
- SHELLEXECUTEINFO ShExeInfo={0};
- ShExeInfo.cbSize=sizeof(SHELLEXECUTEINFO);
- ShExeInfo.fMask=SEE_MASK_NOCLOSEPROCESS;
- ShExeInfo.hwnd=NULL;
- ShExeInfo.lpVerb=NULL;
- ShExeInfo.lpFile=lpCmdLine
- ShExeInfo.lpParameters=L“”;
- ShExeInfo.lpDirectory=NULL;
- ShExeInfo.nShow=SW_SHOW;
- ShExeInfo.hInstApp=NULL;
- ShellExecuteEx(&ShExeInfo);
- return 0;
如果我要运行wince下面nand里面的文件,怎么指定呢,试了半天也没有成功。感觉就是更改ShExeInfo.lpFile=lpCmdLine
ShExeInfo.lpParameters=L“”;谁做过,给个具体的例子,怎么设置