<div class="content"><p> </p><p>The GetObject method retrieves an IUnknown pointer to a
specified object.</p><dl>
<dd>
<div><pre> HRESULT GetObject(
   [in] VDS_OBJECT_ID ObjectId,
   [in] VDS_OBJECT_TYPE type,
   [out] IUnknown** ppObjectUnk
 );
</pre></div>
</dd></dl><p><b>ObjectId: </b>The <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a></span> of the desired
object.</p><p><b>type: </b>The object type that <span><a href="5f23d65d-94c7-4287-b767-4012f0e19646" data-linktype="relative-path">VDS_OBJECT_TYPE</a></span>
enumerates. All object types are valid except VDS_OT_UNKNOWN, VDS_OT_PROVIDER,
VDS_OT_ASYNC, and VDS_OT_ENUM.</p><p><b>ppObjectUnk: </b>A pointer to an IUnknown
interface that, if the operation is successfully completed, receives an
IUnknown interface of the object. Callers MUST release the interface that is
received when they are done with it.</p><p><b>Return Values: </b>The method MUST return zero or
a non-error <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a></span> (as
specified in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>)
to indicate success, or return an implementation-specific nonzero error code to
indicate failure. For the HRESULT values predefined by the Virtual Disk Service
Remote Protocol, see section <span><a href="5102cc53-3143-4268-ba4c-6ea39e999ab4" data-linktype="relative-path">2.2.3</a></span>.</p><p>When the server receives this message, it MUST validate the
following parameter:</p><ul><li><p><span><span> 
</span></span>Verify that <i>ppObjectUnk</i> is not NULL.</p>
</li></ul><p>The server MUST point <i>ppObjectUnk</i> to an IUnknown
interface of the object in the list of cached storage management objects that
match the <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_27e6393b-d035-40c5-8503-d7affe7bd27b" data-linktype="relative-path">VDS object</a></span>
identifier that <i>ObjectId</i> specifies and the object type that is specified
by type. The server MUST then return an HRESULT indicating failure or success.</p><p>If the object cannot be found in the server cache, then the
server MUST return VDS_E_OBJECT_NOT_FOUND. </p></div>