NKRegOpenKeyExW (Compact 2013)
10/16/2014
This function opens the specified key.
Syntax
LONG NKRegOpenKeyExW(
HKEY hKey,
LPCWSTR lpSubKey,
DWORD ulOptions,
REGSAM samDesired,
PHKEY phkResult
);
Parameters
hKey
[in] Handle to an open key or any of the following predefined reserved handle values:- HKEY_CLASSES_ROOT
- HKEY_CURRENT_USER
- HKEY_LOCAL_MACHINE
- HKEY_USERS
The following values are not supported:
- HKEY_CURRENT_CONFIG
- HKEY_PERFORMANCE_DATA
- HKEY_DYN_DATA
lpSubKey
[in] Pointer to a null-terminated string that contains the name of the subkey to open.If this parameter is NULL or is a pointer to an empty string, the function opens a new handle to the key that hKey identifies. In this case, the function does not close the handles that were previously opened.
- ulOptions
[in] Reserved; set to 0 (zero).
- samDesired
[in] Not supported; set to 0 (zero).
phkResult
[out] Pointer to a variable that receives a handle to the opened key.When you no longer need the returned handle, call the NKRegCloseKey function to close it.
Return Value
The following table shows the possible return values.
Value |
Description |
---|---|
ERROR_SUCCESS |
Success. |
ERROR_NO_MATCH |
There was no match for the specified key in the index. |
ERROR_NOT_READY |
Registry is not ready. |
The function might return other standard error codes defined in Winerror.h, as appropriate.
Remarks
This function is only available for use by the OAL. The pfnRegOpenKeyExW member of NKGLOBAL points to this function.
Requirements
Header |
pkfuncs.h |
Library |
coredll.lib |
See Also
Reference
Kernel Functions Available to the OAL
NKRegCreateKeyExW
NKRegCloseKey
NKRegQueryValueExW
NKRegSetValueExW