The CeWriteRecordProps function writes a set of properties to a single record, creating the record if necessary. A RAPI version of this function exists and is also called CeWriteRecordProps.
CEOID CeWriteRecordProps(HANDLE hDbase, CEOID oidRecord, WORD cPropID, CEPROPVAL * rgPropVal);
Header file: | Winbase.h |
Component: | fsdbase |
Platforms: | H/PC |
Windows CE versions: | 1.01 and later |
If the function succeeds, the return value is the object identifier of the record to which the properties were written. If the function fails, the return value is zero. To get extended error information when within a CE program call GetLastError. If within a RAPI program, call CeGetLastError. GetLastError and CeGetLastError may return one of the following values:
The CeWriteRecordProps function writes all the requested properties into the specified record. CeWriteRecordProps does 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 callee. Pointers in the CEPROPVAL structures can be anywhere in the caller's address space—they can be marshalled in like the array returned by CeReadRecordProps, or they can be independently allocated.
For more information, see Accessing Persistent Storage.
When writing applications for Windows CE version 1.0, use the PegWriteRecordProps function.