Windows CE 3.0

This function performs an action on a file. The file can be an executable file or a document.



Long pointer to a SHELLEXECUTEINFO structure that contains and receives information about the application being executed.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.


If the function succeeds, it sets the hInstApp member of the SHELLEXECUTEINFO structure to the instance handle to the application that the function started. If the function fails, hInstApp is one of the SE_ERR_ error values indicating the cause of the failure. (An instance handle will always be greater than 32 and an error value less than 32.) Note that the SE_ERR_ error values are for compatibility with the ShellExecute function; use the GetLastError function to retrieve error information.

The error value returned by GetLastError corresponds to the SE_ERR_ values and is one of the values described in the following table.

Value Description
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 file name extension.
ERROR_ACCESS_DENIED Access to the specified file is denied.
ERROR_DLL_NOT_FOUND One of the library files necessary to run the application cant be found.
ERROR_CANCELLED The function prompted the user for the location of the application, but the user canceled the request.
ERROR_NOT_ENOUGH_MEMORY There is not enough memory to perform the specified action.
ERROR_SHARING_VIOLATION A sharing violation occurred.


Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Shellapi.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also


 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.