Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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
[C#]
public object DeserializeMethodResponse(
 Stream serializationStream,
 HeaderHandler handler,
 IMethodCallMessage methodCallMessage
);
[C++]
public: Object* DeserializeMethodResponse(
 Stream* serializationStream,
 HeaderHandler* handler,
 IMethodCallMessage* methodCallMessage
);
[JScript]
public function DeserializeMethodResponse(
   serializationStream : Stream,
 handler : HeaderHandler,
 methodCallMessage : IMethodCallMessage
) : Object;

Parameters

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

Return Value

The deserialized response to the remote method call.

Exceptions

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.

Remarks

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.

Requirements

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

Show:
© 2015 Microsoft