CeGetDatabaseSession (EDB)
A version of this page is also available for
4/8/2010
This function obtains the session of an open database.
Syntax
HANDLE CeGetDatabaseSession(
HANDLE hDatabase
);
Parameters
- hDatabase
[in] Handle to open database. This handle must have been obtained by calling the CeOpenDatabaseInSession (EDB) function.
Return Value
A return value of INVALID_HANDLE_VALUE indicates failure. To get extended error information, call GetLastError. The following table shows possible values.
Return Value | Description |
---|---|
ERROR_INVALID_HANDLE |
The hDatabase parameter is set to NULL or equal to INVALID_HANDLE_VALUE. |
ERROR_INVALID_PARAMETER |
The hDatabase parameter is not set to NULL and points to an invalid database volume. |
ERROR_NOT_ENOUGH_MEMORY |
There is not enough memory to allocate the database handle. |
Remarks
This function enables you to obtain the session from one database, open another database, and then perform a transaction that involves both databases. The handle returned from this function must be closed by calling the CloseHandle function.
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 |