RtvdbCloseDatabase

RtvdbCloseDatabase closes a database.

Syntax

Copy
DWORD RtvdbCloseDatabase(
  [in]    RTVDB_DATABASE Database,
  [in]    BOOL ForceClose
);

Parameters

[in] Database

A handle for the database to close. To retrieve the corresponding handle, use RtvdbOpenDatabase or RtvdbCreateDatabase.

[in] ForceClose

TRUE to automatically close any opened handles, FALSE to fail the function. See Remarks for more details.

Return Values

Error code Meaning

ERROR_SUCCESS

The function succeeded.

ERROR_INVALID_PARAMETER

Parameter Database is NULL.

ERROR_INVALID_HANDLE

Parameter Database does not point to a database or points to a closed database.

ERROR_OPERATION_ABORTED

One of the following conditions occurred:

  • Handles are still opened and ForceClose is FALSE.
  • The database is still opened when this error is returned.

ERROR_ABANDONED_WAIT_0

Failed to acquire the synchronization lock.

ERROR_NOT_READY

The calling process has not called RtvdbInitialize.

Remarks

If any handles remain open within the application and ForceClose is set to FALSE, the call will fail, and the database will remain open.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtvdbApi.h

RtvdbApi_W64.lib (Windows), RtvdbApi.lib (RTSS)

See Also: