###User Defined Function###
_WinAPI_GetStdHandle

###Description###
Retrieves a handle for the standard input, standard output, or standard error device

###Syntax###
#include <WinAPI.au3>
_WinAPI_GetStdHandle ( $iStdHandle )


###Parameters###
@@ParamTable@@
$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
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	Handle to the specified device
Failure:	(-1), call <a href="_WinAPI_GetLastError.htm">_WinAPI_GetLastError()</a> to get extended error information
@@End@@


###Remarks###
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.


###Related###


###See Also###
@@MsdnLink@@ GetStdHandle
