2010-07-25 Carlos Alberto Cortez * UnixRegistryApi.cs: From the static ctor of KeyHandler remove the volatile keys directory if the last registered boot time has changed. This way we *actually* have our volatile keys removed if the system as rebooted. 2010-07-19 Carlos Alberto Cortez * UnixRegistryApi.cs: Remove the in-memmory approach to volatile keys, as it becomes trickier to handle deep hiearchies, subkeys and values in some scenarios. So for now we keep them in disk, we in an alternative directory, so we can cleam them properly later. 2010-07-13 Carlos Alberto Cortez * RegistryKey.cs: Call the proper UnixRegistryApi.CreateSubKey overload. * UnixRegistryApi.cs: Implement basic support for volatile keys, by storing them in memory instead of disk. We lack the support to have them available to other processes - and given the fact that a workaround would be gross, just don't implement that now. 2010-07-11 Carlos Alberto Cortez * RegistryKey.cs: Add 4.0 CreateSubKey overloads taking a RegistryOptions parameter. * IRegistryApi.cs: Add a new overload for CreateSubKey for the 4.0 profile. Not nice, but better than to change the signature for each profile. * Win32RegistryApi.cs: Properly recognize a handle where a volatile key is requested. * UnixRegistryApi.cs: Stubbed. 2010-07-09 Carlos Alberto Cortez * Win32RegistryApi.cs: Use RegCreateKeyEx instead of RegCreateKey, as we need it to further support both the missing bits and the 4.0 features. 2010-02-08 Carlos Alberto Cortez * UnixRegistryApi.cs: When retrieving the registry keys from file in a unix system, if the value returned by a SecurityElement is null, use String.Empty, since at this point we know that this registry key *exists* and *cannot* have a null value, as specified in the public api. Fixes #543206. 2009-11-21 Miguel de Icaza * RegistryKey.cs: Implement a GetValueKind and a handful of methods. 2009-04-25 Sebastien Pouliot * *.cs: Exclude the files for the NET_2_1 profile, since they are unneeded and adds a bunch (23) [SecuritySafeCritical] to audit for Moonlight 2008-02-25 Robert Jordan * Win32RegistryApi.cs (ToString): Don't emit the handle value under NET_2_0. See http://msdn2.microsoft.com/en-us/netframework/aa497241.aspx. 2008-02-01 Gert Driesen * RegistryKey.cs: Added missing checks on length of subkey and value names. On 2.0 profile, allow subkey <= 255 characters. Modified ArgumentNullException argument names to match MS. * UnixRegistryApi.cs: In SetValue (string, object, RegistryValueKind), use a zero-length string for name if it is null. In OpenSubKey, respect value of writable argument when creating well-known subkey. Fixes bug #357883. Removed argument names for ArgumentException's to match MS. 2008-01-15 Zoltan Varga * RegistryKey.cs: Fix some argument names to be consistent with MS. 2007-10-13 kevin.fitzgerald@soarce.us * UnixRegistryApi.cs: Escape the strings before passing them to SecurityElement. This fixes bug #322839 2007-08-30 Marek Habersack * UnixRegistryApi.cs: properly retrieve values of type 'bytearray'. 2007-08-13 Gert Driesen * RegistryKeyPermissionCheck.cs: Do not include in 1.0 profile. Removed extra using directive and empty lines. 2007-05-01 Dick Porter * RegistryKeyPermissionCheck.cs: Not serializable 2007-04-30 Dick Porter * Registry.cs: * RegistryHive.cs: * RegistryKey.cs: * RegistryValueKind.cs: * RegistryKeyPermissionCheck.cs: Updated for 2.0 profile 2006-10-29 Miguel de Icaza * UnixRegistryApi.cs (KeyHandler.MachineStore): Add support for loading/storing values from the system registry, instead of having the system ones be user-based. (KeyHandler, Load): turn IO exceptions into Security exceptions. 2006-09-03 Gert Driesen * IRegistryApi.cs: Added OpenRemoteBaseKey method. * Win32ResultCode.cs: Added code for win32 error 53. * RegistryKey.cs: Implemented support for OpenRemoteBaseKEy on Windows. To achieve this, the handle of the remote hive must be stored separately from the RegistryHive value. Removed isRoot field, as we now determine whether we're a root key (hive) by checking if hive is not null. Added internal ctor for registry hives that takes a RegistryHive, a key handle and a bool to indicate whether its a remote hive. Renamed Data field to handle and added internal property to access it. Throw ObjectDisposedException in ToString if key is closed/disposed. Added Hive property, which is used in UnixRegistryApi. Added GetHiveName method which translates a RegistryHive value to its (key) name. * Win32RegistryApi.cs: Added pinvoke for RegConnectRegistry. GetHandle no longer needs to know whether the key refers to a hive (base key) or not. Implemented OpenRemoteBaseKey. * UnixRegistryApi.cs: Added OpenRemoteBaseKey implementation which always throws NotImplementedException. * Registry.cs: The key name of the base key no longer needs to be passed to the ctor, as it's looked up in the ctor itself. This avoids having a different logical for local or remote base keys. 2006-08-23 Gert Driesen * Win32RegistryApi.cs: Use a StringBuilder instead of byte [] for RegEnumKey. Fixed issue in GetSubKeyNames where buffer was not cleared while iterating over subkeys. 2006-08-20 Gert Driesen * RegistryValueOptions.cs: Add the real one. 2006-08-20 Atsushi Enomoto * RegistryValueOptions.cs : build fix, easier than reverting all. 2006-08-20 Gert Driesen * IRegistryApi.cs: Modified GetValue to take RegistryValueOptions enum and removed obsolete return_default_value argument. * RegistryKey.cs: Added missing ComVisible attribute on SetValue. Use new GetValue method on IRegistryApi that takes RegistryValueOptions enum. Added GetValue overload that takes RegistryValueOptions (2.0). * Win32RegistryApi.cs: Modified GetValue to take RegistryValueOptions enum, and removed obsolete returnDefaultValue argument. Added support for ExpandString value type. Do no expand if DoNotExpand... is set. * UnixRegistryApi.cs: Modified KeyHandler.GetValue to take RegistryValueOptions enum, and do no expand environment variables in an ExpandString if DoNotExpandEnvironmentNames is set. Modified UnixRegistryApi.GetValue to take RegistryValueOptions enum, and removed obsolete return_default_value argument. 2006-08-14 Gert Driesen * UnixRegistryApi.cs: Undo change for new eventlog implementation that was not rolled back earlier this week, and which does not make sense without that implementation anyway. 2006-08-14 Gert Driesen * Win32ResultCode.cs: Added error code for attempting to perform an operation on registry key that is marked for deletion. * RegistryKey.cs: Keep writable state. Automatically flush changes to disk when closing key (to match MS). Allow values to be set on root keys. Throw UnauthorizedAccessException when attempting to set/delete value or create/delete sub key on registry key that is openen read-only. Fixed DecodeString to only strip trailing nullchars (as documented). * Win32RegistryApi.cs: For a key that is marked for deletion, return null when attempting to get a value of that key (and no default value was specified) or open a subkey. Throw an IOException when attempting to perform the following operation on a key that is marked for deletion: 1) set value on key 2) obtain SubKeyCount 3) obtain ValueCount 4) create a sub key 5) obtain value names and ignore deleting a value. Ignore flushing changes of a key and closing a when the key is closed. * UnixRegistryApi.cs: Maintain handler cache per directory instead of caching registry keys. This allows both a single key to be in memory in both read-only and read-write key configuration, while sharing the KeyHandler. Use case-insensitive hashtable for mapping directory to KeyHandler. Added support for keys that have been marked for deletion by another operation (eg. DeleteSubKeyTree). Allow different file store for machine-level and user-level hives (but have them use the same file store, needs further discussion). Allow KeyHandler failure when create directory, or saving values file to bubble up. Do not save values file when key is marked for deletion. Encapsulate access to values collection. When setting value with null name, use zero-length name instead. Treat key name case-insensitive in DeleteKey to match OpenSubKey. 2006-08-14 Miguel de Icaza * RegistryValueKind.cs: Make this public in 2.0, and rename from previous version. * Win32RegistryApi.cs: Include version to check for version; Eliminate old internal enum, and instead use the new 2.0 enum. * UnixRegistryApi.cs: Add support for typed versions of values. Add support for ExpandString. * Registry.cs (SetValue): implement version with type arguments. 2006-08-13 Miguel de Icaza * Registry.cs (SetValue, GetValue): implement. * UnixRegistryApi.cs (KeyHandler.LoadKey, KeyHandler.Save): Add support for qwords. (KeyHandler.Save): Do not save the entries if they have been deleted/dropped. Fixes a crash. (UnixRegistryApi.DeleteKey): bug fix, call ToUnix on the keyname. 2006-08-12 Gert Driesen * Registry.cs: Fixed copy/paste bug. 2006-08-11 Gert Driesen * UnixRegistryApi.cs: Consider HKLM\SYSTEM\CurrentControlSet\Services\ EventLog a wellknown key. Required for new EventLog implementation. Added RegistryStore property. 2006-06-06 Miguel de Icaza * UnixRegistryApi.cs: Do not crash if there are no values stored. 2006-05-28 Gert Driesen * UnixRegistryApi.cs: GetSubKeyNames returns only names of subkeys, not the qualified name. Fixes bug #78519. 2006-04-20 Gert Driesen * UnixRegistryApi.cs: In KeyHandler.SetValue, immediately convert instances of non-native registry types (meaning int, string, string[] or byte[]) to string. This avoids returning an instance of a non-native registry type in calls to UnixRegistryApi.GetValue. Allow instances of non-native registry types in UnixRegistryApi.SetValue. Fixes bug #78132. 2006-04-18 Gert Driesen * UnixRegistryApi.cs: Only consider the "software" subkey a well-known key if the parent is either HKEY_USERS or HKEY_LOCAL_MACHINE. 2006-04-15 Robert Jordan * UnixRegistryApi.cs (DeleteValue): Avoid crash, fixes bug #77772. Patch reapplied, since r57881 was not applied correctly. 2006-04-13 Gonzalo Paniagua Javier * UnixRegistryApi.cs: create well-known keys when trying to open them. 2006-03-12 Robert Jordan * UnixRegistryApi.cs (DeleteValue): Avoid crash, fixes bug #77772 2006-01-14 Robert Jordan * RegistryKey.cs: Added internal IsRoot accessor. * Win32RegistryApi.cs: Fixed access to RegistryKey.Data. Fixes bug #77212. Thanks to Don Edvalson (don@edvalson.net) for spotting this out. 2005-12-02 Atsushi Enomoto * Win32RegistryApi.cs : fixed invalid cast. Now mono is not to blame for not being able to run NAnt on Windows. 2005-11-12 Miguel de Icaza * RegistryKey.cs: Add support for a Registry on Unix based on files under ~/.mono/registry. Vastly refactored the code, reworked the interface between the frontend and the backends. If "RegistryKey" was not sealed, things could have been a lot cleaner. 2005-01-31 mei (mei@work.email.ne.jp) * RegistryKey.cs: Fixes bug 70451: When the key doesn't exist, and the default value is not specified, it is necessary to return null. and DecodeString function's bug is fixed. 2004-04-10 Gert Driesen (driesen@users.sourceforge.net) * RegistryKey.cs: explicit implementation of IDisposable to match MS corlib 2004-03-17 Jackson Harper * Win32RegistryApi.cs: Fix typo. Patch by Gert Driesen. 2004-03-03 Jackson Harper * Win32RegistryApi.cs: Specify entry points. 2004-03-03 Jackson Harper * Win32RegistryApi.cs: New file - pinvokes to the win32 registry. Patch by Erik LeBel. * IRegistryApi.cs: New file - Interface to a registry backend (win32 on windows, no implementation on unix). This interface will probably change when we write a Linux backend. * Win32ResultCode.cs: New file - Win32 result codes needed to check pinvoke. Patch by Erik LeBel. * Registry.cs: Create the keys. Patch by Erik LeBel. * RegistryKey.cs: Implement. Patch by Erik LeBel. 2003-12-27 Nick Drochak * RegistryKey.cs: Add some missing overloads. 2003-02-10 Nick Drochak * Registry.cs: Class should be sealed and have a private default ctor. 2002-11-28 Alejandro Sánchez Acosta * Registry.cs: Added missed field. 2002-11-28 Gonzalo Paniagua Javier * RegistryHive.cs: patch from Jackson Harper that fixes compilation. 2002-11-27 DennisHayes * checkin for Alexandre Pigolkine (pigolkine@gmx.de) with minor changes * needed for System.Windows.Forms * RegistryHive.cs * Registry.cs * added files, fully implmented? * RegistryKey.cs * added more iplmentation 2002-11-20 Nick Drochak * RegistryKey.cs: Fix typo.