This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Performs an operation on a specified file.
The function opens or prints a specified file.
The file can be an executable file or a document file.
Syntax
hInstance = OS_ShellExecute(Operation, File, Parameters, Directory, ShowCmd)
Returns
If the function succeeds, it returns a value greater than 32. If the function fails, it returns an error value that indicates the cause of the failure. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however.
Parameters
Name |
Type |
Optional |
Meaning |
||||||||||||||||||||||||||
Operation |
String |
No |
A string specifying the operation to perform. This string can be "open" or "print". |
||||||||||||||||||||||||||
File |
String |
No |
A string specifying the file to open |
||||||||||||||||||||||||||
Parameters |
String |
No |
A string specifying parameters passed to the application when the File parameter specifies an executable file. If File is a string specifying a document file, this parameter is an empty string. |
||||||||||||||||||||||||||
Directory |
String |
No |
a string specifying the default directory. |
||||||||||||||||||||||||||
ShowCmd |
One of the following equates:
|
Remarks
More info can be found at: http://msdn.microsoft.com/en-us/library/bb762153(v=vs.85).aspx
Restrictions
Please consider OS_Shell function for executing process synchronously or asynchronously.
See also
Windows API reference, OS_Shell
Examples