CeChangeDatabaseLCID (EDB) (Windows Embedded CE 6.0)
1/6/2010
This function changes the locale identifier (LCID) of a volume for sort operations.
Syntax
VOID CeChangeDatabaseLCID(
PCEGUID pGuid,
DWORD lcid
);
Parameters
- pGuid
[in] CEGUID of the mounted volume to which the LCID is applied.
- lcid
[in] Locale identifier to apply to the database volume.
Return Value
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table shows possible values.
Return Value | Description |
---|---|
ERROR_INVALID_PARAMETER |
The pGuid parameter is set to NULL, or lcid is not valid. |
ERROR_NOT_FOUND |
The volume specified by pGuid does not exist. |
ERROR_SHARING_VIOLATION |
The LCID can only be changed if the volume is mounted once. This error may occur if there is an open handle on any database in the volume. |
Remarks
This function rebuilds all sort orders on all databases in the volume. This can potentially be very time-consuming.
When you create a database volume, the volume receives the default system LCID. The database volume LCID is set to zero, and the LCID becomes the criterion for comparing string values.
If you change the system LCID after creating a database volume, you must also use CeChangeDatabaseLCID to change the database LCID and re-sort the existing data. Otherwise, problems can occur when the database attempts to find or add new data based on the new LCID, but the existing data is sorted using the old system LCID.
If any database in the volume has an open handle, this function fails with ERROR_SHARING_VIOLATION.
There are no differences between this function and the CEDB equivalent function**, CeChangeDatabaseLCID (CEDB)**.
Requirements
Header | windbase.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 5.0 and later |