DeserializeMethodResponse Method

BinaryFormatter.DeserializeMethodResponse Method

Deserializes a response to a remote method call from the provided Stream.

[Visual Basic]
Public Function DeserializeMethodResponse( _
   ByVal serializationStream As Stream, _
   ByVal handler As HeaderHandler, _
   ByVal methodCallMessage As IMethodCallMessage _
) As Object
public object DeserializeMethodResponse(
 Stream serializationStream,
 HeaderHandler handler,
 IMethodCallMessage methodCallMessage
public: Object* DeserializeMethodResponse(
 Stream* serializationStream,
 HeaderHandler* handler,
 IMethodCallMessage* methodCallMessage
public function DeserializeMethodResponse(
   serializationStream : Stream,
 handler : HeaderHandler,
 methodCallMessage : IMethodCallMessage
) : Object;


The stream from which to deserialize the object graph.
The HeaderHandler that handles any headers in the serializationStream. Can be a null reference (Nothing in Visual Basic).
The IMethodCallMessage containing details about where the call came from.

Return Value

The deserialized response to the remote method call.


Exception Type Condition
ArgumentNullException The serializationStream is a null reference (Nothing in Visual Basic).
SerializationException The serializationStream supports seeking, but its length is 0.
SecurityException The caller does not have the required permission.


Details about the caller object are not sent to the remote object during the method call. Instead, these details are obtained from the original method call that is passed to the current method in the methodCallMessage parameter.

Note   In order for deserialization to succeed the current position in the stream must be at the beginning of the object graph.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

BinaryFormatter Class | BinaryFormatter Members | System.Runtime.Serialization.Formatters.Binary Namespace

© 2015 Microsoft