Writing Records

Writing a record to a property database consists of specifying the data types, property identifiers, and data values for each of the properties in the record, and then calling CeWriteRecordProps to write the record. Records can have varying numbers of properties, and new properties can be added to existing records. Listing 4.7 opens the database created in the previous sections and writes three records.

Listing 4.7. Writes a record
 void WriteDBRecord(HANDLE hDB, LPTSTR lpCompanyName, long lpCompanyID, LPTSTR lpCompanyTel) { CEPROPVAL propval[4]; CEOID ceoidRec; propval[0].propid = propCompany; propval[0].val.lpwstr = lpCompanyName; propval[1].propid = propCompanyID; propval[1].val.lVal = lpCompanyID; propval[2].propid = propCompanyTel; ...

Get Windows® CE 3.0 Application Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.