IMsgrSession::Accept method

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

Recipient accepts the invitation.

Syntax

HRESULT Accept(
  [in] BSTR bstrAppData
);

Parameters

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 accepted successfully.
E_INVALIDARG
The parameter passed to the method was not valid.
SR_SESSION_STATE_INVALID
The SESSION_STATE of the accepting user is not valid.

Remarks

Use this method to programmatically accept an invitation within an application.

The recipient may accept 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 OnAccepted event.

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

Error Code Meaning
0x80070057 The parameter passed to the method was not valid.
SR_SESSION_STATE_INVALID (0x81000614) The SESSION_STATE of the accepting 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

Cancel

Decline

Invite

OnAccepted

Messenger Session Invite and Messenger Private APIs

Messenger Lock and Key API