RegistryHelperRegCloseKey Method

Closes a handle to the specified registry key.

Definition

Namespace: MFiles.VAF.Common
Assembly: MFiles.VAF (in MFiles.VAF.dll) Version: 24.1.706.1
C#
public static int RegCloseKey(
	UIntPtr hKey
)

Parameters

hKey  UIntPtr
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

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