Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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 CloseHandlefunction.
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 |