Private Declare Auto Function RegUnLoadKey Lib "advapi32.dll" ( _
ByVal hKey As IntPtr, _
ByVal lpSubKey As String _
) As Integer
Notes:
LONG RegUnLoadKey(
HKEY hKey,
LPCTSTR lpSubKey
);
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