Microsoft Windows CE 3.0  

CeWriteRecordProps

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 writes a set of properties to a single record, creating the record if necessary. A remote application interface (RAPI) version of this function exists, and it is also called CeWriteRecordProps.

CEOID
CeWriteRecordProps(
HANDLE
hDbase
,
CEOID
oidRecord
,
WORD
cPropID
,
CEPROPVAL
*
rgPropVal
);

Parameters

hDbase
[in] Handle to an open database. The database must have been opened by a previous call to the CeOpenDatabasefunction.
oidRecord
[in] Object identifier of the record to which the specified properties are to be written. If this parameter is zero, a new record is created and filled in with the specified properties.
cPropID
[in] Number of properties in the array specified by the rgPropValparameter. The cPropIDparameter must not be zero.
rgPropVal
[in] Pointer to an array of CEPROPVALstructures that specify the property values to be written to the specified record.

Return Values

The object identifier of the record to which the properties were written indicates success. Zero indicates failure. To get extended error information when within a CE program call GetLastError. GetLastErrormay return one of the following values:

Value Description
ERROR_DISK_FULL There was not enough space in the object store to write the properties.
ERROR_INVALID_PARAMETER A parameter was invalid.

Remarks

Note   Earlier versions (2.12 and prior) of Windows CE assigned OIDs to objects in other file systems, such as the FAT file system. These OIDs were guaranteed to be unique within a volume, but not across multiple volumes. Effective with version 3.0, only objects in the object store have valid, unique OIDs and the object store is the only volume that can return an object identifier.

The CeWriteRecordPropsfunction writes all the requested properties into the specified record. CeWriteRecordPropsdoes not move the seek pointer.

To delete a property, set the CEDB_PROPDELETE flag in the appropriate property value. This allows multiple deletes and changes in a single call, which is much more efficient than multiple calls.

No memory is freed by the caller. Pointers in the CEPROPVALstructures can be anywhere in the caller's address space—they can be marshalled, as in the array returned by CeReadRecordProps, or they can be independently allocated.

For Windows CE versions 2.10 and later, on a mounted database volume, all write operations are cached. The database subsystem periodically requests a cache flush after a series of operations. If memory is low, the cache is flushed to permanent storage. Unlike a file system that can choose to flush only part of the cache, on a database, all blocks are flushed.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.01 and later Windbase.h Winbase.h Fsdbase.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CeOpenDatabase, CeReadRecordProps, CeWriteRecordProps, GetLastError, CEPROPVAL