Bagikan melalui


IMSCSMessageManager_3_0::GetLocale Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Use this method to return a number that identifies the locale for the specified message set.

HRESULT IMSCSMessageManager_3_0::GetLocale(
 VARIANT vtLanguage,
 long* pLocale
);
Function GetLocale(
  vtLanguage As Variant
) As Long

Parameters

  • vtLanguage
    [C++]

    [in] A VARIANT that contains the name of the message set for which you want to retrieve the locale. This message set must have been added to the MessageManager object through a previous call to the AddLanguage method.

    [Visual Basic]

    A Variant that contains the name of the message set for which you want to retrieve the locale. This message set must have been added to the MessageManager object through a previous call to the AddLanguage method.

  • pLocale
    [C++]

    [out, retval] A pointer to a long used to identify the locale for the specified message set.

    [Visual Basic]

    A Long used to identify the locale for the specified message set.

Return Values

[C++]

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

[Visual Basic]

If this method completes successfully, it returns a Long used to identify the locale for the specified message set.

Error Values

[C++]

This property 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.

[Visual Basic]

This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM 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. In particular, the Description property may contain a text description of the error.

Remarks

[C++]

The pLocale parameter points to valid data only if the method returns successfully.

Like the GetMessage method, the GetLocale method is usually not called from within a site. Instead, it is used by the pipeline component to retrieve the locale for a message that describes an error that the component has encountered.

See Also

Other Resources

MessageManager Object