IOrderForm::AddItem

Ee796639.c++_off(en-US,CS.10).gifEe796639.vb_on(en-US,CS.10).gif

Use this method to add the specified item to the items collection of an OrderForm object. The items collection is a SimpleList object containing Dictionary objects.

Definition

HRESULT IOrderForm::AddItem(VARIANTvarSKU,longlCount,longlPlacedPrice,IDispatch**ppdispItem);

Parameters

varSKU

[in] A VARIANT that contains the stockkeeping unit (SKU) of the item to add.

lCount

[in] A long that contains the item count.

lPlacedPrice

[in] A long that contains the placed price of the item.

ppdispItem

[out, retval] The address of a pointer to receive an IDispatch interface to the Dictionary object used to return the added item; if the method does not complete successfully, this parameter will be NULL.

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 ppdispItem parameter contains valid data only if the method returns successfully; otherwise, it returns NULL.

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

See Also

OrderForm Object

IOrderForm::ClearItems

IOrderForm::ClearOrderForm


All rights reserved.