UDF > WinAPIEx > System > Station & Desktop >


_WinAPI_GetProcessWindowStation

Obtient le handle de la station window courante pour le processus appelant

#include <WinAPISys.au3>
_WinAPI_GetProcessWindowStation ( )

Valeur de retour

Succès: Retourne le handle de la station window pour le processus courant.
Échec: Retourne 0, appelez _WinAPI_GetLastError() pour obtenir des informations sur l'erreur.

Remarque

Ne fermez pas le handle retournée par cette fonction.

Voir aussi

Consultez GetProcessWindowStation dans la librairie MSDN.

Exemple

#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('Type:   '& _WinAPI_GetUserObjectInformation($a_hObj[$i], $UOI_TYPE) & @CRLF)
    ConsoleWrite('Nom:   '& _WinAPI_GetUserObjectInformation($a_hObj[$i], $UOI_NAME) & @CRLF)
    ConsoleWrite('-------------------------------'& @CRLF)
Next