Browse Prior Art Database

ICONGRAB Executable Program Parser

IP.com Disclosure Number: IPCOM000120343D
Original Publication Date: 1991-Apr-01
Included in the Prior Art Database: 2005-Apr-02
Document File: 3 page(s) / 126K

Publishing Venue

IBM

Related People

Lock, KA: AUTHOR

Abstract

This article describes a program that can open executable files, parse them for selected information including icons, execution mode and entry points, and build icon and pointer resources into handles that can be used directly for drawing and manipulation routines on the screen. The program accesses this information by reading the header information built by compilers for OS/2*.

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

ICONGRAB Executable Program Parser

      This article describes a program that can open executable
files, parse them for selected information including icons, execution
mode and entry points, and build icon and pointer resources into
handles that can be used directly for drawing and manipulation
routines on the screen.  The program accesses this information by
reading the header information built by compilers for OS/2*.

      Previously, there was no available way to access resources and
program information external to a developer's application.  This
information includes available entry points (in the case of a Dynamic
Link Library, or DLL), execution mode (such as DOS, OS/2 Full Screen,
MS-Windows...), and most importantly, icons that represent a
minimized or available application to OS/2. Once resources, such as
icons, have been accessed, there was still no way to build the raw
data into a usable form for the screen.

      The ICONGRAB utility provides a number of APIs allowing a
program to do the following:
  -  Build icon images from files, both resource compiled and raw
.ICO data.
  -  Determine the execution mode of an executable program. These
modes include OS/2 Full Screen, OS/2 VIO Window, Presentation
Manager*, DOS, and MS-Windows.
  -  Determine the entry points contained in a DLL

      A description of the APIs available to access resources and
executable information are shown below (the structures used are shown
first):
struct _imagestruct {
 HPOINTER       hpointer;     // this pointer handle is
                                 built from icon data
 USHORT         ProgType;     // this is the execution mode
                                   of the given program
                                   }; struct _entrypnts {
 PSZ      szEntry
 USHORT   usOrdinal;
 struct _entrypnts  *next;
 };
INT EXPENTRY icogen(PBYTE pMem, BOOL MakeHPTR, struct _imagestruct
*);
  This API allows icon data in memory to be passed in
  (pMem) and a HPOINTER to be built using a system call.
INT EXPENTRY icoload(PSZ szPathName, PBYTE DataBuf);

      This API allows the name of an executable program on disk to be
passed in (szPathName), where its header information is read, then
its representative icon is located but not built into an HPOINTER.
It is returned in the buffer DataBuf.
INT EXPENTRY icoextract(PSZ szPathName, struct _imagestruct
*imagestruct);

      This API allows the name of an executable program on disk to be
passed in (szPathName), where its header information is read to
determine its execution mode (returned in ProgType) and then a
HPOINTER is built using icogen.
INT EXPENTRY icofile(PSZ szIconFile, struct _imagestruct
*imagestruct);

      This API allows the name of an icon file on disk to be passed
in (szPathName).  This file will be opened and read into me...