AdvApi32RegCloseKey(IntPtr) Method
Closes a handle to the specified registry key.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("AdvApi32.dll", SetLastError = true)]
public static Win32ErrorCode RegCloseKey(
IntPtr hKey
)
<DllImportAttribute("AdvApi32.dll", SetLastError := true>]
Public Shared Function RegCloseKey (
hKey As IntPtr
) As Win32ErrorCode
Dim hKey As IntPtr
Dim returnValue As Win32ErrorCode
returnValue = AdvApi32.RegCloseKey(hKey)
public:
[DllImportAttribute(L"AdvApi32.dll", SetLastError = true)]
static Win32ErrorCode RegCloseKey(
IntPtr hKey
)
[<DllImportAttribute("AdvApi32.dll", SetLastError = true)>]
static member RegCloseKey :
hKey : IntPtr -> Win32ErrorCode
No code example is currently available or this language may not be supported.
- hKey IntPtr
-
A handle to the open key to be closed.
The handle must have been opened by the RegCreateKeyEx, RegCreateKeyTransacted,
RegOpenKeyEx(SafeRegistryHandle, String, UInt32, Int32, IntPtr), RegOpenKeyTransacted, or RegConnectRegistry function.
Win32ErrorCode
If the function succeeds, the return value is
ERROR_SUCCESS.
If the function fails, the return value is other
Win32ErrorCode error code.
To get extended error information, call
GetLastWin32Error.