The WinExec function runs the specified application.
This function is provided for compatibility with earlier versions of Windows. For Win32-based applications, use the CreateProcess function.
UINT WinExec(
LPCSTR lpCmdLine, |
// address of command line |
UINT uCmdShow |
// window style for new application |
); |
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. |
Win32-based applications should use the CreateProcess function rather than this function. The WinExec function exists in Win32 to provide compatibility with earlier versions of Windows. For more information about how the WinExec function is implemented, see the Remarks section of the LoadModule function.
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.
CreateProcess, GetMessage, GetSystemDirectory, GetWindowsDirectory, LoadModule, ShowWindow
file: /Techref/os/win/api/win32/func/src/f91_14.htm, 4KB, , updated: 2000/4/7 11:19, local time: 2024/12/3 22:18,
3.15.17.60:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/Techref/os/win/api/win32/func/src/f91_14.htm"> WinExec</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.