RegistryHelperRegCloseKey Method
Closes a handle to the specified registry key.
Namespace: MFiles.VAF.CommonAssembly: MFiles.VAF (in MFiles.VAF.dll) Version: 24.1.706.1
public static int RegCloseKey(
UIntPtr hKey
)
- 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.
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.