3.2.4.2.2.1 Add (Opnum 14)

The Add method adds the specified object to the collection of Objects Being Enumerated.

 [id(FSRM_DISPID_COLLECTION_MUTABLE | 0x01)] HRESULT Add(
   [in] VARIANT item
 );

item: A VARIANT structure that contains the IDispatch interface of the object to add to the collection of Objects Being Enumerated.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80045303

FSRM_E_ALREADY_EXISTS

The object pointed to by the IDispatch pointer that is contained in the VARIANT structure already exists in the collection of Objects Being Enumerated.

0x80070057

E_INVALIDARG

The item parameter is not a value type.

Upon receiving this message, the server SHOULD validate parameters:

  • Verify that the object pointed to by the IDispatch pointer contained in the VARIANT structure is the same type of object as other Objects Being Enumerated in the collection.

If any validation fails, the server MUST terminate processing and return a nonzero error code.

The server MUST add item to the collection of Objects Being Enumerated.