3.18.4.6 IStringCollection::Add (Opnum 13)

The IStringCollection::Add (opnum 13) method adds an item to the collection.

 HRESULT Add(
   [in] BSTR value,
   [out, retval] LONG* retval
 );

value: The string to add to the collection.

retval: The index of the added string in the collection.

Return Values: The method MUST return information in an HRESULT data structure. The severity bit in the structure identifies the following conditions:

  • If the severity bit is set to 0, the method completed successfully.

  • If the severity bit is set to 1, the method failed and encountered a fatal error.

If the collection is read-only, the server SHOULD return WU_E_NOT_SUPPORTED (0x80240037).

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].

This method SHOULD append the given value to the List ADM element and increment the value of the Count ADM element.