Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
From: "Dave Korn" <dk@artimi.com>
To: <cygwin@cygwin.com>
Subject: RE: [PATCH] cygrunsrv --recovery <action>
Date: Wed, 6 Oct 2004 13:16:59 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
In-Reply-To: <20041006120558.GA5605@cygbert.vinschen.de>
Message-ID: <NUTMEG5VxvCFvPjSk0i000002b2@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 06 Oct 2004 12:16:59.0689 (UTC) FILETIME=[612F5190:01C4AB9E]

> -----Original Message-----
> From: cygwin-owner On Behalf Of Corinna Vinschen
> Sent: 06 October 2004 13:06

> On Oct  6 13:52, Rainer Hochreiter wrote:
> > On Wed, 06 Oct 2004 12:17:49 +0200, Corinna Vinschen wrote:
> > > Erm?!?  Of course you should write directly to the 
> registry.  That's how
> > > writing the description field is implemented to stay NT4 
> compatible.  So
> > > just copy the behaviour for writing the actions parameter.
> > 
> > but who guarantees that writing directly to the registry will be 
> > compliant to upcoming windows version?
> 
> Nobody.  But in that case we change cygrunsrv to write the parameters
> differently into the registry if newer NT versions require that, no?
> 

  Well, of course, if you're using the API routine rather than going behind
its back, then when M$ change the registry format, the code will continue to
work.......  that is the whole idea for an API.

> - Please don't use ChangeServiceConfig2.  It will break running cygrunsrv
>   on NT4.  That's the reason the description is written directly to the
>   registry instead of using ChangeServiceConfig2.

  See, I think that the best generic solution to this situation is to write
code that dynamically links to ChangeServiceConfig2 if available, and falls
back to writing hard-formatted registry keys/values only if that is not
available.  That's both backwardly *and* forwardly compatible, as opposed to
the current solution, which is fragile.  


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

