Share via


NKRegOpenKeyEx (Windows Embedded CE 6.0)

1/5/2010

This function opens the specified key.

Syntax

LONG NKRegOpenKeyEx(
  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

    Windows Embedded CE does not support the following predefined reserved handle values:

    • HKEY_CURRENT_CONFIG
    • HKEY_PERFORMANCE_DATA
    • HKEY_DYN_DATA.
  • lpSubKey
    [in] Pointer to a null-terminated string containing the name of the subkey to open.

    If this parameter is NULL or a pointer to an empty string, the function opens a new handle to the key identified by the hKey parameter. In this case, the function does not close the handles previously opened.

  • ulOptions
    [in] Reserved; set to 0.
  • samDesired
    [in] Not supported; set to 0.
  • 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

ERROR_SUCCESS indicates success.

A nonzero error code defined in Winerror.h indicates failure.

Remarks

This function is only available for use by the OAL.

Requirements

Header pkfuncs.h
Library Nkstub.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Other OAL Functions
NKRegCreateKeyEx
NKRegCloseKey
NKRegQueryValueEx
NKRegSetValueEx