IProductCatalog3::get_Language, put_Language Property [C++]

The Language property is a read/write string that contains the active language of the catalog.

Definition

[C++]

Get method:

HRESULT IProductCatalog3::get_Language(BSTR*Language);

Put method:

HRESULT IProductCatalog3::put_Language(BSTRLanguage);

[Visual Basic]

Property Language As String

Parameters

  • Language[C++]
    [in] When putting the property, a BSTR that contains the language.
    [out, retval] When getting the property, a BSTR used to return the language.

[Visual Basic] None.

[C++]

Return Values

These methods return an HRESULT indicating whether they completed successfully. See the Error Values section for more details.

Error Values

[C++] These methods return 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.

The following table describes the custom COM errors this property can return.

Constant Value Description
E_OUTOFMEMORY

[C++] 0x8007000E

[Visual Basic] &H8007000E

Ran out of memory.
E_INVALIDARG

[C++] 0x80070057

[Visual Basic] &H80070057

One or more arguments are invalid.

Remarks

[C++] The Language parameter contains valid data only if the property was accessed successfully.

The Language property specifies the culture name that will be used by all methods of this Product Catalog and on the Product and Category objects that are obtained from this ProductCatalog object. The culture name follows the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>" where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. Some culture names have prefixes that specify the script; for example, "Cy" specifies the Cyrillic script, and "Lt" specifies the Latin script. For more information, see . Table of Language Culture Names, Culture Codes, and ISO Values.

This value can only be one of the languages supported by the catalog. It defaults to the value of the vrDefaultLanguage parameter specified when the catalog is created.

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

See Also

[C++]ProductCatalog Object

[Visual Basic]ProductCatalog Object

[C++]IProductCatalog3::GetLanguages

[Visual Basic]ProductCatalog.GetLanguages

[C++]ICatalogManager3::CreateCatalog

[Visual Basic]CatalogManager.CreateCatalog

Copyright © 2005 Microsoft Corporation.
All rights reserved.