网站首页  词典首页

请输入您要查询的函数:

 

术语 getuserobjectinformation
释义 GetUserObjectInformation
语法:
C++
BOOL WINAPI GetUserObjectInformation(
__in HANDLE hObj,
__in int nIndex,
__out_opt PVOID pvInfo,
__in DWORD nLength,
__out_opt LPDWORD lpnLengthNeeded
);
GetUserObjectInformation功能
检索信息站的指定窗口或桌面对象。
参数
hObj [in]
句柄的窗口站和桌面对象。这种处理是由CreateWindowStation,OpenWindowStation,CreateDesktop,或OpenDesktop函数返回。
nIndex [in]
资料检索。该参数可以是下列值之一。
ValueMeaning
UOI_FLAGS
1Returns处理标志。该pvInfo参数必须指向一个USEROBJECTFLAGS结构。
UOI_HEAPSIZE
5Returns受ULONG值包含在桌面堆的大小以字节为单位。
Windows Server 2003和Windows XP/2000操作系统:此值不支持。
UOI_IO
6Returns TRUE,如果该hObj参数是一个句柄桌面对象是接受用户的输入。
Windows Server 2003和Windows XP/2000操作系统:此值不支持。
UOI_NAME
2Returns一个包含对象的名称。
UOI_TYPE
3Returns一个包含对象类型的名称。
UOI_USER_SID
4Returns SID结构,指的是目前正在与指定对象相关的用户。如果没有用户与对象关联的值在缓冲区返回指向lpnLengthNeeded是零。请注意,SID是一个可变长度的结构。您通常要呼叫GetUserObjectInformation确定SID的长度才能取出它的价值。
pvInfo [指出,可选]
一个缓冲区指针接收对象的信息。
nLength [in]
缓冲区的大小指向的pvInfo参数,以字节为单位。
lpnLengthNeeded [指出,可选]
对变量的接收所需要的存储要求的信息的字节数的指针。如果这个变量的值大于函数返回时,函数返回FALSE,和信息都被复制到pvInfo缓冲nLength参数值。如果变量的值指向lpnLengthNeeded小于或等于nLength价值,整个信息块被复制。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
Unicode和ANSI namesGetUserObjectInformationW(Unicode)和GetUserObjectInformationA(ANSI)的
参见
CreateDesktop
CreateWindowStation
GetUserObjectSecurity
OpenDesktop
OpenWindowStation
SetUserObjectInformation
SetUserObjectSecurity
的SID
USEROBJECTFLAGS
窗口站和桌面功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetUserObjectInformation Function
Retrieves information about the specified window station or desktop object.
Syntax
C++
BOOL WINAPI GetUserObjectInformation(
__in HANDLE hObj,
__in int nIndex,
__out_opt PVOID pvInfo,
__in DWORD nLength,
__out_opt LPDWORD lpnLengthNeeded
);
Parameters
hObj [in]
A handle to the window station or desktop object. This handle is returned by the CreateWindowStation , OpenWindowStation , CreateDesktop , or OpenDesktop function.
nIndex [in]
The information to be retrieved. The parameter can be one of the following values.
ValueMeaning
UOI_FLAGS
1Returns handle flags. The pvInfo parameter must point to a USEROBJECTFLAGS structure.
UOI_HEAPSIZE
5Returns a ULONG value containing the size of the desktop heap, in bytes.
Windows Server 2003 and Windows XP/2000: This value is not supported.
UOI_IO
6Returns TRUE if the hObj parameter is a handle to the desktop object that is receiving input from the user.
Windows Server 2003 and Windows XP/2000: This value is not supported.
UOI_NAME
2Returns a string containing the name of the object.
UOI_TYPE
3Returns a string containing the type name of the object.
UOI_USER_SID
4Returns the SID structure that identifies the user that is currently associated with the specified object. If no user is associated with the object, the value returned in the buffer pointed to by lpnLengthNeeded is zero. Note that SID is a variable length structure. You will usually make a call to GetUserObjectInformation to determine the length of the SID before retrieving its value.

pvInfo [out, optional]
A pointer to a buffer to receive the object information.
nLength [in]
The size of the buffer pointed to by the pvInfo parameter, in bytes.
lpnLengthNeeded [out, optional]
A pointer to a variable receiving the number of bytes required to store the requested information. If this variable's value is greater than the value of the nLength parameter when the function returns, the function returns FALSE, and none of the information is copied to the pvInfo buffer. If the value of the variable pointed to by lpnLengthNeeded is less than or equal to the value of nLength, the entire information block is copied.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
Unicode and ANSI namesGetUserObjectInformationW (Unicode) and GetUserObjectInformationA (ANSI)
See Also
CreateDesktop
CreateWindowStation
GetUserObjectSecurity
OpenDesktop
OpenWindowStation
SetUserObjectInformation
SetUserObjectSecurity
SID
USEROBJECTFLAGS
Window Station and Desktop Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683238(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:25:27