[Patch] regtool: Add load/unload commands and --binary option

Dave Korn dave.korn@artimi.com
Fri Mar 3 16:37:00 GMT 2006

On 03 March 2006 16:02, Igor Peshansky wrote:

>> I'm not quite sure how to handle the mapping from file types to
>> registry key types, but there might be some simple way which I'm just
>> too blind to see.
> Hmm, there is currently no way for the programs to find out the registry
> key type, unless we introduce new functionality into stat() or something.
> As it is, why would the programs need to know the key type, anyway?  

  Because they aren't writing it for their own benefit, but in order for it to
be read by some other app that requires it to be of a specific type.

> They
> just write the data, and fhandler_registry takes care of converting it to
> the right format (using arbirtary conventions of some sort).  The only
> potential problems are REG_MULTI_SZ and REG_EXPAND_SZ (in the former case
> it's a question of picking a string delimiter, and in the latter it's
> about annotating expandable values).
> Am I missing something?

  You're thinking of the registry as some place where a program puts its own
private data and reads it back and therefore assuming that it doesn't matter
what actually is /in/ the registry as long as the program gets back the exact
same stuff it put in there, but sometimes programs want to alter or set
registry values for external apps that require a specific type.  If cygwin
chose a type and didn't provide a way to specify, this feature would be of
much more limited use as you couldn't use it to modify an existing value
because cygwin might decide to write it back as a different type and break
whatever-it-was that depended on it.

Can't think of a witty .sigline today....

More information about the Cygwin-patches mailing list