Group: Shell Functions - Library: shell32
How to display the Properties dialog box for a file (ShellExecuteEx)
BOOL ShellExecuteEx(
LPSHELLEXECUTEINFO lpExecInfo
);
DECLARE INTEGER ShellExecuteEx IN Shell32;
STRING @lpExecInfo
lpExecInfo Address of a SHELLEXECUTEINFO structure that contains and receives information about the application being executed.
Returns TRUE if successful, or FALSE otherwise.
lpVerb in SHELLEXECUTEINFO Structure:
String, referred to as a verb, that specifies the action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
cBuffer = num2dword(INFO_SIZE) +;
num2dword(nFlag) +;
num2dword(hWindow) +;
num2dword(oVerb.GetAddr()) +;
num2dword(oFile.GetAddr()) +;
Repli(Chr(0), 40)
= ShellExecuteEx(@cBuffer)
The following verbs are commonly used:
edit
Launches an editor and opens the document for editing.
explore
Explores the folder specified by lpFile.
find
Initiates a search starting from the specified directory.
open
Opens the file specified by the lpFile parameter. The file can be an executable file, a document file, or a folder.
print
Prints the document file specified by lpFile.
properties
Displays the file or folder's properties.