ShellExecuteEx
[Now
Supported on Windows NT]
The ShellExecuteEx
function performs an action on a file. The file can be an executable file or a
document.
WINSHELLAPI BOOL WINAPI ShellExecuteEx(
LPSHELLEXECUTEINFO lpExecInfo |
// pointer to
SHELLEXECUTEINFO structure |
); |
|
Parameters
lpExecInfo
Pointer to a SHELLEXECUTEINFO
Return Values
If the
function succeeds, the return value is nonzero.
If the
function fails, the return value is zero. To get extended error information,
call GetLastError
Remarks
If the
function succeeds, it sets the hInstApp member of the SHELLEXECUTEINFO
Last error
values returned by GetLastError correspond to the SE_ERR_ values and may
be one of the following:
Value |
Meaning |
ERROR_FILE_NOT_FOUND |
The
specified file was not found. |
ERROR_PATH_NOT_FOUND |
The
specified path was not found. |
ERROR_DDE_FAIL |
The DDE
transaction failed. |
ERROR_NO_ASSOCIATION |
There is no
application associated with the given filename extension. |
ERROR_ACCESS_DENIED |
|
ERROR_DLL_NOT_FOUND |
|
ERROR_CANCELLED |
The
function prompted the user for the location of the application, but the user
cancelled the request. |
ERROR_NOT_ENOUGH_MEMORY |
|
ERROR_SHARING_VIOLATION |
A sharing
violation occurred. |
See Also