Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,368 @@
2010-07-25 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* 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 <calberto.cortez@gmail.com>
* 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 <calberto.cortez@gmail.com>
* 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 <calberto.cortez@gmail.com>
* 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 <calberto.cortez@gmail.com>
* 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 <calberto.cortez@gmail.com>
* 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 <miguel@novell.com>
* RegistryKey.cs: Implement a GetValueKind and a handful of
methods.
2009-04-25 Sebastien Pouliot <sebastien@ximian.com>
* *.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 <robertj@gmx.net>
* 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 <drieseng@users.sourceforge.net>
* 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 <vargaz@gmail.com>
* 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 <mhabersack@novell.com>
* UnixRegistryApi.cs: properly retrieve values of type
'bytearray'.
2007-08-13 Gert Driesen <drieseng@users.sourceforge.net>
* RegistryKeyPermissionCheck.cs: Do not include in 1.0 profile.
Removed extra using directive and empty lines.
2007-05-01 Dick Porter <dick@ximian.com>
* RegistryKeyPermissionCheck.cs: Not serializable
2007-04-30 Dick Porter <dick@ximian.com>
* Registry.cs:
* RegistryHive.cs:
* RegistryKey.cs:
* RegistryValueKind.cs:
* RegistryKeyPermissionCheck.cs: Updated for 2.0 profile
2006-10-29 Miguel de Icaza <miguel@novell.com>
* 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 <drieseng@users.sourceforge.net>
* 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 <drieseng@users.sourceforge.net>
* 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 <drieseng@users.sourceforge.net>
* RegistryValueOptions.cs: Add the real one.
2006-08-20 Atsushi Enomoto <atsushi@ximian.com>
* RegistryValueOptions.cs : build fix, easier than reverting all.
2006-08-20 Gert Driesen <drieseng@users.sourceforge.net>
* 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 <drieseng@users.sourceforge.net>
* 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 <drieseng@users.sourceforge.net>
* 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 <miguel@novell.com>
* 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 <miguel@novell.com>
* 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 <drieseng@users.sourceforge.net>
* Registry.cs: Fixed copy/paste bug.
2006-08-11 Gert Driesen <drieseng@users.sourceforge.net>
* 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 <miguel@novell.com>
* UnixRegistryApi.cs: Do not crash if there are no values stored.
2006-05-28 Gert Driesen <drieseng@users.sourceforge.net>
* UnixRegistryApi.cs: GetSubKeyNames returns only names of subkeys,
not the qualified name. Fixes bug #78519.
2006-04-20 Gert Driesen <drieseng@users.sourceforge.net>
* 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 <drieseng@users.sourceforge.net>
* 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 <robertj@gmx.net>
* UnixRegistryApi.cs (DeleteValue): Avoid crash, fixes bug
#77772. Patch reapplied, since r57881 was not applied correctly.
2006-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* UnixRegistryApi.cs: create well-known keys when trying to open them.
2006-03-12 Robert Jordan <robertj@gmx.net>
* UnixRegistryApi.cs (DeleteValue): Avoid crash, fixes bug
#77772
2006-01-14 Robert Jordan <robertj@gmx.net>
* 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 <atsushi@ximian.com>
* 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 <miguel@novell.com>
* 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 <jackson@ximian.com>
* Win32RegistryApi.cs: Fix typo. Patch by Gert Driesen.
2004-03-03 Jackson Harper <jackson@ximian.com>
* Win32RegistryApi.cs: Specify entry points.
2004-03-03 Jackson Harper <jackson@ximian.com>
* 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 <ndrochak@gol.com>
* RegistryKey.cs: Add some missing overloads.
2003-02-10 Nick Drochak <ndrochak@gol.com>
* Registry.cs: Class should be sealed and have a private default ctor.
2002-11-28 Alejandro Sánchez Acosta <raciel@es.gnu.org>
* Registry.cs: Added missed field.
2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* RegistryHive.cs: patch from Jackson Harper that fixes compilation.
2002-11-27 DennisHayes <dennish@raytek.com>
* 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 <ndrochak@gol.com>
* RegistryKey.cs: Fix typo.

View File

