?
Solved

Handeling Login and Logout

Posted on 2003-03-05
5
Medium Priority
?
284 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
[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
5 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

771 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