IMSCSMessageManager_3_0::AddMessage

Ee798598.c++_off(en-US,CS.10).gifEe798598.vb_on(en-US,CS.10).gif

Use this method to add a message to the MessageManager object.

Definition

HRESULT IMSCSMessageManager_3_0::AddMessage(BSTRbstrName,BSTRbstrMessage,VARIANTvtLanguage);

Parameters

bstrName

[in] A BSTR that contains the message name constant, which is a string that identifies the message to add. For a list of common messages and their constant names, see the Remarks section.

bstrMessage

[in] A BSTR that contains the text of the message to add.

vtLanguage

[in] A VARIANT that contains the language name with which to associate the message. This value, if specified, must be a language name added through a previous call to the AddLanguage method. If this parameter is not supplied, or is NULL, the language specified in the DefaultLanguage property of the MessageManager object is used.

Return Values

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

Error Values

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

Remarks

The following table lists the messages that are used by the default implementation of the OPP, showing the message name constant expected by the Order Processing pipeline (OOP) components that use these messages.

Message name constant Used by OPP component Added to this collection under this condition
pur_badplacedprice
RequiredItemAdjustPrice
_Basket_Errors when the price of an item does not correspond to the price contained in the OrderForm.
pur_badhandling
RequiredHandling
_Purchase_Errors when the handling cost for an order cannot be computed
pur_badpayment
RequiredPayment
_Purchase_Errors when authentication code (_payment_auth_code) is not set
pur_badshipping
RequiredShipping
_Purchase_Errors when the shipping for an order cannot be computed
pur_badsku
RequiredProdInfo
_Basket_Errors when a stockkeeping unit (SKU) in the OrderForm references an item that is not contained in the inventory for the site
pur_badtax
RequiredTax
_Purchase_Errors when the tax on a purchase cannot be computed
pur_badverify
RequiredTotal
_Purchase_Errors when the data stored by the ProcessVerifyWith method does not match the original data in the order form
pur_noitems
RequiredOrderCheck
_Purchase_Errors when there are no items in the OrderForm.
pur_out_of_stock
FlagInventory, LocalInventory
_Purchase_Errors when an item referenced in the OrderForm is out of stock.

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

See Also

MessageManager Object

IMSCSMessageManager_3_0::get_DefaultLanguage, put_DefaultLanguage

IMSCSMessageManager_3_0::GetMessage


All rights reserved.