[Win32] 시스템의 Locale 관련 함수들
저장소/VC++[GetSystemDefaultLocaleName]
시스템의 기본 로케일 이름 반환 함수
(The application should call this function in preference to GetSystemDefaultLCID if designed to run only on Windows Vista and later.)
int GetSystemDefaultLocaleName(
__out LPWSTR lpLocaleName,
__in int cchLocaleName
);
Parameters
- lpLocaleName [out]
-
Pointer to a buffer in which this function retrieves the locale name.
- cchLocaleName [in]
-
Size, in characters, of the output buffer indicated by lpLocaleName. The maximum possible character length of a locale name (including a terminating null) is the value of LOCALE_NAME_MAX_LENGTH. This is the recommended size.
Return Value
Returns a value greater than 0 that indicates the length of the locale name, including the terminating null character, if successful.
This function returns 0 if it does not succeed. To get extended error information, the application can call GetLastError, which can return one of the following error codes:
- ERROR_INSUFFICIENT_BUFFER. A supplied buffer size was not large enough, or it was incorrectly set to NULL.
Remarks
This function can retrieve data from custom locales. Data is not guaranteed to be the same from computer to computer or between runs of an application. If your application must persist or transmit data, see Using Persistent Locale Data.
Examples
An example showing the use of this function can be found in NLS: Name-based APIs Sample.
Requirements
Minimum supported client | Windows Vista |
---|---|
Minimum supported server | Windows Server 2008 |
Header | Winnls.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |
See Also
- National Language Support
- National Language Support Functions
- Mapping Locale Data
- DownlevelLCIDToLocaleName
- GetLocaleInfoEx
- GetUserDefaultLocaleName
- National Language Support Functions
[GetSystemDefaultLangID]
시스템의 기본 언어 식별자 반환 함수
[GetUserDefaultLangID]
현 사용자의 기본 언어 식별자 반환 함수
[GetSystemDefaultLCID]
시스템의 기본 로케일 식별자 반환 함수
[GetUserDefaultLCID]
현 사용자의 기본 로케일 식별자 반환 함수
[제어판]-[국가 및 언어 옵션]-[표준 및 형식] 항목에 선택된 국가 정보를 반환한다.
[ConvertDefaultLocale]
기본 로케일을 변경하는 함수
[SetThreadLocale]
이 함수를 호출한 쓰레드의 현재 로케일을 변경하는 함수
'저장소 > VC++' 카테고리의 다른 글
[Win32] 환경변수 설정 값 가져오기 - GetEnvironmentVariable (0) | 2009.07.31 |
---|---|
[Error/Warning] error PRJ0002 : xxxxxxxx (0) | 2009.07.27 |
[Win32] IPC - #3 Pipe(파이프) (0) | 2009.05.14 |
[Win32] Service - #4 서비스 제어 (0) | 2009.05.13 |
[Win32] Service - #3 서비스 설치 (0) | 2009.05.13 |