Click here to Skip to main content
16,012,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ShellExecute and File Properties Pin
User 127827-Mar-04 4:10
User 127827-Mar-04 4:10 
GeneralRe: ShellExecute and File Properties Pin
Neha6-Mar-04 22:01
Neha6-Mar-04 22:01 
GeneralRe: ShellExecute and File Properties Pin
Prakash Nadar6-Mar-04 23:31
Prakash Nadar6-Mar-04 23:31 
GeneralRe: ShellExecute and File Properties Pin
Neha7-Mar-04 16:53
Neha7-Mar-04 16:53 
GeneralRe: ShellExecute and File Properties Pin
BaldwinMartin6-Mar-04 23:56
BaldwinMartin6-Mar-04 23:56 
GeneralRe: ShellExecute and File Properties Pin
User 127827-Mar-04 4:09
User 127827-Mar-04 4:09 
GeneralRe: ShellExecute and File Properties Pin
User 127827-Mar-04 4:12
User 127827-Mar-04 4:12 
GeneralRe: ShellExecute and File Properties Pin
Anonymous7-Mar-04 5:18
Anonymous7-Mar-04 5:18 
SHELLEXECUTEINFO


typedef struct _SHELLEXECUTEINFO{
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCTSTR lpVerb;
LPCTSTR lpFile;
LPCTSTR lpParameters;
LPCTSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;

// Optional members
LPVOID lpIDList;
LPCSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
HANDLE hIcon;
HANDLE hProcess;
} SHELLEXECUTEINFO, FAR *LPSHELLEXECUTEINFO;


Contains information used by the ShellExecuteEx function.

cbSize
Size of the structure, in bytes.
fMask
Array of flags that indicate the content and validity of the other structure members. This can be a combination of the following values: SEE_MASK_CLASSKEY Use the class key given by the hkeyClass member.
SEE_MASK_CLASSNAME Use the class name given by the lpClass member.
SEE_MASK_CONNECTNETDRV Validate the share and connect to a drive letter. The lpFile member is a Universal Naming Convention (UNC) path of a file on a network.
SEE_MASK_DOENVSUBST Expand any environment variables specified in the string given by the lpDirectory or lpFile member.
SEE_MASK_FLAG_DDEWAIT Wait for the DDE conversation to terminate before returning (if the ShellExecuteEx function causes a DDE conversation to start).
SEE_MASK_FLAG_NO_UI Do not display an error message box if an error occurs.
SEE_MASK_HOTKEY Use the hot key given by the dwHotKey member.
SEE_MASK_ICON Use the icon given by the hIcon member.
SEE_MASK_IDLIST Use the item identifier list given by the lpIDList member.
SEE_MASK_INVOKEIDLIST Use the item identifier list given by the lpIDList member to invoke an application. If this member is NULL, the function creates an item identifier list and invokes the application. This flag overrides the SEE_MASK_IDLIST flag.
SEE_MASK_NOCLOSEPROCESS Leave the process running after the ShellExecuteEx function exits. The hProcess member receives the handle to the process.

hwnd
Window handle to any message boxes that the system may produce while executing this function.
lpVerb
Address of a string specifying the name of a verb. The verb specifies an action for the application to perform. This member defaults to Open if no verb is specified.
lpFile
Address of a null-terminated string that specifies the name of the file to open or print. The function can open an executable file or a document file, but it can only print a document file. If the path is not included with the name, the current directory is assumed.
lpParameters
Address of a null-terminated string containing the application parameters. The parameters must be separated by spaces. To include double quotation marks, you must enclose the marks in double quotation marks, as in the following example:
sei.lpParameters = "An example: \"\"\"quoted text\"\"\"";

In this case, the application receives three parameters: An, example:, and "quoted text".

If the lpFile member specifies a document file, this member should be NULL.

