delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/18/15:27:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Subject: cygrunsrv && win2k service failure actions
From: Mike Gerdts <Michael DOT Gerdts AT alcatel DOT com>
To: cygwin AT cygwin DOT com
X-Mailer: Ximian Evolution 1.0.2.99 Preview Release
Date: 18 Mar 2002 14:57:04 -0500
Message-Id: <1016481424.24352.167.camel@aurl0668>
Mime-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019