Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Handeling Login and Logout

Posted on 2003-03-05
5
Medium Priority
?
287 Views
Last Modified: 2013-11-20
I am trying to write a service application which will log Login time and logout time ot a file  If any knows anything in connectin to this plz let me know

I would like to know specificaly how can we track a Logoff and Login even

thanks in advance
Alex
0
Comment
Question by:alexthombra
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 600 total points
ID: 8071623
>>I would like to know specificaly how can we track a Logoff and Login even

What about using Winlogon Notification Packages? You'd basically build a Dll that exports

//Event handler for the Winlogon Logon event
VOID WLEventLogon (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 WLEventLogon.\r\n"));
}

//Event handler for the Winlogon Logoff event.
VOID WLEventLogoff (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 WLEventLogff.\r\n"));
}

and register it under build that dll and register it under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify as

DllName = mynotify.dll
Logon = "WLEventLogon"
Logoff = "WLEventLogoff"

See also http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/winlogon_notification_package_reference.asp ("Winlogon Notification Package Reference")
0
 
LVL 86

Expert Comment

by:jkr
ID: 11641348
I'd say this Q is answered.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

572 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