CeSvcOpen

This function opens and returns a handle to the registry root for a specified logical position, as specified by the CEUTIL constants shown in the table below. This is part of CEUTIL, a utility DLL for dealing with desktop registry entries for Windows CE.

Syntax

HRESULT CeSvcOpen( UINT uSvc, LPTSTR pszPath, BOOL fCreate,
PHCESVC phSvc );

Parameters

uSvc

[in] Logical subkey in registry as identified by CESVC_* keys.

The following table maps registry locations to pre-defined constants. MACHINE_ROOT is used for HKEY_LOCAL_MACHINE\Software\Microsoft\Windows CE and LOCAL_ROOT is used for HKEY_CURRENT_USER\Software\Microsoft\Windows CE Service.

Registry Key CEUTIL Constants Description
MACHINE_ROOT CESVC_ROOT_MACHINE Windows CE Services root hierarchy under HKEY_LOCAL_MACHINE
MACHINE_ROOT\Filters CESVC_FILTERS The Filters registry root. New filters should register themselves here
MACHINE_ROOT\CustomMenus CESVC_CUSTOM_MENUS Custom menus reg root
MACHINE_ROOT\Services CESVC_SERVICES_COMMON Services reg root
MACHINE_ROOT\Services \Synchronization CESVC_SYNC_COMMON Synchronization registry root. New sync services should register here
LOCAL_ROOT CESVC_ROOT_USER Windows CE Services root hierarchy under HKEY_CURRENT_USER
LOCAL_ROOT\Partners CESVC_DEVICES Individual device subkeys are created under this key
LOCAL_ROOT\Partners\<device id> CESVC_DEVICEX Particular device root subkey
LOCAL_ROOT\Partners\<selected device id> CESVC_DEVICE_SELECTED Root subkey for the currently selected device
LOCAL_ROOT\Partners\<device id>\Services CESVC_SERVICES_USER Root Services subkey for a particular device
LOCAL_ROOT\Partners\<device id>\Services\Synchronization CESVC_SYNC Synchronization reg root for a particular device

pszPath

[in] Pointer to a null-terminated string that contains either a subpath to append to the logical subkey, or a DWORD device identifier (if uSvc is CESVC_DEVICEX).

fCreate

[in] Boolean that is set to TRUE to indicate that the subkey should be created if it does not exist.

phSvc

[out] Returns the logical handle to the registry subkey. This handle is equivalent to a HKEY and can be used by other CEUTIL APIs as well as Win32 registry manipulation routines.

Return Values

HRESULT indicates success. A standard Win32 error code indicates failure.

Remarks

The first time a device is connected to the desktop and a partnership is created, the various synchronization and filter settings are copied from the MACHINE_ROOT to the partnership subkey under LOCAL_ROOT.