Retrieves a name of the specified registry key
#include <WinAPIReg.au3>
_WinAPI_GetRegKeyNameByHandle ( $hKey )
$hKey | Handle to an open registry key. |
Success: | The name of the key. |
Failure: | Empty string and sets the @error flag to non-zero, @extended flag may contain the NTSTATUS error code. |
Search ZwQueryKey in MSDN Library.
#include <APIRegConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIDiag.au3>
#include <WinAPIReg.au3>
Local $hKey = _WinAPI_RegOpenKey($HKEY_CURRENT_USER, 'Software\AutoIt v3', $KEY_QUERY_VALUE)
If @error Then
MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), @extended, _WinAPI_GetErrorMessage(@extended))
Exit
EndIf
ConsoleWrite(_WinAPI_GetRegKeyNameByHandle($hKey) & @CRLF)
_WinAPI_RegCloseKey($hKey)