Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Preserving Unique Key for Window Procedures

IP.com Disclosure Number: IPCOM000107816D
Original Publication Date: 1992-Mar-01
Included in the Prior Art Database: 2005-Mar-22
Document File: 2 page(s) / 70K

Publishing Venue

IBM

Related People

Weber, OW: AUTHOR

Abstract

This article describes a method of preserving a unique key for window procedures in OS/2* Presentation Manager* (PM) application programs. The parameters passed to a window procedure are fixed, i.e., a handle, a message, and two message parameters, but the window procedure needs to be able to use a unique key for allocating persistent storage which will also be known by the main procedure and other procedures.

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

Preserving Unique Key for Window Procedures

       This article describes a method of preserving a unique
key for window procedures in OS/2* Presentation Manager* (PM)
application programs.  The parameters passed to a window procedure
are fixed, i.e., a handle, a message, and two message parameters, but
the window procedure needs to be able to use a unique key for
allocating persistent storage which will also be known by the main
procedure and other procedures.

      Consider the following scenario:  An application program calls
a PM program, called APROC.  APROC is a main procedure, and it
creates a window whose associated window procedure is AWINPROC.
AWINPROC allocates persistent storage for subsequent use by APROC and
other functions, using the handle of the client window as the key,
since a unique key is required.  However, APROC and other functions
later need access to this persistent storage, but they don't know the
key. This article describes a new method which will insure that all
programs can access the required unique key.

      The new method of preserving the data includes several steps.
First of all, when the application calls APROC, APROC calls
CreateStdWindow.  For the parameter of the client window, it passes
the address of GLOBAL_HANDLE, a handle in global storage. AWINPROC
allocates persistent storage, using its client window handle as the
unique key to the persistent storage.  It then stores data in the
persistent storage area which is needed both by APROC as well as
other window procedures.

      APROC later gains access to the persistent storage by
specifying GLOBAL_HANDL...