术语 | getthreaddesktop |
释义 | GetThreadDesktop 语法: C++ HDESK WINAPI GetThreadDesktop( __in DWORD dwThreadId ); GetThreadDesktop功能 检索句柄分配给指定的线程在桌面上。 参数 dwThreadId [in] 句柄到线程。该GetCurrentThreadId和CreateProcess的函数将返回线程标识符。 返回值 如果函数成功,返回值是一个句柄与指定的线程相关的桌面上。您并不需要调用CloseDesktop函数关闭返回的句柄。 如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。 备注 该系统与相关联时,该线程创建一个线程桌面。线程可以使用SetThreadDesktop函数改变其桌面。与线程相关的桌面必须用线程的进程相关联的窗口站。 调用进程可以使用返回的处理向GetUserObjectInformation,GetUserObjectSecurity,SetUserObjectInformation,并SetUserObjectSecurity函数调用。 一个服务应用程序创建一个相关的窗口站和桌面,因此没有必要调用用户或GDI函数连接到一个服务窗口站和桌面。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinuser.h(头文件:winuser.h) LibraryUser32.lib DLLUser32.dll 参见 台式机 GetCurrentThreadId GetProcessWindowStation GetUserObjectInformation GetUserObjectSecurity SetProcessWindowStation SetThreadDesktop SetUserObjectInformation SetUserObjectSecurity 窗口站和桌面功能 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==GetThreadDesktop Function Retrieves a handle to the desktop assigned to the specified thread. Syntax C++ HDESK WINAPI GetThreadDesktop( __in DWORD dwThreadId ); Parameters dwThreadId [in] A handle to the thread. The GetCurrentThreadId and CreateProcess functions return thread identifiers. Return Value If the function succeeds, the return value is a handle to the desktop associated with the specified thread. You do not need to call the CloseDesktop function to close the returned handle. If the function fails, the return value is NULL. To get extended error information, call GetLastError . Remarks The system associates a desktop with a thread when that thread is created. A thread can use the SetThreadDesktop function to change its desktop. The desktop associated with a thread must be on the window station associated with the thread's process. The calling process can use the returned handle in calls to the GetUserObjectInformation , GetUserObjectSecurity , SetUserObjectInformation , and SetUserObjectSecurity functions. A service application is created with an associated window station and desktop, so there is no need to call a USER or GDI function to connect the service to a window station and desktop. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinuser.h (include Windows.h) LibraryUser32.lib DLLUser32.dll See Also Desktops GetCurrentThreadId GetProcessWindowStation GetUserObjectInformation GetUserObjectSecurity SetProcessWindowStation SetThreadDesktop SetUserObjectInformation SetUserObjectSecurity Window Station and Desktop Functions Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms683232(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。