delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/06/08:18:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dk AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: [PATCH] cygrunsrv --recovery <action>
Date: Wed, 6 Oct 2004 13:16:59 +0100
MIME-Version: 1.0
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/

- Raw text -


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