Share via


CeSetSessionOption (EDB) (Windows Embedded CE 6.0)

1/6/2010

This function sets a per-session option. You can obtain a session for an open database by calling the CeGetDatabaseSession (EDB) function or you can create a new session by calling the CeCreateSession (EDB) function.

This function does not work with CEDB databases. For more information about CEDB, see CEDB Reference.

Syntax

BOOL CeSetSessionOption(
  HANDLE hSession,
  ULONG ulOptionId,
  DWORD dwValue
);

Parameters

  • hSession
    [in] Handle to the session. This handle must have been returned from either CeCreateSession or CeGetDatabaseSession.
  • ulOptionId
    [in] Specifies the option to set. The following are possible values:

    • DBOPT_SESSION_LOCK_TIMEOUT
      Controls the maximum time, in milliseconds, that a transaction waits before a time-out occurs. A time-out occurs if an operation is waiting for a lock on a resource and the resource is already locked.
    • DBOPT_SESSION_MAX_CHANGES
      Controls the maximum number of notification changes that are queued during a transaction. The dwValue parameter can be a value between zero and 0xFFFFFFFF. If you set it to zero, EDB generates only DB_NOTIFY_VOLUME_CHANGED notifications.

    For more information, see Using Notifications with EDB.**

  • dwValue
    [in] Value of the option that is specified by ulOptionId.

Return Value

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table shows possible values.

Return Value Description

ERROR_INVALID_HANDLE

ThehSession parameter is set to NULL or equal to INVALID_HANDLE_VALUE.

ERROR_INVALID_PARAMETER

TheulOptionId parameter is not a valid option, or dwValue is not a valid option value for the option ID being set.

Requirements

Header windbase.h
Library coredll.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

EDB Functions
CeGetDatabaseSession (EDB)
CeCreateSession (EDB)

Concepts

Using Notifications with EDB