Partager via


External.OnSendMessageComplete Event

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note

This topic describes functionality designed for use by online stores. Use of this functionality outside the context of an online store is not supported.

The OnSendMessageComplete event occurs when the online store has finished processing a message. Script on the discovery page previously sent the message by calling External.sendMessage.

window.external.OnSendMessageComplete = FunctionName

Possible Values

This is a write-only property that specifies the name of the function in script that Windows Media Player calls when the event occurs.

Parameters

The function that handles this event has the following parameters.

Msg

The same string that was passed in the Msg parameter of sendMessage.

Param

The same string that was passed in the Param parameter of sendMessage.

Result

String that contains the result of the message handling. See Remarks.

Remarks

The sendMessage method calls IWMPContentPartner::SendMessage, which returns asynchronously. That is, it returns before the online store finishes processing the message. When the online store finishes processing the message, it calls IWMPContentPartnerCallback::SendMessageComplete, which in turn calls the script's OnSendMessageComplete event handler.

When the online store calls IWMPContentPartnerCallback::SendMessageComplete, it supplies a result code in the bstrResult parameter. Windows Media Player does not interpret that result code. Instead, Windows Media Player passes the result code along to the OnSendMessageComplete event handler in the Result parameter.

None of the parameters (Msg, Param, Result) of the OnSendMessageComplete event handler is interpreted by Windows Media Player. The parameters have meaning only to the online store.

Requirements

Requirement Value
Version
Windows Media Player 11
DLL
Wmp.dll

See also

External Object for Type 1 Online Stores

External.sendMessage

IWMPContentPartner::SendMessage

IWMPContentPartnerCallback::SendMessageComplete