IMsgrSession::Decline method

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

Recipient declines the invitation.

Syntax

HRESULT Decline(
  [in] BSTR bstrAppData
);

Parameters

bstrAppData [in]

Type: BSTR

BSTR that specifies the application 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 declined successfully.
SR_NOT_INVITEE
The invitation was sent to the wrong user.
E_INVALIDARG
The value passed to the method was not valid.
SR_SESSION_STATE_INVALID
The session state of the invited user is not valid.

Remarks

The recipient can decline 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 OnDeclined event.

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

Error Code Meaning
0x80070057 The value passed to the method was not valid.
SR_NOT_INVITEE (0x8100060b) The invitation was sent to the wrong user.
SR_SESSION_STATE_INVALID (0x81000614) The session state of the invited user is 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

Cancel

Invite

OnDeclined

Messenger Session Invite and Messenger Private APIs

Messenger Lock and Key API