I'm playing around with controlling access to a PC (W2k) by replacing the registry Shell entry with a VB program. This is done so that I can time the use of the PC (It's for a LAN gaming site) as well as billing, access control etc. The VB prog in turn launches explorer.exe.
Now this seems to work fine until I get to the stage where I wish to kill off explorer. i.e Log out.
I'm using :
Call SendMessage(glHandle, WM_CLOSE, 0&, 0&)
Now when this is tried on explorer.exe I get the "What do you want the computer to do?" Screen that is what you normally receive when you do a Start Menu -> Shutdown.
Any idea how I can get explorer.exe to die more gracefully?