This function has the same result as pressing Ctrl+Alt+Del and clicking Lock Workstation. To unlock the workstation, the user must log in. To receive notification when the user logs in, use the WTSRegisterSessionNotification function to receive WM_WTSSESSION_CHANGE messages.
我只是回答他提出的“请问系统会发消息给应用程序么,比如WM之类的?” 至于怎么让程序在window启动时截获这个消息可以把程序写进注册表的一个特定的启动项,并不是RUN这个启动项,RUN是在windows LOG ON 后加载,那个启动项在LOG ON 之前加载,忘记叫什么名字了
比如我的程序运行的时候,用户按ctrl+alt+del锁定计算机,然后又输入密码解锁,这个事件怎么检测?有WM之类的消息么
至于怎么让程序在window启动时截获这个消息可以把程序写进注册表的一个特定的启动项,并不是RUN这个启动项,RUN是在windows LOG ON 后加载,那个启动项在LOG ON 之前加载,忘记叫什么名字了
http://support.microsoft.com/kb/310153/zh-cn
不过vc6需要下新的sdk
谢谢各位回复,结贴了