<div class="content"><p> </p><p>The get_Item method gets the item in the collection with a
specified ID.</p><dl>
<dd>
<div><pre> [id(DISPID_VALUE), propget] HRESULT Item(
   [in] BSTR objectID,
   [out, retval] VARIANT* pItem
 );
</pre></div>
</dd></dl><p><b>objectID: </b>The name of the <span><a href="e74594a9-404c-4729-91f4-3fe4453cdf4d#gt_8bb43a65-7a8c-4585-a7ed-23044772f8ca" data-linktype="relative-path">object</a></span>
to get from the collection. If the underlying collection is of the <span><a href="e74594a9-404c-4729-91f4-3fe4453cdf4d#gt_7db8a6a0-d924-48bb-b9f3-08fcd58d0dc5" data-linktype="relative-path">publisher</a></span>
or <span><a href="e74594a9-404c-4729-91f4-3fe4453cdf4d#gt_6d17ce3a-aa95-4db2-83f1-09d5feef3f95" data-linktype="relative-path">subscriber</a></span>
application-specific <span><a href="e74594a9-404c-4729-91f4-3fe4453cdf4d#gt_f362c255-5746-44db-aa04-e8060543a19c" data-linktype="relative-path">subscription</a></span>
properties, this name MUST conform to the specification of application-specific
property names, as specified in section <span><a href="6e22df28-0d31-46f1-baab-5b37f15c3b33" data-linktype="relative-path">2.2.2.1</a></span>. If the
underlying collection is <span><a href="66217d57-8c60-4423-9b24-52923f4c2afa" data-linktype="relative-path">event classes</a></span>, this
MUST conform to the specification of <span><a href="f4b69dac-55c6-4b19-aed5-ee6c003e8a04" data-linktype="relative-path">EventClassCollectionIdentifier</a></span>,
as specified in section 2.2.6. If the underlying collection is <span><a href="0d617a76-fc58-455c-9e30-1a8436c5f73a" data-linktype="relative-path">subscriptions</a></span>,
this MUST conform to the specification of <span><a href="595a5d30-ac84-4831-ad0d-7fbbe9f16815" data-linktype="relative-path">SubscriptionCollectionIdentifier</a></span>,
as specified in section 2.2.7.</p><p><b>pItem: </b>If the function returns a successful <span><a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a></span>,
this MUST contain an application-specific <span><a href="e74594a9-404c-4729-91f4-3fe4453cdf4d#gt_a13ede6f-987d-4fb2-890f-fc1a0c5b2367" data-linktype="relative-path">publisher/subscriber</a></span>
property, as specified in section <span><a href="424e0b76-d9e5-4c2e-9bcd-1bc2cdf45cdd" data-linktype="relative-path">2.2.2.2</a></span>, if the
underlying collection is of publisher/subscriber application-specific
subscriptions properties. If the underlying collection is event classes, this
MUST contain a VT_UNKNOWN for the DCOM object that supports the <span><a href="2510bb77-b0ab-4254-b3b8-dd5c6189eef2" data-linktype="relative-path">IEventClass2</a></span>
DCOM interface. If the underlying collection is subscriptions, this MUST
contain a VT_UNKNOWN for the DCOM object that supports the <span><a href="542e1c26-d18a-4686-a47e-8be9ca73e352" data-linktype="relative-path">IEventSubscription</a></span>
DCOM interface.</p><p><b>Return Values: </b>An HRESULT that specifies
success or failure. All success codes MUST be treated the same, and all failure
codes MUST be treated the same.</p><p>When this method is invoked, the <span><a href="e74594a9-404c-4729-91f4-3fe4453cdf4d#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server</a></span> MUST validate
the objectID parameter for syntax. If the validation fails, the server MUST
fail the call and return a failure HRESULT back to the client. Otherwise, the
server MUST enumerate the collection and match the objectID to the individual
objects in the collection. If an object is found that has a matching objectID,
it MUST be returned through the <i>pItem</i> parameter. Otherwise, the server
MUST fail the call.</p></div>