IProduct3::get_PricingCategory, put_PricingCategory Property [C++]
The PricingCategory property is a read/write String that contains the name of the pricing category for this product.
Definition
[C++]
Get method:
HRESULT IProduct3::get_PricingCategory(BSTR*PricingCategory);SET
Put method:
HRESULT IProduct3::put_PricingCategory(BSTRPricingCategory);
[Visual Basic]
Property PricingCategory As String
Parameters
- PricingCategory[C++]
[in] When putting the property, a BSTR that contains the pricing category.
[out, retval] When getting the property, a pointer to a BSTR used to return the pricing category.
[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 either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.
[Visual Basic] This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.
The following table shows the custom COM errors that this property can return.
Constant | Value | Description |
---|---|---|
E_CAT_VC_NOT_A_SUPPLIER_CATALOG | [C++] 0x889800F9 [Visual Basic] &H889800F9 |
Invalid catalog type. This API can only be called on a base catalog. |
E_CAT_PRODUCT_DOESNT_EXIST | [C++] 0x8898001E [Visual Basic] &H8898001E |
The product you specified doesn't exist. |
E_CAT_CATEGORY_DOESNT_EXIST | [C++] 0x8898001C [Visual Basic] &H8898001C |
The category you specified doesn't exist. |
E_CAT_PRICING_CAT_PRICELESS | [C++] 0x8898002F [Visual Basic] &H8898002F |
The category you specified has no list price. The list price of the category has to be set before using this for pricing. |
[C++] 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] 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 PricingCategory parameter contains valid data only if the property was accessed successfully.
Using a category as a Pricing category allows you to set the prices of multiple products by making a single change, rather than having to change the price for each product. Setting the Pricing category for a product family will also set the Pricing category for all the variants of the product family.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
See Also
[C++]Product Object
[Visual Basic]Product Object
Copyright © 2005 Microsoft Corporation.
All rights reserved.