This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] cygrunsrv --recovery <action>


> -----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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]