orbit(走了走了): 返回值如果大于2就是进程的HINSTANCE句柄 对这句话表示怀疑。 ========================================================== Return ValueReturns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. The following table lists the error values. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however. The only thing that can be done with the returned HINSTANCE is to cast it to an int and compare it with the value 32 or one of the error codes below
对这句话表示怀疑。
==========================================================
Return ValueReturns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. The following table lists the error values. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however. The only thing that can be done with the returned HINSTANCE is to cast it to an int and compare it with the value 32 or one of the error codes below
请问 CreateProcess 能否 打开 .msi 的文件?
我是想监视一下 某些 安装程序
我是XP系统谢谢
请问能监视到 .msi 启动的安装进程吗?
谢谢!
我也想用CreateProcess来,但是似乎是不行
只能繁琐点咯SHELLEXECUTEINFO ShExecInfo;
ZeroMemory( &ShExecInfo, sizeof( SHELLEXECUTEINFO ) );
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = szFilePath;
ShExecInfo.lpParameters = szParam;
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_HIDE;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
HWND hWnd = ::FindWindow("MsiDialogCloseClass",NULL);
WaitForSingleObject(ShExecInfo.hProcess, INFINITE);其中szFilePath为文件全路径,szParam为该文件所带的参数