The IMessageQueueHandle class is a wrapper for application message queue handles.
The X Toolkit message queue is created when the thread performs ICurrentThread::initializeGUI. Because there is no externalized system type for the message queue, the message queue handle is the thread ID of the thread.
Use IMessageQueueHandle in system calls where the OS/2 Programmer's Toolkit type HMQ is required.
The system creates the message queue automatically for a thread. The message queue handle is the thread ID of the thread.
You can construct objects of this class.
![]() |
public:
IMessageQueueHandle(Value value = 0)
Constructs objects of this class from a message queue handle (a value of type IMessageQueueHandle::Value), which defaults to 0.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to obtain diagnostic information.
![]() |
public:
IString asDebugInfo() const
Returns the handle as a string containing diagnostic information.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IString asString() const
Returns the handle as a string of form nnnn.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long asUnsigned() const
Returns the handle value as an unsigned long value.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to post an event to message queue handles.
![]() |
Places an event constructed from the parameters on a message queue. Use these functions in cases where you have the message queue handle but not an IThread object for the target thread.
For portable applications, use IThread::postEvent to place an event on the event queue of a thread within your application.
public:
static void postEvent( const IMessageQueueHandle& handle, unsigned long eventId, const IEventParameter1& parm1 = 0ul, const IEventParameter2& parm2 = 0ul )
Places the event on the specified message queue.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
void postEvent( unsigned long eventId, const IEventParameter1& parm1 = 0ul, const IEventParameter2& parm2 = 0ul ) const
Places the event on this message queue.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void postEvents( unsigned long eventId, const IEventParameter1& parm1 = 0ul, const IEventParameter2& parm2 = 0ul )
Broadcasts an event to other message queue handles asynchronously.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Type conversion operators convert objects of this class to a different type.
![]() |
public:
operator Value() const
Returns the handle as its operating system dependent type. Use this operator when you use the handle object as an argument to an operating system function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
typedef unsigned long Value
This type definition defines Value to be an unsigned long on the OS/2 platform. On all other platforms Value is defined to be a void*.
typedef unsigned long Value
Windows | OS/2 | AIX |
No | Yes | No |
typedef void * Value
Windows | OS/2 | AIX |
Yes | No | No |