Share via


CeSvcOpen

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function opens a service and retrieves a handle to the registry root for a specified logical position.

Syntax

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

Parameters

  • uSvc
    [in] Logical registry subkey as identified by CESVC_* keys. For more information, see Remarks.
  • pszPath
    [in] Pointer to either a subpath to append to the logical subkey, or a device identifier if uSvc is set to CESVC_DEVICEX.
  • fCreate
    [in] TRUE if the subkey should be created, and FALSE if it already exists.
  • phSvc
    [out] Pointer to the handle to the registry subkey for the service. This handle is equivalent to a HKEY value and can be used by other CEUTIL API functions, as well as Win32 registry manipulation functions.

Return Value

Returns S_OK if the operation completed successfully. Otherwise, this function returns a Microsoft Win32 error code.

Remarks

The first time a device is connected to the desktop and a partnership is created, the synchronization and filter settings are copied from the MACHINE_ROOT to the partnership subkey under LOCAL_ROOT. The following table maps registry locations to predefined 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.

CEUTIL constants Registry key Description

CESVC_CUSTOM_MENUS

MACHINE_ROOT\CustomMenus

Custom menus registry root.

CESVC_DEVICE_SELECTED

LOCAL_ROOT\Partners\<Selected Device ID>

Root subkey for the currently selected device.

CESVC_DEVICES

LOCAL_ROOT\Partners

Individual device subkeys are created under this key.

CESVC_DEVICEX

LOCAL_ROOT\Partners\<Device ID>

Particular device root subkey.

CESVC_FILTERS

MACHINE_ROOT\Filters

The Filters registry root. New filters should register themselves here.

CESVC_ROOT_MACHINE

MACHINE_ROOT

Microsoft ActiveSync root hierarchy under HKEY_LOCAL_MACHINE.

CESVC_ROOT_USER

LOCAL_ROOT

ActiveSync root hierarchy under HKEY_CURRENT_USER.

CESVC_SERVICES_COMMON

MACHINE_ROOT\Services

Services registry root.

CESVC_SERVICES_USER

LOCAL_ROOT\Partners\<Device ID>\Services

Root Services subkey for a particular device.

CESVC_SYNC

LOCAL_ROOT\Partners\<Device ID>\Services\Synchronization

Synchronization registry root for a particular device.

CESVC_SYNC_COMMON

MACHINE_ROOT\Services\Synchronization

Synchronization registry root. New synchronization services should register here.

CESVC_SYNCX

HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services\Partners\<Device ID>\Services\Synchronization

When the handle returned by CeSvcOpen is no longer needed, the application should call the CeSvcClose function.

CeSvcOpen is part of CEUTIL, a utility DLL for dealing with desktop registry entries for Windows Embedded CE. CEUTIL functions are for use by desktop applications that need to communicate remotely with Windows Embedded CE–based devices. These functions are not available to applications running on Windows Embedded CE–based devices.

Requirements

Header ceutil.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

ActiveSync Functions
CeSvcClose