函数参考


_WinAPI_GetProcessWindowStation

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

#Include <WinAPIEx.au3>
_WinAPI_GetProcessWindowStation ( )

参数

None.

返回值

Success Handle to the window station for the current process.
失败: 返回 0 并设置 @error 标志为非 0 值.

注意/说明

Do not close the handle returned by this function.

相关

详情参考

在MSDN中搜索


示例/演示


#Include <APIConstants.au3>
#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

Global $hObj[2] = [_WinAPI_GetProcessWindowStation(), _WinAPI_GetThreadDesktop(_WinAPI_GetCurrentThreadID())]

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