Called by the API to notify a registered client that the phone number of the user of the local client has been changed or that a change was attempted. Not scriptable.

Syntax

HRESULT OnMyPhoneChange(
   [in] MPHONE_TYPE PhoneType,
   [in] BSTR bstrNUmber
);

Parameters

PhoneType

[in] A value of the MPHONE_TYPE enumeration.

bstrNUmber

[in] A BSTR that contains the current client's new phone number. This might include punctuation, depending on how it is stored on the server.

Return Value

The implementer of this event handler will determine what value should be returned.

Remarks

Office Communicator Automation API does not have a method to set the client's phone number. This event fires only if the phone number is changed through internal APIs or user action through a Communication instance. No hr is contained in this event.

Example

The event handling code in this example displays the telephone type equate value for the telephone that changed along with the new telephone number.

Copy Code
void communicator_OnMyPhoneChange(MPHONE_TYPE PhoneType, string bstrNumber)
{
   StringBuilder sb = new StringBuilder();
   sb.Append("MY PHONE NUMBER CHANGED: Phone Type-" +
			 PhoneType.ToString());
   sb.Append("New Phone Number: " + bstrNumber);
   Console.WriteLine("EVENT: " + sb.ToString());
}

Requirements

Client

Requires Microsoft DirectX 9.0, C Runtime libraries (msvcm80.dll) on Microsoft Windows© Vista, Microsoft Windows XP Service Pack 1 (SP1) or later, or Microsoft Windows 2000 with Service Pack 4 (SP4). Any Communicator-imposed restrictions apply. .

Server

Requires Microsoft Office Communications Server 2007, AV MCU (for Media Support), Media Relay (for NAT/Firewall traversal) on Microsoft Office Communications Server 2007.

Product

Microsoft Office Communicator 2007 Automation API

IDL file

Msgrua.idl

See Also