次の方法で共有


CeFlushDBVol (EDB) (Windows Embedded CE 6.0)

1/6/2010

This function forcibly flushes all pending changes that have been made to a volume.

Syntax

BOOL CeFlushDBVol(
  PCEGUID pGuid
);

Parameters

  • pGuid
    Specifies the CEGUID of the mounted volume to flush. You can mount a volume by using the CeMountDBVolEx (EDB) function. If NULL is passed, all mounted volumes are flushed.

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_NOT_FOUND

Returned if the volume identified by pGuid is not currently mounted.

ERROR_INVALID_PARAMETER

Returned if pGuid is not NULL and points to an invalid EDB volume, such as when pGuid points for a valid CEDB volume.

ERROR_DISK_FULL

Returned if the flush cannot be performed because the disk is full.

Remarks

In a mounted database volume, all write operations are cached. The database engine flushes the database volume on a scheduled interval, or when a volume is unmounted. However, an application that must be assured that its data is saved should explicitly flush the data. To explicitly force the data to be written out to permanent storage, call the this function. If a reset or power failure occurs before data is flushed from the cache, the data that has not been flushed is lost.

Because a volume contains multiple databases, calls to this function cause changes to all databases in the volume to be flushed. This function can also be used to flush all mounted volumes by passing in a NULL value.

For more information about how to configure the flush interval, see Configurable EDB Volume Options.

Requirements

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

See Also

Reference

EDB Functions
CeMountDBVolEx (EDB)

Concepts

Configurable EDB Volume Options