An application can use the ShellExecuteEx function to open a file or folder. ShellExecuteEx contains one parameter, lpExecInfo, which is a pointer to the SHELLEXECUTEINFO structure. This structure contains and receives data about the application executed, including what actions to perform on the specified file or folder. The following code example shows the prototype for the SHELLEXECUTEINFO structure.
typedef struct _SHELLEXECUTEINFO {
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCSTR lpVerb;
LPCSTR lpFile;
LPCSTR lpParameters;
LPCSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;
// Optional members
LPVOID lpIDList;
LPCSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
HANDLE hIcon;
HANDLE hProcess;
} SHELLEXECUTEINFO, FAR *LPSHELLEXECUTEINFO;
In Windows CE, the lpVerb, lpIDList, lpClass, hkeyClass, dwHotKey, and hIcon members are ignored.