NTSVC.OCX & Shutdown 
Author Message
 NTSVC.OCX & Shutdown

Hi !

I currently have an application running quite well as a service using the

The problem I can't seem to rectify is that I need to detect shutdown of the
machine the service is running on. The documentation hints that this can be
done, but unless I'm missing something obvious it doesn't seem to work. I
have even added additional Handler in the C++ code for the OCX to fire this
event, but nothing is happening. I need to detect shutdown because the
service needs to do cleaning up of the local machine during the shutdown

In a similar vein, can you detect if a user is physically logged in at the
console of the local machine ?. I need to detect if a user is logged on, and
when they log off do some cleaning up (the same as the shutdown above). If I
can detect that a user is logged on, the app just runs a timer every 60 odd
seconds and when the state changes, ie user logs off, I can then perform my

I really only need to support the logoff process above, but because of the
way NT shuts down the machine, I need to support both actions.

I was thinking of running this as a Systray app, but the cleaning up I do
can't be done until all applications the user is running have exited.

Any Ideas, Comments, Flames etc ?


Glenn Corbett

Sat, 16 Sep 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. NT Service VB, NTSVC.OCX & Systray

2. ntsvc.ocx Any one know where I can find this ocx

3. NTSVC.ocx or NTService.ocx

4. ntsvc.ocx (running VB app as service)

5. HELP: Ntsvc.ocx

6. NTSVC.OCX -- Where can I find it?

7. help of Ntsvc.ocx

8. About the NT Service Control (ntsvc.ocx)

9. Question about the ntsvc ocx control

10. ntsvc.ocx

11. ntsvc.ocx

12. ntsvc.ocx


Powered by phpBB® Forum Software