Browse Prior Art Database

Presentation Manager Message Request Block

IP.com Disclosure Number: IPCOM000106917D
Original Publication Date: 1992-Jan-01
Included in the Prior Art Database: 2005-Mar-21
Document File: 5 page(s) / 162K

Publishing Venue

IBM

Related People

Morris, RP: AUTHOR [+2]

Abstract

A method for passing diverse data structures among OS/2* Presentation Manager* (PM) windows using a common control block is disclosed. The method enables both asynchronous and synchronous message processing maintaining a FIFO (first-in, first-out) order of processing. Also enabled are the correlation of response messages, the simulation of synchronous processing when code modules are not reentrant, standard coding for tracing and debugging, and common memory management for messaging within an application.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 38% of the total text.

Presentation Manager Message Request Block

       A method for passing diverse data structures among OS/2*
Presentation Manager* (PM) windows using a common control block is
disclosed.  The method enables both asynchronous and synchronous
message processing maintaining a FIFO (first-in, first-out) order of
processing.  Also enabled are the correlation of response messages,
the simulation of synchronous processing when code modules are not
reentrant, standard coding for tracing and debugging, and common
memory management for messaging within an application.

      The data structure that follows will be called an MRQST
throughout the remainder of this document.  The format of the MRQST
is
      MsgId - USHORT
      A 2-byte field containing the id passed in the
      WinPostMsg() call.
      RE - USHORT
      A 2-byte field for a return code.  Used only for synchronous
message processing.
      PostHwnd - HWND
      A 4-byte field identifying the handle of the window to which to
post a response.  This field is for asynchronous message processing.
      PostMsgid - USHORT
      A 2-byte field identifying the message id to post the response
with.  This field is for asynchronous message processing.
      Semaphore - HSEM
      A 4-byte field used as a RAM semaphore for synchronous message
processing.
      pData - pVOID
      A 4 -byte field used as a pointer to a data structure
associated with the particular message sent.
      pBuffer - pVOID
      A 4-byte field used as a pointer to additional data. LAN
Network Manager uses it to point to adapter buffers.
      Correlator - ULONG
      A 4-byte field which can be used by the message sender to store
any value.  Used for asynchronous message processing.  The value is
returned in the Correlator field of the message posted in response.
LAN Network Manager uses this field for correlating responses to
multiple messages of the same id processed asynchronously.
      Miscellaneous - CHAR(*)
      A string of characters whose length and use is specific to the
message sent.
      MsgId is the only required field.
      Semaphore and Rc are used only for posted messages to be
processed synchronously.  They should be set to zero for asynchronous
processing.
      PostHwnd and PostMsgId are used only for messages to be
processed asynchronously.  They should be set to zero for synchronous
processing.
      pData, pBuffer, Miscellaneous are optional fields whose use is
specific to each message.

      To post a message to a window to be processed asynchronously to
the posting window's thread, the posting thread must:
      1.   Set MsgId = the appropriate message to be processed.
      2.   Set PostHwnd = the window handle that will process the
message response.  This should be zero if there is no post processing
required.
      3.   Set PostMsgId =...