如题!
解决方案 »
- 对话框小程序代码改动后引起冲突的问题?
- twain的下载地址
- 一个奇怪的数据库连接问题(VC+ADO+SQL SERVER2000)
- CreateWindow在什么情况下返回0??
- 我从CPropertySheet继承了一个累CMySheet,可是通过DoModal显示不出来,想搞成非模态的,Create也总是失败,是怎么回事?我的Page是在OnI
- VC与office版本问题
- 请教:想做一个自动安装程序,在安装应用程序的同时把驱动程序一起安装,请问驱动程序这一块应该怎样处理?
- !!哪儿有水木清华bbs精华下载?
- 如何编程修改IE里的代理服务器地址?
- flounder(比目鱼) 先生请进来领分!(关于:请教:如何判断打印机是彩色的还是黑白的)
- 有什么简单方法一次性将光盘的全部内容复制到硬盘
- 10年了,今天10年一起上高中的同学过来,一起奋斗
The WinExec function runs the specified application. This function is provided for compatibility with 16-bit Windows. Win32-based applications should use the CreateProcess function. UINT WinExec(
LPCSTR lpCmdLine, // address of command line
UINT uCmdShow // window style for new application
);
Parameters
lpCmdLine
Pointer to a null-terminated character string that contains the command line (filename plus optional parameters) for the application to be executed. If the name of the executable file in the lpCmdLine parameter does not contain a directory path, the system searches for the executable file in this sequence:
The directory from which the application loaded.
The current directory.
The Windows system directory. TheGetSystemDirectory function retrieves the path of this directory.
The Windows directory. TheGetWindowsDirectory function retrieves the path of this directory.
The directories listed in the PATH environment variable.
uCmdShow
Specifies how a Windows-based application window is to be shown and is used to supply the wShowWindow member of the STARTUPINFO parameter to the CreateProcess function. For a list of the acceptable values, see the description of the nCmdShow parameter of theShowWindow function. For a non-Windows – based application, the PIF file, if any, for the application determines the window state.
Return Values
If the function succeeds, the return value is greater than 31.If the function fails, the return value is one of the following error values: Value Meaning
0 The system is out of memory or resources.
ERROR_BAD_FORMAT The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).
ERROR_FILE_NOT_FOUND The specified file was not found.
ERROR_PATH_NOT_FOUND The specified path was not found.
Res
In Win32, the WinExec function returns when the started process calls the GetMessage function or a time-out limit is reached. To avoid waiting for the time out delay, call the GetMessage function as soon as possible in any process started by a call to WinExec. See Also
Processes and Threads Overview, Process and Thread Functions, CreateProcess,GetMessage,GetSystemDirectory,GetWindowsDirectory, LoadModule,ShowWindow