Item (Opnum 4)

The Item method is received by the server in an RPC_REQUEST packet. In response, the server returns the IAppHostElementSchema that is specified by the specific index.

 [propget, id(DISPID_VALUE)] HRESULT Item(
   [in] VARIANT cIndex,
   [out, retval] IAppHostElementSchema** ppElementSchema

cIndex:  A VARIANT that specifies the IAppHostElementSchema to retrieve from the collection. If the VARIANT is of type integer, this is a zero-based index to the collection. If the VARIANT is of type string, this is a string index that represents the name of the IAppHostElementSchema that is being retrieved.

ppElementSchema: Contains the IAppHostElementSchema that is being selected.

Return Values: The server MUST return zero if it successfully processes the message that is received from the client. In this case, *ppElementSchema is not NULL. If processing fails, the server MUST return a nonzero HRESULT code as defined in [MS-ERREF]. The following table describes the error conditions that MUST be handled and the corresponding error codes. A server MAY return additional implementation-specific error codes.

Return value/code




The operation completed successfully.



One or more parameters are incorrect or null.



The integer index specified by cIndex is invalid, or there is no IAppHostElementSchema instance in the collection with a name as specified by cIndex.