GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Four — Flow Control (continued)
Overview
The GetProcessExitCode function will retrieve a process’ termination status.
Syntax/Parameters
Syntax
dword = GetProcessExitCode ( handle hObject );
Parameters
hObject
A handle to a compatible object.
Return Value
Returns a dword as a code or a formatted error code on failure. Use the GetLastError function to retrieve error information.
Remarks
This function will return immediately and not wait for the process to complete. Checking a process that is still running will result in a code of STILL_ACTIVE (259) with a companion formatted error code in the last error buffer. A script cannot check the process status of a process for which it does not have access rights.
The GetProcessExitCode function returns the process’ exit code as defined by the process itself only after the process terminates. A foreign application should not use STILL_ACTIVE (259) as an exit code, but this may be beyond the control of the programmer. Using this function to test for the completion of a process within a loop may result in an infinite loop if the process returns STILL_ACTIVE (259); therefore, the WaitForObject function is preferable to testing whether a process is still running.
The GetLastError function must be used to differentiate between a formatted error code caused by the GetProcessExitCode function failing or a process return value that appears as a formatted error code.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.