HrIdentifyRegistryRootKey

The HrIdentifyRegistryRootKey function checks that a fully qualified key name begins with one of predefined Windows NT Registry keys.

Quick Info

Header file: EDKUTILS.H
Library: EDKUTILS.LIB

HRESULT HrIdentifyRegistryRootKey(
  CHAR *pszKey,        
  HKEY *phkKeyHandle,  
  CHAR **ppszSubKey    
);
 

Parameters

pszKey
Input parameter. Points to a fully qualified key name.
phkKeyHandle
Output parameter. Points to the key handle.
ppszSubKey
Output parameter. Points to a subkey section of pszKey.

Return Values

See Return Values.

Remarks

The HrIdentifyRegistryRootKey function checks for the following predefined Windows NT Registry keys: HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, and HKEY_USERS. The output from this function can be passed to Win32 registry functions such as RegOpenKeyEx.

Upon successful completion, hkKey is the Windows NT Registry key handle and ppszSubKey points to the remainder of the subkey string. The value returned in ppszSubKey is NULL when the user tries to access values in the root of one of the predefined Windows NT Registry keys.