Retrieves a handle for the standard input, standard output, or standard error device
#include <WinAPIHObj.au3>
_WinAPI_GetStdHandle ( $iStdHandle )
$iStdHandle | Standard device for which a handle is to be returned. This can be one of the following values: 0 - Handle to the standard input device 1 - Handle to the standard output device 2 - Handle to the standard error device |
Success: | Handle to the specified device |
Failure: | (-1), call _WinAPI_GetLastError() to get extended error information |
The handle has GENERIC_READ and GENERIC_WRITE access rights, unless the application has used SetStdHandle to set a standard handle with lesser access.
If an application does not have associated standard handles, the return value is 0.
Search GetStdHandle in MSDN Library.