CeCreateDatabaseEx (RAPI) (Windows CE 5.0)

Send Feedback

This function creates a new database in the object store or in a mounted volume.

CeCreateDatabaseEx is a remote application interface (RAPI), which enables an application running on a desktop computer to make function calls on a Windows CE–based device.

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 CeGetLastError. Possible values for CeGetLastError include the following.

Value Description
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.

A CEGUID and CEOID together uniquely identify a record or database in a database volume, including the object store.

Note   Earlier versions of Windows CE assigned object identifiers to objects in other file systems, such as the file allocation table (FAT) file system. These object identifiers 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 object identifiers and the object store is the only volume that can return an object identifier.

Do not create a database name that end with a backslash character "\".

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Rapi.h.
Link Library: Rapi.lib.

See Also

RAPI Functions | CeDeleteDatabaseEx | CeGetLastError | CeOidGetInfoEx | CeOpenDatabaseEx | CeSetDatabaseInfoEx | CEDBASEINFO | CREATE_SYSTEMGUID | SORTORDERSPEC

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.