RegUnLoadKey (advapi32)
Last changed: -66.165.176.60

.
Summary

C# Signature:

[DllImport("advapi32.dll", SetLastError=true)]
static extern Int32 RegUnLoadKey(
    UInt32 hKey,
    string lpSubKey);

VB Signature:

Private Declare Auto Function RegUnLoadKey Lib "advapi32.dll" ( _
   ByVal hKey As IntPtr, _
   ByVal lpSubKey As String _
) As Integer

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

LONG RegUnLoadKey(
   HKEY hKey,
   LPCTSTR lpSubKey
);

Tips & Tricks:

Please add some!

Sample Code:

Public Shared Sub UnLoadKey(ByVal Key As RegistryKey, ByVal MountPoint As String)
   Dim ret As Integer
   ret = RegUnLoadKey(Key.hKey, MountPoint)
   If ret <> 0 Then
     Throw New Win32Exception(ret)
   End If
End Sub

Documentation

See also:

RegSaveKey to save registry key to file

RegRestoreKey to restore registry key from a file

RegLoadKey