The AddItem method adds an item to the OrderForm object's Items
collection, including the item's SKU, quantity, and placed price. The Items
collection is an instantiated ISimpleList interface pointer to a SimpleList object. A SimpleList object is simply an array of VARIANTs. This array consists of IDictionary interface pointers to the Dictionary objects that store the item information that you pass to AddItem.
HRESULT AddItem(
VARIANTvarSKU,// in
longlCount,// in
longlPlacedPrice,// in
IDispatch **ppdispItem// out
);
<commerce.h>
Internally, the AddItem method uses ISimpleList::Add and IDictionary::put_Value methods to add the Dictionary that contains the item information to the SimpleList. Consequently, if IOrderForm::AddItem fails, the returned HRESULT can be any HRESULT returned by these methods. If successful, AddItem returns S_OK.