IMessengerContacts::Item Method
Deprecated. Retrieves a specific service by index.
Syntax
HRESULT Item( long Index, IDispatch **ppMContact );
Parameters
- Index
[in] LONG that specifies the index of the desired MessengerContacts object in the collection.- ppMContact
[out, retval] Address of a pointer to an IDispatch interface on a MessengerContacts object requested with Index. The object can now be accessed through the IMessengerContact interface.
Return Value
Returns one of the following values.
S_OK Success. RPC_X_NULL_REF_POINTER ppMContact is a NULL pointer. E_FAIL Invalid collection or index number provided exceeds the length of the collection. E_INVALIDARG Index is not a positive integer.
Remarks
If you know the sign-in name for a user, you can get the MessengerContact object by creating an object for it explicitly by calling IMessenger::GetContact. Even if that contact 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 IMessengerContacts::Item is no longer available in Windows Vista. See Windows Messenger for more information.
See Also