Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CeRegOpenKeyEx (RAPI)

Windows Mobile 6.5
A version of this page is also available for

This function opens the specified registry key on a remote Windows Embedded CE–based device.

LONG CeRegOpenKeyEx( 
  HKEY hKey, 
  LPCWSTR lpszSubKey, 
  DWORD ulOptions, 
  REGSAM samDesired, 
  PHKEY phkResult 


[in] Handle to a currently open key or any of the following predefined reserved handle values:





Windows Embedded CE does not support the HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA predefined reserved handle values.


[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 will open a new handle to the key identified by the hKey parameter. In this case, the function will not close the handles previously opened.


[in] Reserved; set to 0.


[in] Not supported; set to zero.


[out] Pointer to a variable that receives a handle to the opened key. When you no longer need the returned handle, call the CeRegCloseKey function to close it.

ERROR_SUCCESS indicates success. A nonzero error code defined in Winerror.h indicates failure. To get a generic description of the error, call FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM flag set.

Unlike the CeRegCreateKeyEx function, the CeRegOpenKeyEx function does not create the specified key if the key does not exist in the registry.

Windows Embedded CEWindows CE 3.0 and later
Windows MobilePocket PC 2002 and later, Smartphone 2002 and later

Community Additions

© 2015 Microsoft