共用方式為


MessageReceivedCallback 代理人

定義

已取代。 使用 PostMessageToReceiver 從隔離的 Windows 環境傳送訊息時,將會叫用的回呼函式。

public delegate void MessageReceivedCallback(Platform::Guid receiverId, IVectorView<Platform::Object ^> ^ message);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Security.Isolation.IsolatedWindowsEnvironmentContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(4122265855, 7581, 18837, 159, 234, 77, 21, 37, 124, 7, 87)]
class MessageReceivedCallback : MulticastDelegate
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Security.Isolation.IsolatedWindowsEnvironmentContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(4122265855, 7581, 18837, 159, 234, 77, 21, 37, 124, 7, 87)]
/// [Windows.Foundation.Metadata.Deprecated("MessageReceivedCallback is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
class MessageReceivedCallback : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Security.Isolation.IsolatedWindowsEnvironmentContract), 65536)]
[Windows.Foundation.Metadata.Guid(4122265855, 7581, 18837, 159, 234, 77, 21, 37, 124, 7, 87)]
public delegate void MessageReceivedCallback(Guid receiverId, IReadOnlyList<object> message);
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Security.Isolation.IsolatedWindowsEnvironmentContract), 65536)]
[Windows.Foundation.Metadata.Guid(4122265855, 7581, 18837, 159, 234, 77, 21, 37, 124, 7, 87)]
[Windows.Foundation.Metadata.Deprecated("MessageReceivedCallback is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
public delegate void MessageReceivedCallback(Guid receiverId, IReadOnlyList<object> message);
var messageReceivedCallbackHandler = function(receiverId, message){
/* Your code */
}
Public Delegate Sub MessageReceivedCallback(receiverId As Guid, message As IReadOnlyList(Of Object))

參數

receiverId
Guid

Platform::Guid

winrt::guid

訊息接收者的 GUID。

message

IVectorView<Object>

IReadOnlyList<Object>

IVectorView<Platform::Object>

IVectorView<IInspectable>

IVectorView

屬性

Windows 需求

裝置系列
Windows 10, version 2004 (已於 10.0.19041.0 引進)
API contract
Windows.Security.Isolation.IsolatedWindowsEnvironmentContract (已於 v2.0 引進)

備註

警告

這是已被取代的 API。

適用於