Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A version of this page is also available for
4/8/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.
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.Note
This setting overrides the MAX_NOTIFY_LIMIT setting that you set when mounting the volume. Once the session is complete, the MAX_NOTIFY_LIMIT setting takes effect again.
- 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 |
The hSession parameter is set to NULL or equal to INVALID_HANDLE_VALUE. |
ERROR_INVALID_PARAMETER |
The ulOptionId 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 |
| Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
EDB Functions
CeGetDatabaseSession (EDB)
CeCreateSession (EDB)