Click or drag to resize

RegistryHelperRegCloseKey Method

Closes a handle to the specified registry key.

Namespace:  MFiles.VAF.Common
Assembly:  MFiles.VAF (in MFiles.VAF.dll) Version: 2.1.0.1 (2.1.0.1)
Syntax
C#
[DllImportAttribute("Advapi32.dll", CharSet = CharSet.Auto)]
public static int RegCloseKey(
	UIntPtr hKey
)

Parameters

hKey
Type: SystemUIntPtr
A handle to the open key to be closed. The handle must have been opened by the RegCreateKeyEx, RegCreateKeyTransacted, RegOpenKeyEx, RegOpenKeyTransacted, or RegConnectRegistry function.

Return Value

Type: Int32
- If the function succeeds, the return value is ERROR_SUCCESS. - If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.
See Also