Szerkesztés

Megosztás a következőn keresztül:


ActiveXMessageFormatter.Read(Message) Method

Definition

Reads the contents from the given message and creates an object that contains the deserialized message.

public:
 virtual System::Object ^ Read(System::Messaging::Message ^ message);
public object Read (System.Messaging.Message message);
abstract member Read : System.Messaging.Message -> obj
override this.Read : System.Messaging.Message -> obj
Public Function Read (message As Message) As Object

Parameters

message
Message

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

Returns

The deserialized message.

Implements

Exceptions

The 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.

Remarks

If the body of the message represents a primitive type, the message's BodyType property must be one of the managed types in the following table.

BodyType value Managed type
VT_LPSTR Char array (deserialized using ASCII encoding)
VT_BSTR, VT_LPWSTR String (deserialized using Unicode encoding)
VT_VECTOR | VT_UI1 Byte array
VT_BOOL Boolean
VT_CLSID Guid
VT_CY Decimal
VT_DATE DateTime
VT_I1, VT_UI1 Byte
VT_I2 Int16
VT_UI2 UInt16
VT_I4 Int32
VT_UI4 UInt32
VT_I8 Int64
VT_UI8 UInt64
VT_R4 Single
VT_R8 Double
VT_NULL null
VT_STREAMED_OBJECT Object

Applies to

See also