System.Messaging.TMessage
Delphi
TMessage = TMessageBase;
TMessage<T> = class (TMessage)
C++
template<typename T> class PASCALIMPLEMENTATION TMessage__1 : public TMessageBase
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | System.Messaging.pas System.Messaging.hpp |
System.Messaging | System.Messaging |
Description
Represents the base class for all messages.
TMessage represents the base class used for message purposes. It can be inherited in order to send custom messages.
Warning: For C++ projects, use TMessageBase instead.
Using Objects as Contents
The contents of a TMessage can be of any type, including classes. However, when you create a TMessage with an object as value, TMessage does not take ownership of the object; you must delete the object yourself, and ensure that the message has been deleted first. TObjectMessage, a subclass of TMessage, allows messages to take ownership of their contents.
See Also
- System.Messaging.TMessageBase
- Sending and Receiving Messages Using the RTL
- System.Messaging.TMessageManager
- System.Messaging (Delphi) code example
- System.Messaging (C++) code example