GetLocaleInfoW

  int GetLocaleInfoW(LCID, LCType, lpLCData, cchBuf)    
  LCID LCID;    
  LCTYPE LCType;    
  LPWSTR lpLCData;    
  int cchBuf;    

The GetLocaleInfoW function returns one of the various pieces of information about a locale, by querying the configuration registry. The call also indicates how much memory is necessary to contain the desired information.

The information returned is always a null-terminated Unicode string. No integers are returned by this function any numeric values are returned as Unicode text (see format descriptions under LCTYPEs, above).

Parameters

LCID

ID for a locale.

LCType

Indicates the type of information to be returned by the call. See the listing of constant values in this document.

lpLCData

Pointer to the memory where GetLocaleInfoW will return the requested data. This pointer is not referenced if cchBuf is 0.

cchBuf

The character count of the supplied lpLCData memory buffer. If cchBuf is 0, then the return value is the number of characters required to hold the string. lpLCData is not referenced in this case.

Return Value

Success: the number of characters copied

Failure: 0

This function sets GetLastError() with the following error values: ERROR_INSUFFICIENT_BUFFER, ERROR_INVALID_PARAMETER.