UniDeleteUserLocale
Appearance
UniDeleteUserLocale is used to delete a locale created by a user.
Syntax
int UniDeleteUserLocale (UniChar *locale)
Parameters
- locale (UniChar *)
- A pointer to a UniChar string which defines the name of the locale.
Returns
Return value (int) - returns
- ULS_SUCCESS
- Successful completion; user locale deleted from disk.
- ULS_NOMATCH
- The requested locale cannot be found.
- ULS_INVALID
- The locale being deleted is not a user defined locale.
Remarks
UniDeleteLocale is used to remove a previously defined user locale. The UniCompleteUserLocale API must be called subsequently for the change to take effect.
Example
This example shows how to delete a user locale once it is no longer needed by the user.
#include <stdio.h> #include <unidef.h> int main(void) { UniChar uniLocaleName[ULS_LNAMEMAX]; int rc = ULS_SUCCESS; . . . /* Identify the locale to be deleted - making sure the name is in * Unicode - and assign as uniLocaleName. */ . . . /*****************************************************************/ /* Delete a user locale from the disk */ /*****************************************************************/ rc = UniDeleteUserLocale(uniLocaleName); if (rc != ULS_SUCCESS) { printf("UniDeleteUserLocale error: return code = %u\n", rc); return 1; } /* Save all changes to user locales */ rc = UniCompleteUserLocale(); if (rc != ULS_SUCCESS) { printf("UniCompleteUserLocale error: return code = %u\n", rc); return 1; } return ULS_SUCCESS; }
Format
#include <unidef.h> int UniDeleteUserLocale ( UniChar *locale /* I - Locale name */ )