网站首页  词典首页

请输入您要查询的函数:

 

术语 lockworkstation
释义 LockWorkStation
语法:
C++
BOOL WINAPI LockWorkStation(void);
LockWorkStation函数
锁定工作站的显示。锁定工作站阻止未经授权使用它。
参数
这个函数没有参数。
返回值
如果函数成功,返回值为非零。因为函数执行异步,非零返回值表示,这次行动已经开始。它并不表示该工作站是否已成功锁定。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该LockWorkStation函数调用的,只有在交互式桌面上运行的进程。此外,用户必须登录,并且不能在工作站已被锁定。
该工作站的常见原因可能不被锁定,即使函数成功包括以下内容:没有用户登录时,该工作站已锁定,这个过程并不是在交互式桌面上,或要求运行是由图形识别和验证否认(GINA)的DLL文件。
这个函数有作为按下Ctrl + Alt + Del并单击锁定工作站相同的结果。要解锁工作站,用户必须登录,没有函数可以调用,以确定是否被锁定工作站。收到通知时,用户登录,使用WTSRegisterSessionNotification函数接收WM_WTSSESSION_CHANGE消息。您可以使用会议通知跟踪桌面状态,所以您知道是否有可能与用户交互。
实例
有关示例,请参阅如何锁定工作站。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
系统关机函数
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==LockWorkStation Function
Locks the workstation's display. Locking a workstation protects it from unauthorized use.
Syntax
C++
BOOL WINAPI LockWorkStation(void);
Parameters
This function has no parameters.
Return Value
If the function succeeds, the return value is nonzero. Because the function executes asynchronously, a nonzero return value indicates that the operation has been initiated. It does not indicate whether the workstation has been successfully locked.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The LockWorkStation function is callable only by processes running on the interactive desktop. In addition, the user must be logged on, and the workstation cannot already be locked.
Common reasons the workstation might not be locked even if the function succeeds include the following: no user is logged on, the workstation is already locked, the process is not running on the interactive desktop, or the request is denied by the Graphical Identification and Authentication (GINA) DLL.
This function has the same result as pressing Ctrl+Alt+Del and clicking Lock Workstation. To unlock the workstation, the user must log in. There is no function you can call to determine whether the workstation is locked. To receive notification when the user logs in, use the WTSRegisterSessionNotification function to receive WM_WTSSESSION_CHANGE messages. You can use session notifications to track the desktop state so you know whether it is possible to interact with the user.
Examples
For an example, see How to Lock the Workstation .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
System Shutdown Functions
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa376875(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:23:30