@@ -0,0 +1,73 @@
//
// Microsoft.Win32/IRegistryApi.cs
//
// Authors:
// Jackson Harper (jackson@ximian.com)
//
// (C) 2004 Novell, Inc (http://www.novell.com)
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_2_1
using System;
using System.Text;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace Microsoft.Win32 {
internal interface IRegistryApi {
RegistryKey CreateSubKey (RegistryKey rkey, string keyname);
RegistryKey OpenRemoteBaseKey (RegistryHive hKey, string machineName);
RegistryKey OpenSubKey (RegistryKey rkey, string keyname, bool writtable);
void Flush (RegistryKey rkey);
void Close (RegistryKey rkey);
object GetValue (RegistryKey rkey, string name, object default_value, RegistryValueOptions options);
RegistryValueKind GetValueKind (RegistryKey rkey, string name);
void SetValue (RegistryKey rkey, string name, object value);
int SubKeyCount (RegistryKey rkey);
int ValueCount (RegistryKey rkey);
void DeleteValue (RegistryKey rkey, string value, bool throw_if_missing);
void DeleteKey (RegistryKey rkey, string keyName, bool throw_if_missing);
string [] GetSubKeyNames (RegistryKey rkey);
string [] GetValueNames (RegistryKey rkey);
string ToString (RegistryKey rkey);
void SetValue (RegistryKey rkey, string name, object value, RegistryValueKind valueKind);
#if NET_4_0
RegistryKey CreateSubKey (RegistryKey rkey, string keyname, RegistryOptions options);
RegistryKey FromHandle (SafeRegistryHandle handle);
IntPtr GetHandle (RegistryKey key);
#endif
}
}
#endif // NET_2_1

View File

@@ -0,0 +1,143 @@
//
// Microsoft.Win32.Registry.cs
//
// Author:
// Miguel de Icaza (miguel@novell.com)
// stubbed out by Alexandre Pigolkine (pigolkine@gmx.de)
//
//
// Copyright (C) 2004, 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_2_1
using System;
using System.Runtime.InteropServices;
namespace Microsoft.Win32
{
[ComVisible (true)]
public static class Registry
{
public static readonly RegistryKey ClassesRoot = new RegistryKey (
RegistryHive.ClassesRoot);
public static readonly RegistryKey CurrentConfig = new RegistryKey (
RegistryHive.CurrentConfig);
public static readonly RegistryKey CurrentUser = new RegistryKey (
RegistryHive.CurrentUser);
#if NET_4_0
[Obsolete ("Use PerformanceData instead")]
#endif
public static readonly RegistryKey DynData = new RegistryKey (
RegistryHive.DynData);
public static readonly RegistryKey LocalMachine = new RegistryKey (
RegistryHive.LocalMachine);
public static readonly RegistryKey PerformanceData = new RegistryKey (
RegistryHive.PerformanceData);
public static readonly RegistryKey Users = new RegistryKey (
RegistryHive.Users);
static RegistryKey ToKey (string keyName, bool setting)
{
if (keyName == null)
throw new ArgumentException ("Not a valid registry key name", "keyName");
RegistryKey key = null;
string [] keys = keyName.Split ('\\');
switch (keys [0]){
case "HKEY_CLASSES_ROOT":
key = ClassesRoot;
break;
case "HKEY_CURRENT_CONFIG":
key = CurrentConfig;
break;
case "HKEY_CURRENT_USER":
key = CurrentUser;
break;
case "HKEY_DYN_DATA":
key = DynData;
break;
case "HKEY_LOCAL_MACHINE":
key = LocalMachine;
break;
case "HKEY_PERFORMANCE_DATA":
key = PerformanceData;
break;
case "HKEY_USERS":
key = Users;
break;
default:
throw new ArgumentException ("Keyname does not start with a valid registry root", "keyName");
}
for (int i = 1; i < keys.Length; i++){
RegistryKey nkey = key.OpenSubKey (keys [i], true);
if (nkey == null){
if (!setting)
return null;
nkey = key.CreateSubKey (keys [i]);
}
key = nkey;
}
return key;
}
public static void SetValue (string keyName, string valueName, object value)
{
RegistryKey key = ToKey (keyName, true);
if (valueName.Length > 255)
throw new ArgumentException ("valueName is larger than 255 characters", "valueName");
if (key == null)
throw new ArgumentException ("cant locate that keyName", "keyName");
key.SetValue (valueName, value);
}
public static void SetValue (string keyName, string valueName, object value, RegistryValueKind valueKind)
{
RegistryKey key = ToKey (keyName, true);
if (valueName.Length > 255)
throw new ArgumentException ("valueName is larger than 255 characters", "valueName");
if (key == null)
throw new ArgumentException ("cant locate that keyName", "keyName");
key.SetValue (valueName, value, valueKind);
}
public static object GetValue (string keyName, string valueName, object defaultValue)
{
RegistryKey key = ToKey (keyName, false);
if (key == null)
return defaultValue;
return key.GetValue (valueName, defaultValue);
}
}
}
#endif // NET_2_1

