函数参考


_WinAPI_GetUserObjectInformation

Retrieves information about the specified window station or desktop object.

#Include <WinAPIEx.au3>
_WinAPI_GetUserObjectInformation ( $hObject, $iIndex )

参数

$hObject Handle to the window station or desktop object.
$iIndex The information to be retrieved. The parameter can be one of the following values.

$UOI_FLAGS
$tagUSEROBJECTFLAGS structure containing information about a window station or desktop handle.

$UOI_HEAPSIZE
The size of the desktop heap, in KB.

$UOI_IO
1 if the object is a handle to the desktop that is receiving input from the user, 0 otherwise.

$UOI_NAME
The name of the object, as a string.

$UOI_TYPE
The type of the object, as a string.

$UOI_USER_SID
The security identifier (SID) structure as "byte[n]".

返回值

Success The object information. Return type depends on the information type (see above).
失败: 返回 0 并设置 @error 标志为非 0 值.

注意/说明

None

相关

详情参考

在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