GetVarConversionLocaleSetting function

Gets an Automation specific National Language Support (NLS) flag that defines the general behavior of Automation when formatting the date, time, numbers, currency for the current user and machine.

Syntax

HRESULT GetVarConversionLocaleSetting(
  _Out_ ULONG *dwFlags
);

Parameters

dwFlags [out]

Indicates the locale to use for date and time conversion. The values in the following table are used for this flag.

Value Meaning
0
The default value. It uses the locale set by the last user or process that set the cache.
1
Format is based on the current identity of the thread requesting these values. The current identity is based on the identity of the thread that makes the call to the OleAut32.dll.
2
Format is forced to use the system default regional settings. The system default settings are set for a computer at reboot. In this case, the date format is not read from the registry but from the Locale.nls file for that locale.
[!Note]
Changing the default locale changes all regional settings (time, money, date formats, and so on). There is no way to modify a specific setting within the locale.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Library
OleAut32.lib
DLL
OleAut32.dll

See also

SetVarConversionLocaleSetting