View File

@@ -0,0 +1,55 @@
//
// Microsoft.Win32.RegistryHive.cs
//
// Author:
// Alexandre Pigolkine (pigolkine@gmx.de)
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_2_1
using System;
using System.Runtime.InteropServices;
namespace Microsoft.Win32
{
[Serializable]
[ComVisible (true)]
public enum RegistryHive
{
ClassesRoot = -2147483648,
CurrentConfig = -2147483643,
CurrentUser = -2147483647,
DynData = -2147483642,
LocalMachine = -2147483646,
PerformanceData = -2147483644,
Users = -2147483645
}
}
#endif // NET_2_1

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
//
// Microsoft.Win32.RegistryKeyPermissionCheck.cs
//
// Author:
// Dick Porter (dick@ximian.com)
//
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_2_1
namespace Microsoft.Win32
{
public enum RegistryKeyPermissionCheck
{
Default = 0,
ReadSubTree = 1,
ReadWriteSubTree = 2,
}
}
#endif

View File

@@ -0,0 +1,39 @@
//
// Microsoft.Win32.RegistryOptions.cs
//
// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_0
using System;
namespace Microsoft.Win32 {
[Flags]
[Serializable]
public enum RegistryOptions {
None,
Volatile
}
}
#endif

View File

@@ -0,0 +1,50 @@
//
// Microsoft.Win32.RegistryValueKind.cs
//
//
//
// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_2_1
using System.Runtime.InteropServices;
namespace Microsoft.Win32
{
[ComVisible (true)]
public enum RegistryValueKind {
Unknown,
String,
ExpandString,
Binary,
DWord,
MultiString = 7,
QWord = 11,
#if NET_4_0
None = -1
#endif
}
}
#endif // NET_2_1

View File

@@ -0,0 +1,43 @@
//
// Microsoft.Win32.RegistryValueOptions.cs
//
// Author:
// Gert Driesen (drieseng@users.sourceforge.net)
//
// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_2_1
using System;
namespace Microsoft.Win32
{
[Flags]
public enum RegistryValueOptions {
None,
DoNotExpandEnvironmentNames,
}
}
#endif // NET_2_1

View File

@@ -0,0 +1,39 @@
//
// Microsoft.Win32.RegistryView.cs
//
// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_0
using System;
namespace Microsoft.Win32 {
[Serializable]
public enum RegistryView {
Default,
Registry64 = 0x100,
Registry32 = 0x200
}
}
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
//
// Microsoft.Win32/Win32ResultCode.cs: define win32 error values
//
// Authos:
// Erik LeBel (eriklebel@yahoo.ca)
//
// Copyright (C) Erik LeBel 2004
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_2_1
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace Microsoft.Win32
{
/// <summary>
/// These are some values for Win32 result codes.
///
/// NOTE: This code could be relocated into a common repository
/// for error codes, along with a utility to fetch the matching
/// error messages. These messages should support globalization.
/// Maybe the 'glib' libraries provide support for this.
/// (see System/System.ComponentModel/Win32Exception.cs)
/// </summary>
internal class Win32ResultCode
{
public const int Success = 0;
public const int FileNotFound = 2;
public const int AccessDenied = 5;
public const int InvalidHandle = 6;
public const int InvalidParameter = 87;
public const int MoreData = 234;
public const int NetworkPathNotFound = 53;
public const int NoMoreEntries = 259;
public const int MarkedForDeletion = 1018;
}
}
#endif // NET_2_1