How to capture the logon and logoff events in Windows Vista?
-
Thank you Sir!!!! Its working. Now I can capture the login, logoff, console connect,disconnect events. Using SERVICE_ACCEPT_SESSIONCHANGE I am able to capture the events in the HandlerEx function. Thanks again. With regards, Vaibhav Deshpande.
Vaibhav Deshpande wrote:
Thank you Sir!!!!
You're welcome! And you can call me Mark ;P
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Vaibhav Deshpande wrote:
Thank you Sir!!!!
You're welcome! And you can call me Mark ;P
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
:doh: ;P
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
:doh: ;P
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Sorry, was watching the first Star Wars last weekend, and your comment was straight out of the movie Judy
:-D
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Vaibhav Deshpande wrote:
I have used handlerEx function to capture the on session change event but I m unable to capture the login, logoff events.
What if, after you call RegisterServiceCtrlHandlerEx() to set your HandlerEx() function, you call SetServiceStatus() with SERVICE_ACCEPT_SESSIONCHANGE in the dwControlsAccepted field of the SEVICE_STATUS struct? Do you get the notifications then? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Hi, I am trying to develop Win logOn Notification for Vista. My RegisterServiceCtrlHandlerEx() successfully set my HandelrEx() function however I am not able to receive Lock, Logon and logoff events. Moreover as suggested I am also calling SetServiceStatus() with SERVICE_ACCEPT_SESSIONCHANGE in the dwControlsAccepted field of the SEVICE_STATUS struct. The only notification I am getting at the moment in my HandlerEx() fuction is SERVICE_STOPPED. I am using C# for development. Please help me.
-
Hi, I am trying to develop Win logOn Notification for Vista. My RegisterServiceCtrlHandlerEx() successfully set my HandelrEx() function however I am not able to receive Lock, Logon and logoff events. Moreover as suggested I am also calling SetServiceStatus() with SERVICE_ACCEPT_SESSIONCHANGE in the dwControlsAccepted field of the SEVICE_STATUS struct. The only notification I am getting at the moment in my HandlerEx() fuction is SERVICE_STOPPED. I am using C# for development. Please help me.
If you're using C#, then using the .NET service classes should be easier... Override ServiceBase.OnSessionChange(). Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
If you're using C#, then using the .NET service classes should be easier... Override ServiceBase.OnSessionChange(). Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Thanks Mark :) It works like a charm. Thanks again.
-
If you're using C#, then using the .NET service classes should be easier... Override ServiceBase.OnSessionChange(). Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Hi, I'm also encountering this problem. However, I'm using C++ ... Any idea? Thanks in advance, Moshe.
-
Hi, I'm also encountering this problem. However, I'm using C++ ... Any idea? Thanks in advance, Moshe.
-
Hi, I'm also encountering this problem. However, I'm using C++ ... Any idea? Thanks in advance, Moshe.
"I am trying to develop Win logOn Notification for Vista. My RegisterServiceCtrlHandlerEx() successfully set my HandelrEx() function however I am not able to receive Lock, Logon and logoff events. Moreover as suggested I am also calling SetServiceStatus() with SERVICE_ACCEPT_SESSIONCHANGE in the dwControlsAccepted field of the SEVICE_STATUS struct. The only notification I am getting at the moment in my HandlerEx() fuction is SERVICE_STOPPED." I am using C++ with a generated code using VS2005 of Win32Service, so I call RegisterServiceCtrlHandlerEx() and SetServiceStatus() from within OnStart(). Thanks in advance for your help, Moshe