lpDirectory
Address of a null-terminated string that specifies the name of the working directory. If this member is not specified, the current directory is used as the working directory.
nShow
Show flags. Can be one of the SW_ values described for theShowWindow function. If the lpFile specifies an executable file, this member specifies how the application is to be shown when it is opened.
hInstApp
Receives a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. Error values can be one of the following: SE_ERR_FNF File not found.
SE_ERR_PNF Path not found.
SE_ERR_ACCESSDENIED Access denied.
SE_ERR_OOM Out of memory.
SE_ERR_DLLNOTFOUND Dynamic-link library not found.
SE_ERR_SHARE Cannot share an open file.
SE_ERR_ASSOCINCOMPLETE File association information not complete.
SE_ERR_DDETIMEOUT DDE operation timed out.
SE_ERR_DDEFAIL DDE operation failed.
SE_ERR_DDEBUSY DDE operation is busy.
SE_ERR_NOASSOC File association not available.

lpIDList
Address of an ITEMIDLIST structure to contain an item identifier list uniquely identifying the file to execute. This member is ignored if the fMask member is not set to SEE_MASK_IDLIST.
lpClass
Address of a null-terminated string specifying the name of a file class or a globally unique identifier (GUID).This member is ignored if fMask is not set to SEE_MASK_CLASSNAME.
hkeyClass
Handle to the registry key for the file class. This member is ignored if fMask is not set to SEE_MASK_CLASSKEY.
dwHotKey
Hot key to associate with the application. The low-order word is the virtual key code, and the high-order word is a modifier flag (HOTKEYF_). For a list of modifier flags, see the description of theWM_SETHOTKEY message. This member is ignored if fMask is not set to SEE_MASK_HOTKEY.
hIcon
Handle to the icon for the file class. This member is ignored if fMask is not set to SEE_MASK_ICON.
hProcess
Handle to the newly started application. This member is set on return and is always NULL if fMask is not set to SEE_MASK_NOCLOSEPROCESS.
GeneralRe: ShellExecute and File Properties Pin
BaldwinMartin7-Mar-04 10:05
BaldwinMartin7-Mar-04 10:05 
GeneralRe: ShellExecute and File Properties Pin
User 127828-Mar-04 15:06
User 127828-Mar-04 15:06 
GeneralDialog Boxes Pin
ronaldog6-Mar-04 19:42
ronaldog6-Mar-04 19:42 
GeneralRe: Dialog Boxes Pin
Prakash Nadar6-Mar-04 20:51
Prakash Nadar6-Mar-04 20:51 
QuestionCrop large file without temp file? Pin
pidhead6-Mar-04 19:26
pidhead6-Mar-04 19:26 
AnswerRe: Crop large file without temp file? Pin
Neville Franks6-Mar-04 21:06
Neville Franks6-Mar-04 21:06 
GeneralRe: Crop large file without temp file? Pin
Prakash Nadar6-Mar-04 21:37
Prakash Nadar6-Mar-04 21:37 
GeneralRe: Crop large file without temp file? Pin
Neville Franks6-Mar-04 22:19
Neville Franks6-Mar-04 22:19 
GeneralRe: Crop large file without temp file? Pin
Prakash Nadar7-Mar-04 0:04
Prakash Nadar7-Mar-04 0:04 
GeneralRe: Crop large file without temp file? Pin
Michael Dunn7-Mar-04 6:29
sitebuilderMichael Dunn7-Mar-04 6:29 
GeneralRe: Crop large file without temp file? Pin
Alexander M.,7-Mar-04 10:15
Alexander M.,7-Mar-04 10:15 
GeneralRe: Crop large file without temp file? Pin
Neville Franks7-Mar-04 11:50
Neville Franks7-Mar-04 11:50 
GeneralRef Counting Pin
monrobot136-Mar-04 18:52
monrobot136-Mar-04 18:52 
GeneralRe: Ref Counting Pin
Neville Franks6-Mar-04 21:10
Neville Franks6-Mar-04 21:10 
GeneralRe: Ref Counting Pin
monrobot137-Mar-04 2:25
monrobot137-Mar-04 2:25 
GeneralPassing information among different views Pin
DaBears6-Mar-04 17:53
DaBears6-Mar-04 17:53 
GeneralRe: Passing information among different views Pin
Neville Franks6-Mar-04 21:16
Neville Franks6-Mar-04 21:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.