OS_ShellExecute
<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > OS (Operating System) > OS_ShellExecute |
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