cygrunsrv && win2k service failure actions

Mike Gerdts Michael.Gerdts@alcatel.com
Mon Mar 18 12:34:00 GMT 2002


Windows 2000 has added "service failure actions" that can be taken when
a service fails.  Details are available at
http://www.win2000mag.com/Articles/Print.cfm?ArticleID=8943 and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnw2k/html/shc.asp

I would find it helpful to be able to use the failure actions (and will
write code to do so), but have a couple stumbling blocks in my way.  

The first problem has to do with the fact that various structures and
functions are not defined in <w32api/winsvc.h>.  It is missing (at
least) the macros LPSERVICE_FAILURE_ACTIONS and
SERVUCE_CONFIG_FAILURE_ACTIONS; and the function prototypes for
QueryServiceConfig2() and ChangeServiceConfig2().  It looks as though I
can define those in <w32api/winsvc.h> and be done with it.  Is there
other glue code that needs to go into a DLL somewhere to bridge over to
the Windows DLL's?

The second problem has to do with portability.  Since the service
failure actions are new to Win2k's SCM, what is the recommended method
for ensuring compatibility within cygrunsrv.exe?  Do we need a new
cygrunsrv2.exe that implements these new interfaces?  Or is there a
graceful way to make it so that the same executables and DLL's can be
used on NT4 and 2000 with NT4 just returning an error when the functions
are called?

Thanks much for any guidance,
Mike



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list