126.96.36.199.4.6 IVdsService::GetObject (Opnum 9)
The GetObject method retrieves an IUnknown pointer to a specified object.
HRESULT GetObject( [in] VDS_OBJECT_ID ObjectId, [in] VDS_OBJECT_TYPE type, [out] IUnknown** ppObjectUnk );
ObjectId: The GUID of the desired object.
type: The object type that VDS_OBJECT_TYPE enumerates. All object types are valid except VDS_OT_UNKNOWN, VDS_OT_PROVIDER, VDS_OT_ASYNC, and VDS_OT_ENUM.
ppObjectUnk: 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.
Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) 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 2.2.3.
When the server receives this message, it MUST validate the following parameter:
Verify that ppObjectUnk is not NULL.
The server MUST point ppObjectUnk to an IUnknown interface of the object in the list of cached storage management objects that match the VDS object identifier that ObjectId specifies and the object type that is specified by type. The server MUST then return an HRESULT indicating failure or success.
If the object cannot be found in the server cache, then the server MUST return VDS_E_OBJECT_NOT_FOUND.