Share via


IMsgrSession::Cancel method

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

Inviter cancels the invitation.

Syntax

HRESULT Cancel(
  [in] long hr,
  [in] BSTR bstrAppData
);

Parameters

hr [in]

Type: long

LONG that specifies an error code that provides the reason for the session cancelation.

bstrAppData [in]

Type: BSTR

BSTR that specifies the application-specific data. bstrAppData has a limit of 512 bytes.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
The invitation was canceled successfully.
E_FAIL
The cancellation failed due to unspecified catastrophic reasons.
E_INVALIDARG
One of the parameters passed to the method was not valid.

Remarks

The recipient can cancel the invitation by setting bstrAppData to NULL within the application.

The parameter defined in this method is passed to the recipient's session in the form of a notification from the OnCancelled event.

The following table lists the error codes returned by this method.

Error Code Meaning
0x80004005 The cancellation failed due to unspecified catastrophic reasons.
0x80070057 One of the parameters passed to the method was not valid.

Requirements

Minimum supported client
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.0
Header
Msgrpriv.h
IDL
Msgrpriv.idl
DLL
Msgsc.dll

See also

IMsgrSession

Accept

Decline

Invite

OnCancelled

Messenger Session Invite and Messenger Private APIs

Messenger Lock and Key API