AIT_Exec
- Organization of this page
Description
Executes a specified application file.
Format
bool AIT_Exec ( string strExeName, // Application filename integer nShowState // Displayed );
Parameters
strExeName (input)
Specify an application filename.
nShowState (input)
Specify how to display the application. You have to specify one of the following values.
Value |
Description |
---|---|
SW_HIDE |
Does not display the application. |
SW_SHOWNORMAL or SW_NORMAL |
Normally displays the application. |
SW_SHOWMINIMIZED |
Minimize the application. |
SW_SHOWMAXIMIZED or SW_MAXIMIZE |
Maximizes the application. |
SW_SHOWNOACTIVATE |
Normally displays the application with no focus. |
SW_SHOWMINNOACTIVE |
Minimizes the application with no focus. |
Return values
The return value is true if the function was executed normally, and false if not.
If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:
Extended error number |
Error code |
---|---|
2 |
ERROR_FILE_NOT_FOUND |
3 |
ERROR_PATH_NOT_FOUND |
5 |
ERROR_ACCESS_DENIED |
8 |
ERROR_NOT_ENOUGH_MEMORY |
14 |
ERROR_OUTOFMEMORY |
21 |
ERROR_NOT_READY |
87 |
ERROR_INVALID_PARAMETER |
123 |
ERROR_INVALID_NAME |