Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get notified in VC6 about workstation unlocking

Posted on 2004-10-21
2
Medium Priority
?
706 Views
Last Modified: 2013-11-20
I need to be notified every time the user unlocks the workstation.

Ok, in VC7 I can register my window using WTSRegisterSessionNotification to be able to proccess in its WindowProc the message WM_WTSSESSION_CHANGE, whose parameters can tell me about locking/unlocking of the workstation.
But this requires VC7, XP...

Is there any way to know that in previous OSs & VC6?

0
Comment
Question by:Hernan_Berguan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 375 total points
ID: 12372101
You could simply write your own Winlogon Notification Package - see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/winlogon_notification_packages.asp ("Winlogon Notification Packages"). It basically boils down to creating a DLL that has the following functionality

//Event handler for the Winlogon Logon event
VOID WLEventUnlock(PWLX_NOTIFICATION_INFO pInfo)
{
   //Print the name of the handler to debug output.
   //You can replace this with more useful functionality.
   OutputDebugString (TEXT("NOTIFY:  Entering WLEventUnlock.\r\n"));
}

and is registered with the system under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify

DllName = mynotifdll.dll
Unlock = "WLEventUnlock"

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question