IMessengerContact::IsSelf Property

Deprecated. Retrieves a Boolean value that declares whether the contact associated with this MessengerContact object is actually the current client user.

Syntax

HRESULT IMessengerContact::get_IsSelf(VARIANT_BOOL *pBoolSelf);

Parameters

  • pBoolSelf
    Pointer to a VARIANT_BOOL that declares whether this MessengerContact object is the same user as the current client user (determined by a comparison of sign-in names, which are unique per service). VARIANT_TRUE means the contact is the current client user. VARIANT_FALSE means the contact is not the current client user.

Return Value

Returns one of the following values: 

S_OK Success.
E_FAIL pbstrFriendlyName returned a NULL string.
RPC_X_NULL_REF_POINTER pBoolSelf was a NULL pointer.

Remarks

Although users can add themselves as a contact, the Messenger client blocks users from sending instant messages to themselves. Other clients may duplicate this enforcement by checking this method's value before calling methods such as IMessenger::InstantMessage.

If this method is called while the client is offline, it will not fail, but will always return FALSE, even if the user represented by the MessengerContact object and the local client user are the same.

Note  This property is available for scripting languages.

Important  IMessengerContact::IsSelf is no longer available in Windows Vista. See Windows Messenger for more information.

See Also

IMessenger::MySigninName