Share via


DMessengerEvents::OnContactBlockChange event

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

Indicates that the block settings of a contact in the local client's Contact List have changed. Queries whether the contact is blocked by the local client user.

Syntax

void OnContactBlockChange(
  [in] LONG         hr,
  [in] IDispatch    *pContact,
  [in] VARIANT_BOOL pBoolBlock
);

Parameters

hr [in]

Success or error code as a LONG. For a table of the MSGR_E_* constants, see MSGRConstants.

An error result for hr may 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.

Possible values are as follows:

Value Meaning
S_OK
A user was successfully blocked or unblocked.
MSGR_E_USER_NOT_FOUND
The user specified to be added does not exist.
MSGR_E_UNEXPECTED
The server has returned an unexpected error code.
MSGR_E_SERVER_TOO_BUSY
The server is not processing requests or not accepting new connections.
MSGR_E_SERVER_UNAVAILABLE
The server was able to be contacted, but was unavailable for unspecified reasons.

pContact [in]

Pointer to a IDispatch interface on the MessengerContact object where a change in block value was attempted.

pBoolBlock [in]

One of two possible values of the VARIANT_BOOL constant enumeration defined by the COM. VARIANT_TRUE indicates that this contact is blocked. VARIANT_FALSE indicates that this contact is not blocked. This value is potentially NULL or otherwise not useful if hr in the event returned any error code.

Return value

This event does not return a value.

Remarks

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

Parameter vaArgs[x] Variant Type
pBoolBlock 0 VT_BOOL
pContact 1 VT_DISPATCH
hr 2 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

Blocked