CeFlushDBVol (EDB) (Windows CE 5.0)

Send Feedback

This function is used to forcibly flush all pending changes that have been made to a volume.

BOOL CeFlushDBVol(  PCEGUIDpGuid);

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, then all volumes are flushed.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table lists possible values returned by GetLastError:

Return Value Description
ERROR_NOT_FOUND Indicates that the volume identified by pGuid is not currently mounted.

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. For more information about how to configure the flush interval, see Configurable EDB Volume Options. 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, you must call the CeFlushDBVol function. If a reset or power failure occurs before data is flushed from the cache, then the data that has not been flushed is lost.

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

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Windbase.h.
Link Library: Coredll.lib.

See Also

CeMountDbVolEx (EDB) | Configurable EDB Volume Options

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.