Funktionreferenz


_WinAPI_GetProcessWindowStation


Retrieves a handle to the current window station for the calling process

#include <WinAPISys.au3>
_WinAPI_GetProcessWindowStation ( )

Parameter

None.

Rückgabewert

Success: Handle to the window station for the current process.
Failure: 0, call _WinAPI_GetLastError() to get extended error information.

Bemerkungen

Do not close the handle returned by this function.

Siehe auch

Suche nach GetProcessWindowStation in der MSDN Bibliothek.

Beispiel

#include <APISysConstants.au3>
#include <WinAPIProc.au3>
#include <WinAPISys.au3>

Local $a_hObj[2] = [_WinAPI_GetProcessWindowStation(), _WinAPI_GetThreadDesktop(_WinAPI_GetCurrentThreadId())]

For $i = 0 To 1
    If Not $i Then
        ConsoleWrite('-------------------------------' & @CRLF)
    EndIf
    ConsoleWrite('Handle: ' & $a_hObj[$i] & @CRLF)
    ConsoleWrite('Typ:    ' & _WinAPI_GetUserObjectInformation($a_hObj[$i], $UOI_TYPE) & @CRLF)
    ConsoleWrite('Name:   ' & _WinAPI_GetUserObjectInformation($a_hObj[$i], $UOI_NAME) & @CRLF)
    ConsoleWrite('-------------------------------' & @CRLF)
Next