C# Class Microsoft.Win32.Win32RegistryApi

Function stubs, constants and helper functions for the Win32 registry manipulation utilities.
Inheritance: IRegistryApi
Afficher le fichier Open project: runefs/Marvin Class Usage Examples

Méthodes publiques

Méthode Description
Close ( RegistryKey rkey ) : void
CreateSubKey ( RegistryKey rkey, string keyName ) : RegistryKey
DeleteKey ( RegistryKey rkey, string keyName, bool shouldThrowWhenKeyMissing ) : void
DeleteValue ( RegistryKey rkey, string value, bool shouldThrowWhenKeyMissing ) : void
Flush ( RegistryKey rkey ) : void
GetSubKeyNames ( RegistryKey rkey ) : string[]
GetValue ( RegistryKey rkey, string name, object defaultValue, RegistryValueOptions options ) : object

Acctually read a registry value. Requires knowledge of the value's type and size.

GetValueNames ( RegistryKey rkey ) : string[]
OpenRemoteBaseKey ( RegistryHive hKey, string machineName ) : RegistryKey
OpenSubKey ( RegistryKey rkey, string keyName, bool writable ) : RegistryKey
SetValue ( RegistryKey rkey, string name, object value ) : void
SetValue ( RegistryKey rkey, string name, object value, RegistryValueKind valueKind ) : void
SubKeyCount ( RegistryKey rkey ) : int
ToString ( RegistryKey rkey ) : string
ValueCount ( RegistryKey rkey ) : int

Private Methods

Méthode Description
CombineName ( RegistryKey rkey, string localName ) : string

utility: Combine the sub key name to the current name to produce a fully qualified sub key name.

GenerateException ( int errorCode ) : void

convert a win32 error code into an appropriate exception.

GetBinaryValue ( RegistryKey rkey, string name, RegistryValueKind type, byte &data, int size ) : int

Get a binary value.

GetHandle ( RegistryKey key ) : IntPtr
IsHandleValid ( RegistryKey key ) : bool
RegCloseKey ( IntPtr keyHandle ) : int
RegConnectRegistry ( string machineName, IntPtr hKey, IntPtr &keyHandle ) : int
RegCreateKey ( IntPtr keyBase, string keyName, IntPtr &keyHandle ) : int
RegDeleteKey ( IntPtr keyHandle, string valueName ) : int
RegDeleteValue ( IntPtr keyHandle, string valueName ) : int
RegEnumKey ( IntPtr keyBase, int index, StringBuilder nameBuffer, int bufferLength ) : int
RegEnumValue ( IntPtr keyBase, int index, StringBuilder nameBuffer, int &nameLength, IntPtr reserved, RegistryValueKind &type, IntPtr data, IntPtr dataLength ) : int
RegFlushKey ( IntPtr keyHandle ) : int
RegOpenKeyEx ( IntPtr keyBase, string keyName, IntPtr reserved, int access, IntPtr &keyHandle ) : int
RegQueryValueEx ( IntPtr keyBase, string valueName, IntPtr reserved, RegistryValueKind &type, IntPtr zero, int &dataSize ) : int
RegQueryValueEx ( IntPtr keyBase, string valueName, IntPtr reserved, RegistryValueKind &type, [ data, int &dataSize ) : int
RegQueryValueEx ( IntPtr keyBase, string valueName, IntPtr reserved, RegistryValueKind &type, int &data, int &dataSize ) : int
RegSetValueEx ( IntPtr keyBase, string valueName, IntPtr reserved, RegistryValueKind type, byte rawData, int rawDataLength ) : int
RegSetValueEx ( IntPtr keyBase, string valueName, IntPtr reserved, RegistryValueKind type, int &data, int rawDataLength ) : int
RegSetValueEx ( IntPtr keyBase, string valueName, IntPtr reserved, RegistryValueKind type, string data, int rawDataLength ) : int

Method Details

Close() public méthode

public Close ( RegistryKey rkey ) : void
rkey RegistryKey
Résultat void

CreateSubKey() public méthode

public CreateSubKey ( RegistryKey rkey, string keyName ) : RegistryKey
rkey RegistryKey
keyName string
Résultat RegistryKey

DeleteKey() public méthode

public DeleteKey ( RegistryKey rkey, string keyName, bool shouldThrowWhenKeyMissing ) : void
rkey RegistryKey
keyName string
shouldThrowWhenKeyMissing bool
Résultat void

DeleteValue() public méthode

public DeleteValue ( RegistryKey rkey, string value, bool shouldThrowWhenKeyMissing ) : void
rkey RegistryKey
value string
shouldThrowWhenKeyMissing bool
Résultat void

Flush() public méthode

public Flush ( RegistryKey rkey ) : void
rkey RegistryKey
Résultat void

GetSubKeyNames() public méthode

public GetSubKeyNames ( RegistryKey rkey ) : string[]
rkey RegistryKey
Résultat string[]

GetValue() public méthode

Acctually read a registry value. Requires knowledge of the value's type and size.
public GetValue ( RegistryKey rkey, string name, object defaultValue, RegistryValueOptions options ) : object
rkey RegistryKey
name string
defaultValue object
options RegistryValueOptions
Résultat object

GetValueNames() public méthode

public GetValueNames ( RegistryKey rkey ) : string[]
rkey RegistryKey
Résultat string[]

OpenRemoteBaseKey() public méthode

public OpenRemoteBaseKey ( RegistryHive hKey, string machineName ) : RegistryKey
hKey RegistryHive
machineName string
Résultat RegistryKey

OpenSubKey() public méthode

public OpenSubKey ( RegistryKey rkey, string keyName, bool writable ) : RegistryKey
rkey RegistryKey
keyName string
writable bool
Résultat RegistryKey

SetValue() public méthode

public SetValue ( RegistryKey rkey, string name, object value ) : void
rkey RegistryKey
name string
value object
Résultat void

SetValue() public méthode

public SetValue ( RegistryKey rkey, string name, object value, RegistryValueKind valueKind ) : void
rkey RegistryKey
name string
value object
valueKind RegistryValueKind
Résultat void

SubKeyCount() public méthode

public SubKeyCount ( RegistryKey rkey ) : int
rkey RegistryKey
Résultat int

ToString() public méthode

public ToString ( RegistryKey rkey ) : string
rkey RegistryKey
Résultat string

ValueCount() public méthode

public ValueCount ( RegistryKey rkey ) : int
rkey RegistryKey
Résultat int