I wrote a simple vb app, read all the documents relating to service application .
and um... I used SRVANY.EXE and installed and ran the service successfully, wrote a "message subclassing" and captured WM_ENDSESSION and WM_QUERYENDSESSION and used "DefWindowProc" function for these messages. the app worked pretty well as a service and never unloaded during log-off's !

* The problems is , that after I log-off and log-on to system again , the main program have some GUI probs , the main window won't close ( "x" button ).

note that I tested it with that free OCX ! but I got the same problem !

what should I do with this prob ?
please help :>
thanks