CeSvcOpen

The CeSvcOpen function opens and returns a handle to the registry root for a specified logical subkey.

Syntax

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

Parameters

  • uSvc
    [in] Specifies a logical subkey. For information about possible values, see CeSvcOpen Flags.
  • pszPath
    [in] Reference to a null-terminated string that contains a subpath to append to the registry subkey or a DWORD device identifier if uSvc is CESVC_DEVICEX.
  • fCreate
    [in] Specifies a Boolean value that is TRUE to indicate that the subkey should be created if it does not exist.
  • phSvc
    [out] Reference to a handle to the registry subkey.

Return Values

This function returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    The function completed successfully.

Remarks

The handle specified by phSvc is equivalent to an HKEY and can be used by other Windows CE CEUTIL functions.

When the handle to the registry subkey returned by CeSvcOpen is no longer needed, call the CeSvcClose function.

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

Requirements

Smartphone: Windows Mobile 2002 and later
OS Versions: Windows CE 3.0 and later
Header: ceutil.h
Library: ceutil.lib

See Also

ActiveSync API Functions

CeSvcClose

Last updated on Friday, April 22, 2005

© 2005 Microsoft Corporation. All rights reserved.

Send feedback on this topic to the authors.