CeCreateDatabaseEx

This function creates a new database in the object store or  in a mounted volume. A remote application interface (RAPI) version of this function exists, and it is also named CeCreateDatabaseEx.

At a Glance

Header file: Windbase.h
Windows CE versions: 2.10 and later

Syntax

CEOID CeCreateDatabaseEx( PCEGUID pceguid,
CEDBASEINFO * lpCEDBInfo );

Parameters

pceguid

[in] Pointer to the CEGUID that contains the globally unique identifier of a mounted database.

lpCEDBInfo

[in] Pointer to the CEDBASEINFO structure that determines the name, type, sort orders, and characteristics of the database.

Return Values

The object identifier of the newly created database indicates success. NULL indicates failure. To get extended error information, call GetLastError. Possible values for GetLastError include the following:

ERROR_DISK_FULL

The destination source does not contain enough space to create the new database.

ERROR_INVALID_PARAMETER

A parameter was invalid.

ERROR_DUP_NAME

A database already exists with the specified name.

Remarks

Because sort orders increase the system resources needed to perform each insert and delete operation, you should keep the number of sort orders to a minimum. Use the CeSetDatabaseInfoEx function to change the sort order later; however, this function is even more expensive in terms of system resources.

Together, a CEGUID and CEOID uniquely identifies a record or database in a database volume, including the object store.

See Also

CEDBASEINFO, CeDeleteDatabaseEx, CeOidGetInfoEx, CeOpenDatabaseEx, CeSetDatabaseInfoEx, CREATE_SYSTEMGUID, SORTORDERSPEC