Share via


DMessengerEvents::OnContactPhoneChange event

[OnContactPhoneChange is no longer available for use as of Windows Vista. See Windows Messenger for more information.]

Indicates that the phone information of a contact in the local client's Contact List has changed.

Syntax

void OnContactPhoneChange(
  [in] LONG        hr,
  [in] IDispatch   *pContact,
  [in] MPHONE_TYPE PhoneType,
       BSTR        bstrNumber
);

Parameters

hr [in]

Success or error code as a LONG.

An error result for hr might result in all other event parameters being meaningless, NULL, or otherwise invalid. Always check for a successful hr before attempting to use the other event parameters.

pContact [in]

Pointer to a IDispatch interface on the MessengerContact object that corresponds to the contact. Using this pointer, clients can now code to its IMessengerContact interface.

A MessengerContact object that corresponds to the contact.

PhoneType [in]

A value in the MPHONE_TYPE enumeration.

bstrNumber

A BSTR that contains the string of the phone number.

Return value

This event does not return a value.

Remarks

Due to user input, the bstrNumber string might or might not contain punctuation. In general, punctuation is useful for display in the UI, but not for handling by APIs that handle telephony. Clients can strip or parse punctuation. However, punctuation cannot be added if none has been preserved because there are many possible punctuation conventions in various locales.

To be used when writing custom ::Invoke methods to handle these events.

Parameter vaArgs[x] Variant Type
bstrNumber 0 VT_BSTR
PhoneType 1 VT_I4
pContact 2 VT_DISPATCH
hr 3 VT_I4

Note

This event is not available for scripting languages.

Requirements

Minimum supported client
Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
End of client support
Windows XP
End of server support
Windows Server 2003
Product
Messenger 4.5
Header
Msgrua.h
IDL
Msgrua.idl
DLL
Msgsc.dll

See also

DMessengerEvents

PhoneNumber