IDataFunctions_4_0::GetLocaleInfo

Ee810387.c++_off(en-US,CS.10).gifEe810387.vb_on(en-US,CS.10).gif

Use this method to get information on the specified locale.

Definition

HRESULT IDataFunctions_4_0::GetLocaleInfo(longvtInfo,VARIANTvtLocale,VARIANT*pvarRet);

Parameters

vtInfo

[in] A long that specifies the type of locale information to return in the pvarRet parameter. This value must map to one of the LCTYPE constants. For information about these constants, see the Win32 SDK Help.

vtLocale

[in] A VARIANT that identifies the locale for which to return information. If this VARIANT is empty (VT_EMPTY) or null (VT_NULL), the method returns information for the locale specified by the most recent call to put_Locale.

pvarRet

[out, retval] A pointer to a VARIANT used to return the requested locale information.

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

The pvtRet parameter contains valid data only if the method completes successfully.

The Locale property stores a number value that indicates the default locale to be used by the DataFunctions methods to format date, time, money, and number information. For those DataFunctions methods take a locale value for a parameter, if that value is not supplied, the value of this property is used.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

DataFunctions Object

IDataFunctions_4_0::get_Locale, put_Locale


All rights reserved.