Creating a Property Database

Property databases are created using the CeCreateDatabaseEx function. The database can be created in the Object Store, or in a mounted database volume. Listing 4.3 creates a database in the Object Store. The CREATE_SYSTEMGUID macro is used to retrieve the database GUID for the Object Store. Databases can be created in mounted database volumes by passing the CEGUID returned when calling CEMountDBVol.

Listing 4.3. Creates a database
 const CEPROPID propCompany = MAKELONG(CEVT_LPWSTR, 100); const CEPROPID propCompanyID = MAKELONG(CEVT_I4, 101); void Listing4_3() { CEOID ceDB; CEGUID ceObjStore; CEDBASEINFO ceDBInfo; // initialize structure ceDBInfo.dwFlags = CEDB_VALIDNAME | CEDB_VALIDSORTSPEC | CEDB_VALIDTYPE; wcscpy(ceDBInfo.szDbaseName, ...

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.