术语 | setthreaddesktop |
释义 | SetThreadDesktop 语法: C++ BOOL WINAPI SetThreadDesktop( __in HDESK hDesktop ); SetThreadDesktop函数 分配给指定的桌面上调用线程。在桌面上使用访问桌面授予权利的所有后续行动。 参数 hDesktop [in] 句柄到桌面分配给调用线程。这种处理是由CreateDesktop,GetThreadDesktop,OpenDesktop,或OpenInputDesktop函数返回。 这桌面必须与该进程的当前窗口站。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 该SetThreadDesktop函数将失败如果调用线程有任何窗户或在其目前的桌面钩(除非hDesktop参数是一个句柄,当前的桌面)。 警告有任何重大的安全风险服务打开一个在交互式桌面上的窗口。通过打开桌面窗口,服务使自己容易受到攻击的登录用户,其应用程序可以发送恶意消息发送到服务的桌面窗口,影响其功能。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinuser.h(头文件:winuser.h) LibraryUser32.lib DLLUser32.dll 参见 CreateDesktop 台式机 GetThreadDesktop OpenDesktop SetProcessWindowStation 窗口站和桌面功能 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==SetThreadDesktop Function Assigns the specified desktop to the calling thread. All subsequent operations on the desktop use the access rights granted to the desktop. Syntax C++ BOOL WINAPI SetThreadDesktop( __in HDESK hDesktop ); Parameters hDesktop [in] A handle to the desktop to be assigned to the calling thread. This handle is returned by the CreateDesktop , GetThreadDesktop , OpenDesktop , or OpenInputDesktop function. This desktop must be associated with the current window station for the process. 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 . Remarks The SetThreadDesktop function will fail if the calling thread has any windows or hooks on its current desktop (unless the hDesktop parameter is a handle to the current desktop). Warning There is a significant security risk for any service that opens a window on the interactive desktop. By opening a desktop window, a service makes itself vulnerable to attack from the logged-on user, whose application could send malicious messages to the service's desktop window and affect its ability to function. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinuser.h (include Windows.h) LibraryUser32.lib DLLUser32.dll See Also CreateDesktop Desktops GetThreadDesktop OpenDesktop SetProcessWindowStation Window Station and Desktop Functions Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms686250(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。