Export (0) Print
Expand All

ActiveXMessageFormatter Class

Serializes or deserializes primitive data types and other objects to or from the body of a Message Queuing message, using a format that is compatible with the MSMQ ActiveX Component.

System.Object
  System.Messaging.ActiveXMessageFormatter

Namespace:  System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

public class ActiveXMessageFormatter : IMessageFormatter, 
	ICloneable

The ActiveXMessageFormatter type exposes the following members.

  NameDescription
Public methodActiveXMessageFormatterInitializes a new instance of the ActiveXMessageFormatter class.
Top

  NameDescription
Public methodCanReadDetermines whether the formatter can deserialize the contents of the message.
Public methodCloneCreates an instance of the ActiveXMessageFormatter class that is identical to the current ActiveXMessageFormatter.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberInitStreamedObjectProvides a utility to help serialize COM objects that implement IPersistStream and require IPersistStreamInit to be called.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodReadReads the contents from the given message and creates an object that contains the deserialized message.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWriteSerializes an object into the body of the message.
Top

The ActiveXMessageFormatter is compatible with messages sent using Message Queuing COM components, allowing interoperability with applications that use the MSMQ COM control.

The ActiveXMessageFormatter can serialize most primitives, as well as objects that implement the IPersistStream OLE interface. It can deserialize the same set of primitives, but requires further effort when deserializing a COM object (for example, an object created using Visual Basic 6.0) that implements IPersistStream. The object to deserialize must be in memory by first importing the object into a .NET Framework application.

When an application sends a message to the queue using an instance of the MessageQueue class, the formatter serializes the object into a stream and inserts it into the message body. When reading from a queue using a MessageQueue, the formatter deserializes the message data into the Body property of a Message.

ActiveX serialization is very compact, which makes using the ActiveXMessageFormatter and MSMQ COM control a very fast method of serialization.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft