### IMessageQueueHandle

  The IMessageQueueHandle class is a wrapper for application message queue handles.

#### AIX Considerations

  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.

#### OS/2 Considerations

  Use IMessageQueueHandle in system calls where the OS/2 Programmer's Toolkit type HMQ is required.

#### Windows Considerations

  The system creates the message queue automatically for a thread. The message queue handle is the thread ID of the thread.

### IMessageQueueHandle - Member Functions and Data by Group

### Constructors & Destructor

You can construct objects of this class.

IMessageQueueHandle

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Diagnostics

Use these members to obtain diagnostic information.

asDebugInfo

      public:
      IString asDebugInfo() const

  Returns the handle as a string containing diagnostic information.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

asString

      public:
      IString asString() const

  Returns the handle as a string of form nnnn.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

asUnsigned

      public:
      unsigned long asUnsigned() const

  Returns the handle value as an unsigned long value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Post Event

Use these members to post an event to message queue handles.

postEvent

  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.

  Overload 1

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      void
        postEvent( unsigned long eventId,
                   const IEventParameter1& parm1 = 0ul,
                   const IEventParameter2& parm2 = 0ul ) const

  Places the event on this message queue.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

postEvents

      public:
      static void
        postEvents( unsigned long eventId,
                    const IEventParameter1& parm1 = 0ul,
                    const IEventParameter2& parm2 = 0ul )

  Broadcasts an event to other message queue handles asynchronously.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Type Conversions

Type conversion operators convert objects of this class to a different type.

operator Value

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IMessageQueueHandle - Type Definitions

Value

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

  Variation 1

      typedef unsigned long Value

Supported Platforms

  Windows | OS/2 | AIX
  No | Yes | No

  Variation 2

      typedef void * Value

Supported Platforms

  Windows | OS/2 | AIX
  Yes | No | No

### IMessageQueueHandle - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None