[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Registry implementation (was Re: [DotGNU]PInvoke question...)
From: |
Rhys Weatherley |
Subject: |
Registry implementation (was Re: [DotGNU]PInvoke question...) |
Date: |
Thu, 24 Jul 2003 15:05:26 +1000 |
User-agent: |
KMail/1.4.3 |
Hi all,
I have added a simple flat file registry implementation to the CVS version of
pnetlib, for non-Win32 platforms (Win32 will use the native registry routines
as before).
Registry information is stored in ".cli/registry", under the user's home
directory. Each registry key level corresponds to a sub-directory, with
values stored in a file called "values.reg". The values are stored using a
very simple XML-based format.
For example, data for "HKEY_CURRENT_USER\foo\bar" is stored in the file
"$HOME/.cli/registry/CurrentUser/foo/bar/values.reg".
This structure was chosen because it was simple to implement, and extremely
simple to debug. If your registry becomes corrupted, then it will be easy to
fix with your favourite text editor (or "rm -rf .cli/registry" in a pinch).
More information on the format can be found in the comments for the
"Microsoft.Win32.FileKeyProvider" class.
Note: the current implementation isn't transactional. If two or more
processes try to modify a registry key at the same time, the result may be
unpredictable. Patches to add transaction support are welcome.
Cheers,
Rhys.
- [DotGNU]PInvoke question..., Mark Easton, 2003/07/09
- Re: [DotGNU]PInvoke question..., Gopal V, 2003/07/09
- RE: [DotGNU]PInvoke question..., Mark Easton, 2003/07/09
- Re: [DotGNU]PInvoke question..., Glenn Chambers, 2003/07/10
- RE: [DotGNU]PInvoke question..., Mark Easton, 2003/07/11
- PPC , JITs and CVM (was: [DotGNU]PInvoke question...), Gopal V, 2003/07/11