IProductCatalog::GetCategory

Ee823744.c++_off(en-US,CS.10).gifEe823744.vb_on(en-US,CS.10).gif

Use this method to retrieve the specified category from a catalog.

Definition

HRESULT IProductCatalog::GetCategory(BSTRstrCategoryName,ICategory**ppCategory);

Parameters

strCategoryName

[in] A BSTR that contains the name of the category to be returned.

ppCategory

[out, retval] A pointer to an ICategory object used to return the specified category.

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 either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following standard COM error value has a particular meaning in the context of this method:

S_FALSE

The catalog specified did not exist.

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 ppCategory parameter contains valid data only if the property was accessed successfully.

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

See Also

ProductCatalog Object

IProductCatalog::CreateCategory

IProductCatalog::DeleteCategory


All rights reserved.