IProductCatalog::GetProduct

Ee784384.c++_off(en-US,CS.10).gifEe784384.vb_on(en-US,CS.10).gif

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

Definition

HRESULT IProductCatalog::GetProduct(VARIANTvarProductID,IProduct**ppProduct);

Parameters

varProductID

[in] A VARIANT that contains the unique identifier of the product.

ppProduct

[out, retval] A pointer to an IProduct object used to return the specified product.

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 ppProduct parameter contains valid data only if the method completed 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::CreateProduct

IProductCatalog::DeleteProduct


All rights reserved.