Windows NT Service Shutdown Problem
Posted on 2004-04-28
I am coding a Windows NT Service that gathers realtime data from a radio receiver. On shutdown it must send the command via TCP/IP to the receiver telling it to quit sending realtime data back. This works fine when shutting down from the admin->Services stop control, but when shutting down it refuses to send the command to the receiver. I have verified that my code is set up to watch for the SERVICE_CONTROL_SHUTDOWN and it does the same thing it does when it receives SERVICE_CONTROL_STOP, so it should basically work the identical way. I have tried working with different group names and dependencies to make sure TCP/IP is not shutting down before the service is told to shut down, but to no avail. Does anyone know why this might not be shutting down properly when windows shuts down?