System.Messaging Reference (Document! X Sample)
Read Method (ActiveXMessageFormatter)



System.Messaging Namespace > ActiveXMessageFormatter Class : Read Method
The Message, in MSMQ ActiveX control format, to deserialize.
Reads the contents from the given message and creates an object that contains the deserialized message.
Syntax
'Declaration
 
Public Function Read( _
   ByVal message As Message _
) As Object
'Usage
 
Dim instance As ActiveXMessageFormatter
Dim message As Message
Dim value As Object
 
value = instance.Read(message)
public object Read( 
   Message message
)
public:
Object^ Read( 
   Message^ message
) 

Parameters

message
The Message, in MSMQ ActiveX control format, to deserialize.

Return Value

The deserialized message.
Exceptions
ExceptionDescription
The Message.BodyType property of the message passed as a parameter cannot be mapped to a primitive type, nor does it represent a streamed object.
The body represents a stored object. The ActiveXMessageFormatter does not support deserialization of stored objects.
The message parameter is null.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ActiveXMessageFormatter Class
ActiveXMessageFormatter Members