共用方式為


3.1.4.6.6 Remove (Opnum 12)

The Remove method removes an item from the underlying collection of the enumerator.

 [id(4), helpstring("Remove an item from the collection")] HRESULT Remove(
   [in] BSTR objectID
 );

objectID: The identity of the object. If the underlying collection is of the application-specific publisher/subscriber subscription properties, this MUST conform to the application-specific property names as specified in 2.2.2.1. If the underlying collection is of event classes, this MUST conform to the EventClassID property of the event class as specified in section 3.1.1.1. If the underlying collection is of subscriptions, this MUST conform to the SubscriptionID property of the subscription as specified in section 3.1.1.2.

Return Values: An HRESULT specifying success or failure. All success codes MUST be treated the same, and all failure codes MUST be treated the same.

When this method is invoked, the server MUST validate the syntax of the objectID. If the validation fails, the server MUST fail the call, returning a failure HRESULT back to the client. Otherwise, the server MUST enumerate through the collection and remove the object matching the given objectID. If the object matching the objectID is not found in the collection, the server MUST fail the call.