IMessengerContact::PhoneNumber Property

Deprecated. Retrieves the phone number information for the contact associated with this MessengerContact object.

Syntax

HRESULT IMessengerContact::get_PhoneNumber(MPHONE_TYPE PhoneType, BSTR *bstrNumber);

Parameters

  • PhoneType
    A member of the MPHONE_TYPE enumerated type.
  • bstrNumber
    Pointer to a BSTR that contains the returned phone number as a string.

Return Value

Returns one of the following values: 

S_OK Success.
E_FAIL MessengerContact object not valid; or, MPHONE_TYPE parameter invalid.
E_NOTIMPL Cannot be accessed through scripting.

Remarks

The bstrNumber return value may contain punctuation. Most APIs used for Internet telephony will either ignore or strip punctuation.

E_FAIL HRESULT will be returned for a contact who does not have phone information for the specified PhoneType parameter.

Note  This property is not available for scripting languages.

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

See Also

DMessengerEvents::OnContactPagerChange, IMessenger::MyPhoneNumber