[rc5] Problem running v2.002 client as a NT service

Bill Plein bill at diablo.net
Fri Jul 11 21:07:00 EDT 1997

>When I installed the 2.002 client as a NT service using rc5srv, the
>service was created successfully. I turned it into "automatic startup",
>and it did get started on boot up. But the problem is, whenever a user
>session is logged out, the client would stop, saying in the log that
>"shutdown message received... Shutting service". Is this normal? FYI, we
>run Novell Intranetware Client for NT here. If the machine is rebooted,
>the service would start up fine again (and get killed upon a session
>logout...). The ideal is of course for the service to ignore any signal
>from a user session...

I have noticed the same thing, using either RC5SRV or the NT Resource Kit's

Here is a note from the SRVANY.WRI file in the Resource kit:
Programming Considerations:

For WIN32 graphical applications: when the currently logged-in user is
logging-off, all WIN32 top-level windows receive WM_QUERYENDSESSION and
WM_ENDSESSION messages. Some WIN32 applications choose to terminate upon
receipt of such messages. In order for your WIN32 application to survive
logoff, it must not do that: instead, your windows procedure should call
the default windows procedure on these messages.

For WIN32 Console (i.e. character-mode) applications: when the currently
logged-in user is logging-off, all Console applications receive a
CTRL_LOGOFF_EVENT event from the Console. 
If your Console application has registered a Console event handler (via
SetConsoleCtrlHandler), it must ignore CTRL_LOGOFF_EVENT in order  to
survive the logoff.

Do you think that the WIN32 version of RC5V2 could be re-written to fit the
above description (if this is, in fact, what is going on?)

Bill Plein
bill at diablo.net
To unsubscribe, send email to majordomo at llamas.net with 'unsubscribe rc5' in the body.

More information about the rc5 mailing list