IMessengerServices::Item Method

Deprecated. Retrieves a specific service by index.

Syntax

HRESULT Item(      
    LONG Index,
    IDispatch **ppService
);

Parameters

  • Index
    [in] LONG that specifies the index of the desired MessengerServices object in the collection.
  • ppService
    [out, retval] Address of a pointer to a IDispatch World Wide Web link interface on a MessengerServices object requested with Index. The object can now be accessed through the IMessengerServices interface.

Return Value

Returns one of the following values. 

S_OK Success.
E_FAIL Invalid collection or index number provided exceeds the length of the collection.
RPC_X_NULL_REF_POINTER ppService is a NULL pointer.
E_INVALIDARG Index is not a positive integer.

Remarks

If you know the name for that specific service, you can get the MessengerServices object by creating an object for it explicitly by calling IMessengerService::ServiceName. Even if that service is already present in a list, the same pointer is returned (as it would have been by retrieving that object from an existing collection).

Note  This method is available for scripting languages.

Important  IMessengerServices::Item is no longer available in Windows Vista. See Windows Messenger for more information.