RegistryHelperRegCloseKey Method |
Closes a handle to the specified registry key.
Namespace:
MFiles.VAF.Common
Assembly:
MFiles.VAF (in MFiles.VAF.dll) Version: 2.3.623.2
Syntaxpublic static int RegCloseKey(
UIntPtr hKey
)
Public Shared Function RegCloseKey (
hKey As UIntPtr
) As Integer
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