ActiveXMessageFormatter.Read(Message) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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 |