
(* ------------- Include file: .\hm\os2.hm ------------- *)
<* M2EXTENSIONS + *>
DEFINITION MODULE ["C"] OS2;
IMPORT SYSTEM;


(*static char *SCCSID = "@(#)os2.h	6.6 92/03/15";*)
(****************************** Module Header ******************************\
*                                                                          *
* Copyright (c) 1987  - 1992 IBM Corporation                               *
*                                                                          *
* Module Name: OS2.H                                                       *
*                                                                          *
* This is the top level include file that includes all the files necessary *
* for writing an OS/2 application.                                         *
*                                                                          *
\***************************************************************************)

<* IF NOT DEFINED (__OS2_H__)  THEN *>
<* NEW __OS2_H__ + *>

<* NEW OS2_INCLUDED + *>

(* Common definitions *)

(* ------------- Include file: .\hm\os2def.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: OS2DEF.H
*
* OS/2 Common Definitions file
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)
(* NOINC *)
----Original:
--#define FAR         (* this will be deleted shortly *)
--#define NEAR        (* this will be deleted shortly *)
--#define APIENTRY    _System
--#define EXPENTRY    _System
--#define APIENTRY16  _Far16 _Pascal
--#define PASCAL16    _Far16 _Pascal
--#define CDECL16     _Far16 _Cdecl

CONST APIENTRY    = "SysCall"; -- for APIENTRY       
CONST EXPENTRY    = "SysCall"; -- for EXPENTRY...
<* IF DEFINED(__NEWER_DEFINED_NAME) THEN *> (* it was '#if' 0 in the source text *)
    CONST APIENTRY16  = 2;
<* END *>

TYPE VOID = SYSTEM.void;
(* INC *)

TYPE APIRET   = SYSTEM.CARD32;      -- unsigned long
TYPE APIRET16 = SYSTEM.CARD16;      -- unsigned short
TYPE APIRET32 = SYSTEM.CARD32;      -- unsigned long

TYPE SHANDLE  = SYSTEM.CARD16;      -- unsigned short
TYPE LHANDLE  = SYSTEM.CARD32;      -- unsigned long

CONST NULLHANDLE  = LHANDLE(0);
CONST NULLSHANDLE = LHANDLE(0);

(* NOINC *)
--TYPE CHAR    = CHAR;          (* ch  *)
TYPE SHORT     = SYSTEM.INT16;  (* s   *)
TYPE LONG      = SYSTEM.INT32;  (* l   *)

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
    TYPE INT       = SYSTEM.int;  (* i   *)
<* END *>
(* INC *)

TYPE UCHAR       = CHAR;           (* uch *)
TYPE USHORT      = SYSTEM.CARD16;  (* us  *)
TYPE ULONG       = SYSTEM.CARD32;  (* ul  *)

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      TYPE UINT     = SYSTEM.unsigned;(* ui  *)
<* END *>

<* IF DEFINED(__NEWER_DEFINED_NAME) THEN *> (* it was '#if' 0 in the source text *)
    TYPE PUCHAR16    = POINTER TO UCHAR;     
    TYPE PCHAR16     = POINTER TO CHAR;
<* END *>

TYPE BYTE        = SYSTEM.CARD8;    (* b   *)

TYPE PSZ         = POINTER TO CHAR;
TYPE NPSZ        = POINTER TO CHAR;

TYPE PCH         = POINTER TO CHAR;
TYPE NPCH        = POINTER TO CHAR;
TYPE PCSZ        = POINTER TO CHAR;
TYPE PPCSZ       = POINTER TO PCSZ;

TYPE PFN  = PROCEDURE [APIENTRY] (): INT;
TYPE NPFN = PROCEDURE [APIENTRY] (): INT;
(*
--   declarations before are interprited by Modula as
--   a pointers, original _PFN and _NPFN are newer used.
Original:
      TYPE PFN  = POINTER TO _PFN; 
      TYPE NPFN = POINTER TO _NPFN;
*)


TYPE PBYTE       = POINTER TO BYTE;
TYPE NPBYTE      = POINTER TO BYTE;

TYPE PCHAR       = POINTER TO CHAR;
TYPE PPCHAR      = POINTER TO PCHAR;
TYPE PSHORT      = POINTER TO SHORT;
TYPE PLONG       = POINTER TO LONG;

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      TYPE PINT     = POINTER TO INT;
<* END *>

TYPE PUCHAR      = POINTER TO UCHAR;
TYPE PUSHORT     = POINTER TO USHORT;
TYPE PULONG      = POINTER TO ULONG;

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      TYPE PUINT    = POINTER TO UINT;
<* END *>

TYPE PVOID       = POINTER TO SYSTEM.void; 
TYPE PPVOID      = POINTER TO PVOID;
<* IF DEFINED(__NEWER_DEFINED_NAME) THEN *> (* it was '#if' 0 in the source text *)
    TYPE PVOID16     = PVOID;            
<* END *>

TYPE BOOL        = SYSTEM.CARD32;          (* f   *)
TYPE PBOOL       = POINTER TO BOOL;


(* NOINC *)
TYPE BOOL32      = BOOL;
TYPE PBOOL32     = PBOOL;
(* INC *)

(* Quad-word *)
(* NOINC *)
TYPE QWORD = RECORD         (* qword *)
      ulLo: ULONG;
      ulHi: ULONG;
END;
TYPE PQWORD = POINTER TO QWORD;
(* INC *)

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      TYPE SEL       = SYSTEM.CARD16;    (* sel *)
      TYPE PSEL      = POINTER TO SEL;

      (*** Useful Helper Macros *)(* Sorry. Can't use macro *)

      (* Create untyped far pointer from selector and offset *)
      --#define MAKEP( sel,off ) (( void * )( void * _Seg16 )( (sel) << 16 | (off) ))
      --#define MAKE16P( sel,off ) (( void * _Seg16 )( (sel) << 16 | (off) ))

      (* Extract selector or offset from far pointer *)
      (* Warning:the selectorof macro should not be used*)
      (* for 32 bit objects                             *)
      --#define SELECTOROF(ptr)     ((((ULONG)(ptr))>>13)|7)
      --#define OFFSETOF(p)         (((PUSHORT)&(p))[0])
<* END *>

(* Cast any variable to an instance of the specified type. *)
--#define MAKETYPE(v, type)   (*((type *)&v))

(* Calculate the byte offset of a field in a structure of type type. *)
--#define FIELDOFFSET(type, field)    ((SHORT)&(((type *)0)->field))

(* Combine l & h to form a 32 bit quantity. *)
--#define MAKEULONG(l, h)  ((ULONG)(((USHORT)(l)) | ((ULONG)((USHORT)(h))) << 16))
--#define MAKELONG(l, h)   ((LONG)MAKEULONG(l, h))

(* Combine l & h to form a 16 bit quantity. *)
--#define MAKEUSHORT(l, h) (((USHORT)(l)) | ((USHORT)(h)) << 8)
--#define MAKESHORT(l, h)  ((SHORT)MAKEUSHORT(l, h))

(* Extract high and low order parts of 16 and 32 bit quantity *)
--#define LOBYTE(w)       LOUCHAR(w)
--#define HIBYTE(w)       HIUCHAR(w)
--#define LOUCHAR(w)      ((UCHAR)(w))
--#define HIUCHAR(w)      ((UCHAR)(((USHORT)(w) >> 8) & 0xff))
--#define LOUSHORT(l)     ((USHORT)((ULONG)l))
--#define HIUSHORT(l)     ((USHORT)(((ULONG)(l) >> 16) & 0xffff))

(*** Common Error definitions ****)

TYPE ERRORID  = CARDINAL;
TYPE PERRORID = POINTER TO ERRORID;

(* Combine severity and error code to produce ERRORID *)
--#define MAKEERRORID(sev, error) (ERRORID)(MAKEULONG((error), (sev)))

(* Extract error number from an errorid *)
--#define ERRORIDERROR(errid)            (LOUSHORT(errid))

(* Extract severity from an errorid *)
--#define ERRORIDSEV(errid)              (HIUSHORT(errid))

(* Severity codes *)
CONST SEVERITY_NOERROR = 0000H;
CONST SEVERITY_WARNING = 0004H;
CONST SEVERITY_ERROR   = 0008H;
CONST SEVERITY_SEVERE  = 000CH;
CONST SEVERITY_UNRECOVERABLE = 0010H;

(* Base component error values *)

CONST WINERR_BASE =  1000H;  (* Window Manager                  *)
CONST GPIERR_BASE =  2000H;  (* Graphics Presentation Interface *)
CONST DEVERR_BASE =  3000H;  (* Device Manager                  *)
CONST SPLERR_BASE =  4000H;  (* Spooler                         *)

(*** Common types used across components *)

(*** Common DOS types *)

TYPE HMODULE = LHANDLE;        (* hmod *)
TYPE PID     = LHANDLE;        (* pid  *)
TYPE TID     = LHANDLE;        (* tid  *)

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      TYPE SGID = USHORT;            (* sgid *)
<* END *>

TYPE PHMODULE = POINTER TO HMODULE;
TYPE PPID     = POINTER TO PID;
TYPE PTID     = POINTER TO TID;

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
   <* IF NOT DEFINED (__HSEM__)  THEN *>
<* NEW __HSEM__ + *>
              TYPE HSEM   = SYSTEM.ADDRESS;      (* hsem *)
              TYPE PHSMEM = POINTER TO HSEM;
   <* END *>
<* END *>

(*** Common SUP types *)

TYPE HAB  = LHANDLE;         (* hab  *)
TYPE PHAB = POINTER TO HAB;

(*** Common GPI/DEV types *)

TYPE HPS  = LHANDLE;         (* hps  *)
TYPE PHPS = POINTER TO HPS;

TYPE HDC  = LHANDLE;         (* hdc  *)
TYPE PHDC = POINTER TO HDC;

TYPE HRGN  = LHANDLE;        (* hrgn *)
TYPE PHRGN = POINTER TO HRGN;

TYPE HBITMAP  = LHANDLE;     (* hbm  *)
TYPE PHBITMAP = POINTER TO HBITMAP;

TYPE HMF  = LHANDLE;         (* hmf  *)
TYPE PHMF = POINTER TO HMF;

TYPE HPAL  = LHANDLE;        (* hpal *)
TYPE PHPAL = POINTER TO HPAL;

TYPE COLOR  = LONG;        (* clr  *)
TYPE PCOLOR = POINTER TO COLOR;

TYPE POINTL = RECORD        (* ptl  *)
      x: LONG;
      y: LONG;
END;

TYPE PPOINTL = POINTER TO POINTL;
TYPE NPPOINTL = POINTER TO POINTL;

TYPE POINTS = RECORD        (* pts *)
      x: SHORT;
      y: SHORT;
END;
TYPE PPOINTS = POINTER TO POINTS;

TYPE RECTL = RECORD          (* rcl *)
      xLeft,
      yBottom,
      xRight,
      yTop: LONG;
END;
TYPE PRECTL  = POINTER TO RECTL;
TYPE NPRECTL = POINTER TO RECTL;

TYPE STR8  = ARRAY [0..7] OF CHAR;    (* str8 *)
TYPE PSTR8 = POINTER TO STR8;

(*** common DEV/SPL types *)

(* structure for Device Driver data *)

TYPE DRIVDATA = RECORD       (* driv *)
      cb:        LONG;
      lVersion:  LONG;
      szDeviceName:  ARRAY [0..31] OF CHAR;
      abGeneralData: ARRAY [0..0]  OF CHAR;
END;
TYPE PDRIVDATA = POINTER TO DRIVDATA;

(* pointer data for DevOpenDC *)

TYPE PDEVOPENDATA = POINTER TO PSZ;

(* array indices for array parameter for DevOpenDC, SplQmOpen or SplQpOpen *)

CONST ADDRESS           =  0;
<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      CONST DRIVER_NAME    =  1;
      CONST DRIVER_DATA    =  2;
      CONST DATA_TYPE      =  3;
      CONST COMMENT        =  4;
      CONST PROC_NAME      =  5;
      CONST PROC_PARAMS    =  6;
      CONST SPL_PARAMS     =  7;
      CONST NETWORK_PARAMS =  8;

      (* structure definition as an alternative of the array parameter *)

      TYPE DEVOPENSTRUC = RECORD     (* dop *)
            pszLogAddress,
            pszDriverName:    PSZ;
            pdriv:            PDRIVDATA;
            pszDataType,
            pszComment,
            pszQueueProcName,
            pszQueueProcParams,
            pszSpoolerParams,
            pszNetworkParams: PSZ;
      END;
      TYPE PDEVOPENSTRUC = POINTER TO DEVOPENSTRUC;
<* END *>

(* common PMWP object and PMSTDDLG drag data *)

TYPE PRINTDEST = RECORD     (* prntdst *)
      cb:         ULONG;
      lType:      LONG;
      pszToken:   PSZ;
      lCount:     LONG;
      pdopData:   PDEVOPENDATA;
      fl:         ULONG;
      pszPrinter: PSZ;
END;
TYPE PPRINTDEST = POINTER TO PRINTDEST;

CONST PD_JOB_PROPERTY  =  0001H;      (* Flags for .fl field           *)

(*** common AVIO/GPI types *)

(* values of fsSelection field of FATTRS structure *)
CONST FATTR_SEL_ITALIC      =  0001H;
CONST FATTR_SEL_UNDERSCORE  =  0002H;
CONST FATTR_SEL_OUTLINE     =  0008H;
CONST FATTR_SEL_STRIKEOUT   =  0010H;
CONST FATTR_SEL_BOLD        =  0020H;

(* values of fsType field of FATTRS structure *)
CONST FATTR_TYPE_KERNING    =  0004H;
CONST FATTR_TYPE_MBCS       =  0008H;
CONST FATTR_TYPE_DBCS       =  0010H;
CONST FATTR_TYPE_ANTIALIASED=  0020H;

(* values of fsFontUse field of FATTRS structure *)
CONST FATTR_FONTUSE_NOMIX         = 0002H;
CONST FATTR_FONTUSE_OUTLINE       = 0004H;
CONST FATTR_FONTUSE_TRANSFORMABLE = 0008H;
(* size for fields in the font structures *)

CONST FACESIZE = 32;

(* font struct for Vio/GpiCreateLogFont *)

TYPE FATTRS = RECORD            (* fat *)
      usRecordLength:   USHORT;
      fsSelection:      USHORT;
      lMatch:           LONG;
      szFacename:       ARRAY [0..FACESIZE-1] OF CHAR;
      idRegistry:       USHORT;
      usCodePage:       USHORT;
      lMaxBaselineExt:  LONG;
      lAveCharWidth:    LONG;
      fsType:           USHORT;
      fsFontUse:        USHORT;
END;
TYPE PFATTRS = POINTER TO FATTRS;

(* values of fsType field of FONTMETRICS structure *)
CONST FM_TYPE_FIXED          = 0001H;
CONST FM_TYPE_LICENSED       = 0002H;
CONST FM_TYPE_KERNING        = 0004H;
CONST FM_TYPE_DBCS           = 0010H;
CONST FM_TYPE_MBCS           = 0018H;
CONST FM_TYPE_64K            = 8000H;
CONST FM_TYPE_ATOMS          = 4000H;
CONST FM_TYPE_FAMTRUNC       = 2000H;
CONST FM_TYPE_FACETRUNC      = 1000H;

(* values of fsDefn field of FONTMETRICS structure *)
CONST FM_DEFN_OUTLINE        = 0001H;
CONST FM_DEFN_IFI            = 0002H;
CONST FM_DEFN_WIN            = 0004H;
CONST FM_DEFN_GENERIC        = 8000H;

(* values of fsSelection field of FONTMETRICS structure *)
CONST FM_SEL_ITALIC          = 0001H;
CONST FM_SEL_UNDERSCORE      = 0002H;
CONST FM_SEL_NEGATIVE        = 0004H;
CONST FM_SEL_OUTLINE         = 0008H;          (* Hollow Outline Font *)
CONST FM_SEL_STRIKEOUT       = 0010H;
CONST FM_SEL_BOLD            = 0020H;
CONST FM_SEL_ISO9241_TESTED  = 0040H;

(* ISO 9241 is an international standard covering health and safety      *)
(* in the work place for users of visual display terminals. Part 3 of    *)
(* this standard covers clarity and legibility of text displayed on      *)
(* computer screens, it places requirements on minimum sizes and         *)
(* luminance contrast. The presence of FM_SEL_ISO9241_TESTED flag in the *)
(* font metrics indicates that the font has been tested for compliance   *)
(* to the standard. The FM_ISO_XXX flags indicate the results of the     *)
(* test on the IBM 9515, 9517 and 9518 color displays at the supported   *)
(* dimensions of 640x480 and 1024x768. To ensure compliance the          *)
(* sXDeviceRes and sYDeviceRes must also match the target display        *)
(* resolution.                                                           *)

(* values of fbPassed/FailedISO field in the PANOSE structure *)
CONST FM_ISO_9518_640       = 01H;
CONST FM_ISO_9515_640       = 02H;
CONST FM_ISO_9515_1024      = 04H;
CONST FM_ISO_9517_640       = 08H;
CONST FM_ISO_9517_1024      = 10H;

(* values of fsCapabilities field of FONTMETRICS structure *)
CONST FM_CAP_NOMIX          =  0001H;

(* font metrics returned by GpiQueryFonts and others *)

TYPE PANOSE = RECORD  (* panose *)
      bFamilyType,
      bSerifStyle,
      bWeight,
      bProportion,
      bContrast,
      bStrokeVariation,
      bArmStyle,
      bLetterform,
      bMidline,
      bXHeight,
      fbPassedISO,
      fbFailedISO: BYTE;
END;

TYPE FONTMETRICS = RECORD    (* fm *)
      szFamilyname:    ARRAY [0..FACESIZE-1] OF CHAR;
      szFacename:      ARRAY [0..FACESIZE-1] OF CHAR;
      idRegistry:        USHORT;
      usCodePage:        USHORT;
      lEmHeight,
      lXHeight,
      lMaxAscender,
      lMaxDescender,
      lLowerCaseAscent,
      lLowerCaseDescent,
      lInternalLeading,
      lExternalLeading,
      lAveCharWidth,
      lMaxCharInc,
      lEmInc,
      lMaxBaselineExt:   LONG;
      sCharSlope:        SHORT;
      sInlineDir:        SHORT;
      sCharRot:          SHORT;
      usWeightClass:     USHORT;
      usWidthClass:      USHORT;
      sXDeviceRes,
      sYDeviceRes,
      sFirstChar,
      sLastChar,
      sDefaultChar,
      sBreakChar,
      sNominalPointSize,
      sMinimumPointSize,
      sMaximumPointSize: SHORT;
      fsType:            USHORT;
      fsDefn:            USHORT;
      fsSelection:       USHORT;
      fsCapabilities:    USHORT;
      lSubscriptXSize,
      lSubscriptYSize,
      lSubscriptXOffset,
      lSubscriptYOffset,
      lSuperscriptXSize,
      lSuperscriptYSize,
      lSuperscriptXOffset,
      lSuperscriptYOffset,
      lUnderscoreSize,
      lUnderscorePosition,
      lStrikeoutSize,
      lStrikeoutPosition:LONG;
      sKerningPairs:     SHORT;
      sFamilyClass:      SHORT;
      lMatch:            LONG;
      FamilyNameAtom:    LONG;
      FaceNameAtom:      LONG;
      panose:            PANOSE;
END;
TYPE PFONTMETRICS = POINTER TO FONTMETRICS;

(*** Common WIN types *)

TYPE HWND  = LHANDLE;      (* hwnd *)
TYPE PHWND = POINTER TO HWND;

TYPE HMQ  = LHANDLE;       (* hmq *)
TYPE PHMQ = POINTER TO LHANDLE;

(* NOINC *)
--#define WRECT RECTL
--#define PWRECT PRECTL
--#define NPWRECT NPRECTL

--#define WPOINT POINTL
--#define PWPOINT PPOINTL
--#define NPWPOINT NPPOINTL
(* INC *)

TYPE ICONINFO = RECORD   (* icninf *)
      cb:           ULONG;       (* size of ICONINFO structure *)
      fFormat:      ULONG;
      pszFileName:  PSZ;         (* use when fFormat = ICON_FILE *)
      hmod:         HMODULE;     (* use when fFormat = ICON_RESOURCE *)
      resid:        ULONG;       (* use when fFormat = ICON_RESOURCE *)
      cbIconData:   ULONG;       (* use when fFormat = ICON_DATA     *)
      pIconData:    PVOID;       (* use when fFormat = ICON_DATA     *)
END;
TYPE PICONINFO = POINTER TO ICONINFO;

CONST ICON_FILE     = 1;         (* flags for fFormat *)
CONST ICON_RESOURCE = 2;
CONST ICON_DATA     = 3;
CONST ICON_CLEAR    = 4;

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\os2def.hm ------------- *)
(* OS/2 Base Include File *)
<* IF NOT DEFINED (INCL_NOBASEAPI)  THEN *>
   
(* ------------- Include file: .\hm\bse.hm ------------- *)
(*static char *SCCSID = "@(#)bse.h	6.8 92/03/15";*)
(****************************** Module Header ******************************\
*
* Module Name: BSE.H
*
* This file includes the definitions necessary for writing Base OS/2 applications.
*
* Copyright (c) 1987, 1992  IBM Corporation
*
*
*
* ===========================================================================
*
* The following symbols are used in this file for conditional sections.
*
*   INCL_BASE      -  ALL of OS/2 Base
*   INCL_DOS       -  OS/2 DOS Kernel
*   INCL_SUB       -  OS/2 VIO/KBD/MOU
*   INCL_DOSERRORS -  OS/2 Errors         - only included if symbol defined
*   INCL_ORDINALS  -  OS/2 Ordinals       - only included if symbol defined
\***************************************************************************)



<* NEW INCL_BASEINCLUDED + *>

(* if INCL_BASE defined then define all the symbols *)

<* IF DEFINED(INCL_BASE) THEN *>
   <* NEW INCL_DOS + *>
   <* NEW INCL_SUB + *>
   <* NEW INCL_DOSERRORS + *>
<* END *>

   
(* ------------- Include file: .\hm\bsedos.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: BSEDOS.H
*
* OS/2 Base include file.
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* The folowing symbols are used in this file for conditional sections.
*
* If INCL_BSE is defined, all subcomponents are included.
*
* Subcomponents marked with "+" are partially included by default:
*
*   CONST:                To include:
*
* + INCL_DOSPROCESS         Process and thread support
* + INCL_DOSFILEMGR         File Management
* + INCL_DOSMEMMGR          Memory Management
* + INCL_DOSSEMAPHORES      Semaphore support
* + INCL_DOSDATETIME        Date/Time and Timer support
*   INCL_DOSMODULEMGR       Module manager
* + INCL_DOSRESOURCES       Resource support
*   INCL_DOSNLS             National Language Support
*   INCL_DOSEXCEPTIONS      Exception Management Support
*   INCL_DOSMISC            Miscellaneous
*   INCL_DOSMONITORS        Monitors
*   INCL_DOSQUEUES          Queues
*   INCL_DOSSESMGR          Session Manager Support
*   INCL_DOSDEVICES         Device specific, ring 2 support
*   INCL_DOSNMPIPES         Named Pipes Support
*   INCL_DOSPROFILE         DosProfile API
*   INCL_DOSMVDM            MVDM support
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)



<* NEW INCL_DOSINCLUDED + *>

<* IF DEFINED(INCL_DOS) THEN *>
   <* NEW INCL_DOSPROCESS + *>
   <* NEW INCL_DOSFILEMGR + *>
   <* NEW INCL_DOSMEMMGR + *>
   <* NEW INCL_DOSSEMAPHORES + *>
   <* NEW INCL_DOSDATETIME + *>
   <* NEW INCL_DOSMODULEMGR + *>
   <* NEW INCL_DOSRESOURCES + *>
   <* NEW INCL_DOSNLS + *>
   <* NEW INCL_DOSEXCEPTIONS + *>
   <* NEW INCL_DOSMISC + *>
   <* NEW INCL_DOSMONITORS + *>
   <* NEW INCL_DOSQUEUES + *>
   <* NEW INCL_DOSSESMGR + *>
   <* NEW INCL_DOSDEVICES + *>
   <* NEW INCL_DOSNMPIPES + *>
   <* NEW INCL_DOSPROFILE + *>
   <* NEW INCL_DOSMVDM + *>
<* END *>

<* IF DEFINED(INCL_ERRORS) THEN *>
   <* NEW INCL_DOSERRORS + *>
<* END *>

<* IF (DEFINED (INCL_DOSPROCESS) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>
      (*** General services *)
      PROCEDURE [APIENTRY] DosBeep(freq:  ULONG ;
                                                      dur:  ULONG): APIRET;

      (*** Process and Thread support *)
      PROCEDURE [APIENTRY] DosExit(action: ULONG ;
                                                        result: ULONG); (* :void; *)

      (* DosExit codes *)
      CONST EXIT_THREAD        = 0;
      CONST EXIT_PROCESS       = 1;
<* END *>

<* IF DEFINED(INCL_DOSPROCESS) THEN *>

   
(* ------------- Include file: .\hm\bsetib.hm ------------- *)
(*      SCCSID = @(#)bsetib.h	6.9 92/03/15 *)
(***************************************************************************\
*
* Module Name: BSETIB.H
*
* OS/2 Thread Information Block Include File
*
* Copyright (c) 1989, 1992  IBM Corporation
* Copyright (c) 1989  Microsoft Corporation
*
*****************************************************************************)

(*
  *      Thread Information Block (TIB)
  *)

TYPE tib2_s = RECORD
              tib2_ultid:        ULONG;   (* Thread I.D. *)
              tib2_ulpri:        ULONG;   (* Thread priority *)
              tib2_version:      ULONG;   (* Version number for this structure *)
              tib2_usMCCount:    ULONG;   (* Must Complete count *)
              tib2_fMCForceFlag: ULONG;   (* Must Complete force flag *)
END;

TYPE TIB2  = tib2_s;
TYPE PTIB2 = POINTER TO TIB2;

TYPE tib_s = RECORD                   (* TIB Thread Information Block *)
                tib_pexchain:    PVOID;       (* Head of exception handler chain *)
                tib_pstack:      PVOID;       (* Pointer to base of stack *)
                tib_pstacklimit: PVOID;       (* Pointer to end of stack *)
                tib_ptib2:       PTIB2;       (* Pointer to system specific TIB *)
                tib_version:     ULONG;       (* Version number for this TIB structure *)
                tib_ordinal:     ULONG;       (* Thread ordinal number        *)
END;


TYPE tib_t = tib_s;
TYPE TIB   = tib_s;
TYPE PTIB  = POINTER TO tib_s;


(*
  *      Process Information Block (PIB)
  *)


TYPE pib_s = RECORD                         (* PIB Process Information Block *)
              pib_ulpid:    ULONG;          (* Process I.D. *)
              pib_ulppid:   ULONG;          (* Parent process I.D. *)
              pib_hmte:     ULONG;          (* Program (.EXE) module handle *)
              pib_pchcmd:   PCHAR;          (* Command line pointer *)
              pib_pchenv:   PCHAR;          (* Environment pointer *)
              pib_flstatus: ULONG;          (* Process' status bits *)
              pib_ultype:   ULONG;          (* Process' type code *)
END;


TYPE pib_t  = pib_s;
TYPE PIB    = pib_s;
TYPE PPIB   = POINTER TO pib_s;

(***************************** End of file ************************************)

(* ------------- End of file:  .\hm\bsetib.hm ------------- *)

      TYPE FNTHREAD  = PROCEDURE [APIENTRY] (ULONG);
      TYPE PFNTHREAD = POINTER TO FNTHREAD;

      PROCEDURE [APIENTRY] DosCreateThread(ptid:   PTID ;
                                                                      pfn:      PFNTHREAD ;
                                                                      param:    ULONG ;
                                                                      flag:     ULONG ;
                                                                      cbStack:  ULONG ): APIRET;

      PROCEDURE [APIENTRY] DosResumeThread(tid:  TID ): APIRET;

      PROCEDURE [APIENTRY] DosSuspendThread(tid:  TID ): APIRET;

      TYPE PPTIB = POINTER TO PTIB;
      TYPE PPPIB = POINTER TO PPIB;
      PROCEDURE [APIENTRY] DosGetInfoBlocks(pptib:  PPTIB;
                                                                                  pppib:  PPPIB): APIRET;

      PROCEDURE [APIENTRY] DosKillThread(tid:  TID ): APIRET;

      (* Action code values *)

      CONST DCWA_PROCESS      = 0;
      CONST DCWA_PROCESSTREE  = 1;

      (* Wait option values *)

      CONST DCWW_WAIT         = 0;
      CONST DCWW_NOWAIT       = 1;

(* Thread Flags for DosCreateThread options 59468 *)

CONST CREATE_READY       = 0;                   (* defect 65437  *)
CONST CREATE_SUSPENDED   = 1;
CONST STACK_SPARSE       = 0;
CONST STACK_COMMITTED    = 2;

      TYPE RESULTCODES = RECORD      (* resc *)
            codeTerminate:  ULONG ;
            codeResult:     ULONG ;
      END;
      TYPE PRESULTCODES = POINTER TO RESULTCODES;

      PROCEDURE [APIENTRY] DosWaitChild(action:  ULONG ;
                                                                option:   ULONG ;
                                                                pres:     PRESULTCODES ;
                                                                ppid:     PPID ;
                                                                pid:      PID ): APIRET;

      CONST DosCwait = DosWaitChild;

      PROCEDURE [APIENTRY] DosWaitThread(ptid:    PTID ;
                                                                  option:   ULONG ): APIRET;

      PROCEDURE [APIENTRY] DosSleep(msec:  ULONG ): APIRET;

(***ET+ uDB -   User's Debug Buffer structure
  *
  *      A pointer to a uDB is the sole parameter to DosDebug.  It
  *      contains all the information required for each DosDebug
  *      command.
  *
  *)

TYPE _uDB_t = RECORD   (* uDB *)
    Pid:       SYSTEM.CARD32;       (* Debuggee Process id          *)
    Tid:       SYSTEM.CARD32;       (* Debuggee Thread id           *)
    Cmd:       SYSTEM.INT32;        (* Command or Notification      *)
    Value:     SYSTEM.INT32;        (* Generic Data Value           *)
    Addr:      SYSTEM.CARD32;       (* Debuggee Address             *)
    Buffer:    SYSTEM.CARD32;       (* Debugger Buffer Address      *)
    Len:       SYSTEM.CARD32;       (* Length of Range              *)
    Index:     SYSTEM.CARD32;       (* Generic Identifier Index     *)
    MTE:       SYSTEM.CARD32;       (* Module Table Entry Handle    *)
    EAX:       SYSTEM.CARD32;       (* Register Set                 *)
    ECX:       SYSTEM.CARD32;
    EDX:       SYSTEM.CARD32;
    EBX:       SYSTEM.CARD32;
    ESP:       SYSTEM.CARD32;
    EBP:       SYSTEM.CARD32;
    ESI:       SYSTEM.CARD32;
    EDI:       SYSTEM.CARD32;
    EFlags:    SYSTEM.CARD32;
    EIP:       SYSTEM.CARD32;
    CSLim:     SYSTEM.CARD32;
    CSBase:    SYSTEM.CARD32;
    CSAcc:     CHAR;
    CSAtr:     CHAR;
    CS:        SYSTEM.CARD16;
    DSLim:     SYSTEM.CARD32;
    DSBase:    SYSTEM.CARD32;
    DSAcc:     CHAR;
    DSAtr:     CHAR;
    DS:        SYSTEM.CARD16;
    ESLim:     SYSTEM.CARD32;
    ESBase:    SYSTEM.CARD32;
    ESAcc:     CHAR;
    ESAtr:     CHAR;
    ES:        SYSTEM.CARD16;
    FSLim:     SYSTEM.CARD32;
    FSBase:    SYSTEM.CARD32;
    FSAcc:     CHAR;
    FSAtr:     CHAR  ;
    FS:        SYSTEM.CARD16;
    GSLim:     SYSTEM.CARD32;
    GSBase:    SYSTEM.CARD32;
    GSAcc:     CHAR;
    GSAtr:     CHAR;
    GS:        SYSTEM.CARD16;
    SSLim:     SYSTEM.CARD32;
    SSBase:    SYSTEM.CARD32;
    SSAcc:     CHAR;
    SSAtr:     CHAR;
    SS:        SYSTEM.CARD16;
END;

(***EK+ DBG_C - DosDebug Command Numbers
  *
  *      These numbers are placed in the Cmd field of the uDB on
  *      entry to DosDebug.
  *
  *      These numbers identify which command DosDebug is requested
  *      to perform.
  *
  *)

CONST DBG_C_Null            =  0;       (* Null                         *)
CONST DBG_C_ReadMem         =  1;       (* Read Word                    *)
CONST DBG_C_ReadMem_I       =  1;       (* Read Word                    *)
CONST DBG_C_ReadMem_D       =  2;       (* Read Word (same as 1)        *)
CONST DBG_C_ReadReg         =  3;       (* Read Register Set            *)
CONST DBG_C_WriteMem        =  4;       (* Write Word                   *)
CONST DBG_C_WriteMem_I      =  4;       (* Write Word                   *)
CONST DBG_C_WriteMem_D      =  5;       (* Write Word (same as 4)       *)
CONST DBG_C_WriteReg        =  6;       (* Write Register Set           *)
CONST DBG_C_Go              =  7;       (* Go                           *)
CONST DBG_C_Term            =  8;       (* Terminate                    *)
CONST DBG_C_SStep           =  9;       (* Single Step                  *)
CONST DBG_C_Stop            =  10;      (* Stop                         *)
CONST DBG_C_Freeze          =  11;      (* Freeze Thread                *)
CONST DBG_C_Resume          =  12;      (* Resume Thread                *)
CONST DBG_C_NumToAddr       =  13;      (* Object Number to Address     *)
CONST DBG_C_ReadCoRegs      =  14;      (* Read Coprocessor Registers   *)
CONST DBG_C_WriteCoRegs     =  15;      (* Write Coprocessor Registers  *)
                                                                                (* 16 is reserved               *)
CONST DBG_C_ThrdStat        =  17;      (* Get Thread Status            *)
CONST DBG_C_MapROAlias      =  18;      (* Map read-only alias          *)
CONST DBG_C_MapRWAlias      =  19;      (* Map read-write alias         *)
CONST DBG_C_UnMapAlias      =  20;      (* Unmap Alias                  *)
CONST DBG_C_Connect         =  21;      (* Connect to Debuggee          *)
CONST DBG_C_ReadMemBuf      =  22;      (* Read Memory Buffer           *)
CONST DBG_C_WriteMemBuf     =  23;      (* Write Memory Buffer          *)
CONST DBG_C_SetWatch        =  24;      (* Set Watchpoint               *)
CONST DBG_C_ClearWatch      =  25;      (* Clear Watchpoint             *)
CONST DBG_C_RangeStep       =  26;      (* Range Step                   *)
CONST DBG_C_Continue        =  27;      (* Continue after an Exception  *)
CONST DBG_C_AddrToObject    =  28;      (* Address to Object            *)
CONST DBG_C_XchgOpcode      =  29;      (* Exchange opcode and go       *)
CONST DBG_C_LinToSel        =  30;      (* 32 to 16 conversion      A001*)
CONST DBG_C_SelToLin        =  31;      (* 16 to 32 conversion      A001*)

      PROCEDURE [APIENTRY] DosDebug(pdbgbuf:  PVOID ): APIRET;


      (* codeTerminate values (also passed to ExitList routines) *)

      CONST TC_EXIT            =0;
      CONST TC_HARDERROR       =1;
      CONST TC_TRAP            =2;
      CONST TC_KILLPROCESS     =3;
      CONST TC_EXCEPTION       =4;

      TYPE FNEXITLIST  = PROCEDURE [APIENTRY] (ULONG);
      TYPE PFNEXITLIST = POINTER TO FNEXITLIST;

      PROCEDURE [APIENTRY] DosEnterCritSec(): APIRET;

      PROCEDURE [APIENTRY] DosExitCritSec(): APIRET;

      PROCEDURE [APIENTRY] DosExitList(ordercode:  ULONG ;
                                                                pfn:        PFNEXITLIST ): APIRET;

      (* DosExitList functions *)

      CONST EXLST_ADD         = 1;
      CONST EXLST_REMOVE      = 2;
      CONST EXLST_EXIT        = 3;

      PROCEDURE [APIENTRY] DosExecPgm(pObjname:  PCHAR ;
                                                            cbObjname:  LONG ;
                                                            execFlag:   ULONG ;
                                                            pArg:       PCSZ ;
                                                            pEnv:       PCSZ ;
                                                            pRes:       PRESULTCODES ;
                                                            pName:      PCSZ ): APIRET;

      (* DosExecPgm functions *)

      CONST EXEC_SYNC         = 0;
      CONST EXEC_ASYNC        = 1;
      CONST EXEC_ASYNCRESULT  = 2;
      CONST EXEC_TRACE        = 3;
      CONST EXEC_BACKGROUND   = 4;
      CONST EXEC_LOAD         = 5;
      CONST EXEC_ASYNCRESULTDB= 6;


      PROCEDURE [APIENTRY]  DosSetPriority(scope:   ULONG ;
                                                                      ulclass:  ULONG ;
                                                                      delta:    LONG ;
                                                                      PorTid:   ULONG ): APIRET;

      CONST DosSetPrty = DosSetPriority;

      (* Priority scopes *)

      CONST PRTYS_PROCESS     = 0;
      CONST PRTYS_PROCESSTREE = 1;
      CONST PRTYS_THREAD      = 2;

      (* Priority classes *)

      CONST PRTYC_NOCHANGE    = 0;
      CONST PRTYC_IDLETIME    = 1;
      CONST PRTYC_REGULAR     = 2;
      CONST PRTYC_TIMECRITICAL= 3;
      CONST PRTYC_FOREGROUNDSERVER =4;

      (* Priority deltas *)

      CONST PRTYD_MINIMUM    = -31;
      CONST PRTYD_MAXIMUM    =  31;

      PROCEDURE [APIENTRY] DosKillProcess(action:  ULONG ;
                                                                      pid:     PID ): APIRET;

      CONST DKP_PROCESSTREE  =  0;
      CONST DKP_PROCESS      =  1;
<* END *>

<* IF NOT DEFINED(INCL_SAADEFS) THEN *>
      (*************************************************************************\
      * CCHMAXPATH is the maximum fully qualified path name length including  *
      * the drive letter, colon, backslashes and terminating NULL.            *
      \*************************************************************************)
      CONST CCHMAXPATH       =  260;

      (*************************************************************************\
      * CCHMAXPATHCOMP is the maximum individual path component name length   *
      * including a terminating NULL.                                         *
      \*************************************************************************)
      CONST CCHMAXPATHCOMP   =  256;
<* END *>

<* IF (DEFINED (INCL_DOSFILEMGR) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>
      (*** File manager *)
      (* DosSetFilePtr() file position codes *)

      CONST FILE_BEGIN     = 00000H;   (* Move relative to beginning of file *)
      CONST FILE_CURRENT   = 00001H;   (* Move relative to current fptr position *)
      CONST FILE_END       = 00002H;   (* Move relative to end of file *)

      (* DosFindFirst/Next Directory handle types *)
      CONST HDIR_SYSTEM     =   1 ;    (* Use system handle (1) *)
      CONST HDIR_CREATE     = (-1);    (* Allocate a new, unused handle *)

      (* DosCopy control bits; may be or'ed together *)
      CONST DCPY_EXISTING  = 00001H;   (* Copy even if target exists *)
      CONST DCPY_APPEND    = 00002H;   (* Append to existing file, do not replace *)
      CONST DCPY_FAILEAS   = 00004H;   (* Fail if EAs not supported on target*)

      (* DosOpen/DosQFHandState/DosQueryFileInfo et al file attributes; also *)
      (* known as Dos File Mode bits... *)
      CONST FILE_NORMAL    = 00000H;
      CONST FILE_READONLY  = 00001H;
      CONST FILE_HIDDEN    = 00002H;
      CONST FILE_SYSTEM    = 00004H;
      CONST FILE_DIRECTORY = 00010H;
      CONST FILE_ARCHIVED  = 00020H;

      CONST FILE_IGNORE    = 010000H;     (* ignore file attribute in *)
      (* DosSetPath/File Info if *)
      (* this bit is set*)

      CONST MUST_HAVE_READONLY     = ( (FILE_READONLY  * 256) + FILE_READONLY  );
      CONST MUST_HAVE_HIDDEN       = ( (FILE_HIDDEN    * 256) + FILE_HIDDEN    );
      CONST MUST_HAVE_SYSTEM       = ( (FILE_SYSTEM    * 256) + FILE_SYSTEM    );
      CONST MUST_HAVE_DIRECTORY    = ( (FILE_DIRECTORY * 256) + FILE_DIRECTORY );
      CONST MUST_HAVE_ARCHIVED     = ( (FILE_ARCHIVED  * 256) + FILE_ARCHIVED  );

      (* DosOpen() actions *)
      CONST FILE_EXISTED    =00001H;
      CONST FILE_CREATED    =00002H;
      CONST FILE_TRUNCATED  =00003H;

      (* DosOpen() open flags *)
      CONST FILE_OPEN      = 00001H;
      CONST FILE_TRUNCATE  = 00002H;
      CONST FILE_CREATE    = 00010H;

      (*     this nibble applies if file already exists                xxxx *)
      CONST OPEN_ACTION_FAIL_IF_EXISTS    = 00000H;  (* ---- ---- ---- 0000 *)
      CONST OPEN_ACTION_OPEN_IF_EXISTS    = 00001H;  (* ---- ---- ---- 0001 *)
      CONST OPEN_ACTION_REPLACE_IF_EXISTS = 00002H;  (* ---- ---- ---- 0010 *)

      (*     this nibble applies if file does not exist           xxxx      *)
      CONST OPEN_ACTION_FAIL_IF_NEW       = 00000H;  (* ---- ---- 0000 ---- *)
      CONST OPEN_ACTION_CREATE_IF_NEW     = 00010H;  (* ---- ---- 0001 ---- *)

      (* DosOpen/DosSetFHandState flags *)
      CONST OPEN_ACCESS_READONLY          = 00000H;  (* ---- ---- ---- -000 *)
      CONST OPEN_ACCESS_WRITEONLY         = 00001H;  (* ---- ---- ---- -001 *)
      CONST OPEN_ACCESS_READWRITE         = 00002H;  (* ---- ---- ---- -010 *)
      CONST OPEN_SHARE_DENYREADWRITE      = 00010H;  (* ---- ---- -001 ---- *)
      CONST OPEN_SHARE_DENYWRITE          = 00020H;  (* ---- ---- -010 ---- *)
      CONST OPEN_SHARE_DENYREAD           = 00030H;  (* ---- ---- -011 ---- *)
      CONST OPEN_SHARE_DENYNONE           = 00040H;  (* ---- ---- -100 ---- *)
      CONST OPEN_FLAGS_NOINHERIT          = 00080H;  (* ---- ---- 1--- ---- *)
      CONST OPEN_FLAGS_NO_LOCALITY        = 00000H;  (* ---- -000 ---- ---- *)
      CONST OPEN_FLAGS_SEQUENTIAL         = 00100H;  (* ---- -001 ---- ---- *)
      CONST OPEN_FLAGS_RANDOM             = 00200H;  (* ---- -010 ---- ---- *)
      CONST OPEN_FLAGS_RANDOMSEQUENTIAL   = 00300H;  (* ---- -011 ---- ---- *)
      CONST OPEN_FLAGS_NO_CACHE           = 01000H;  (* ---1 ---- ---- ---- *)
      CONST OPEN_FLAGS_FAIL_ON_ERROR      = 02000H;  (* --1- ---- ---- ---- *)
      CONST OPEN_FLAGS_WRITE_THROUGH      = 04000H;  (* -1-- ---- ---- ---- *)
      CONST OPEN_FLAGS_DASD               = 08000H;  (* 1--- ---- ---- ---- *)
      CONST OPEN_FLAGS_NONSPOOLED         = 000040000H;
      CONST OPEN_FLAGS_PROTECTED_HANDLE =040000000H;


      (* DosSearchPath() constants *)
      CONST SEARCH_PATH          = 00000H;
      CONST SEARCH_CUR_DIRECTORY = 00001H;
      CONST SEARCH_ENVIRONMENT   = 00002H;
      CONST SEARCH_IGNORENETERRS = 00004H;


      (************************************************************
      EA Info Levels & Find First/Next
      =========================================
      API's: DosFindFirst, DosQueryFileInfo, DosQueryPathInfo, DosSetFileInfo,
      DosSetPathInfo
      ************************************************************)

      (* File info levels&gml All listed API's *)
      CONST FIL_STANDARD         = 1;     (* Info level 1, standard file info *)
      CONST FIL_QUERYEASIZE      = 2;     (* Level 2, return Full EA size *)
      CONST FIL_QUERYEASFROMLIST = 3;     (* Level 3, return requested EA's *)

      (* File info levels: Dos...PathInfo only *)
      CONST FIL_QUERYFULLNAME    = 5;     (* Level 5, return fully qualified
      name of file *)


      (* DosFsAttach() *)
      (* Attact or detach *)
      CONST FS_ATTACH            = 0;     (* Attach file server *)
      CONST FS_DETACH            = 1;     (* Detach file server *)
      CONST FS_SPOOLATTACH       = 2;     (* Register a spooler device *)
      CONST FS_SPOOLDETACH       = 3;     (* De-register a spooler device *)


      (* DosFsCtl() *)
      (* Routing type *)
      CONST FSCTL_HANDLE         = 1;     (* File Handle directs req routing *)
      CONST FSCTL_PATHNAME       = 2;     (* Path Name directs req routing *)
      CONST FSCTL_FSDNAME        = 3;     (* FSD Name directs req routing *)

      (* defined FSCTL functions *)
      CONST FSCTL_ERROR_INFO     = 1;     (* return error info from FSD *)
      CONST FSCTL_MAX_EASIZE     = 2;     (* Max ea size for the FSD *)

      TYPE EASIZEBUF = RECORD      (* struct for FSCTL fn 2 - max ea size *)
            cbMaxEASize:      USHORT;        (* max. size of one EA *)
            cbMaxEAListSize:  ULONG;    (* max size of the full EA List *)
      END;
      TYPE PEASIZEBUF = POINTER TO EASIZEBUF;



      (* DosQueryFSAttach() *)
      (* Information level types (defines method of query) *)
      CONST FSAIL_QUERYNAME      = 1;     (* Return data for a Drive or Device *)
      CONST FSAIL_DEVNUMBER      = 2;     (* Return data for Ordinal Device # *)
      CONST FSAIL_DRVNUMBER      = 3;     (* Return data for Ordinal Drive # *)

      (* Item types (from data structure item "iType") *)
      CONST FSAT_CHARDEV         = 1;     (* Resident character device *)
      CONST FSAT_PSEUDODEV       = 2;     (* Pusedu-character device *)
      CONST FSAT_LOCALDRV        = 3;     (* Local drive *)
      CONST FSAT_REMOTEDRV       = 4;     (* Remote drive attached to FSD *)

      TYPE FSQBUFFER = RECORD      (* fsqbuf Data structure for QFSAttach*)
            iType:        USHORT;                 (* Item type *)
            cbName:       USHORT;                 (* Length of item name, sans NULL *)
            szName:       POINTER TO UCHAR;       (* ASCIIZ item name *)
            cbFSDName:    USHORT;                 (* Length of FSD name, sans NULL *)
            szFSDName:    POINTER TO UCHAR;       (* ASCIIZ FSD name *)
            cbFSAData:    USHORT;                 (* Length of FSD Attach data returned *)
            rgFSAData:    POINTER TO UCHAR;       (* FSD Attach data from FSD *)
      END;
      TYPE PFSQBUFFER = POINTER TO FSQBUFFER;


      TYPE FSQBUFFER2 = RECORD      (* fsqbuf Data structure for QFSAttach*)
            iType:            USHORT  ;
            cbName:           USHORT  ;
            cbFSDName:        USHORT  ;
            cbFSAData:        USHORT  ;
            szName:           ARRAY [0..0] OF UCHAR;
            szFSDName:        ARRAY [0..0] OF UCHAR;
            rgFSAData:        ARRAY [0..0] OF UCHAR;
      END;
      TYPE PFSQBUFFER2 = POINTER TO FSQBUFFER2;

      TYPE SPOOLATTACH = RECORD     (* Data structure for spooler operations *)
            hNmPipe:   USHORT;            (* Named pipe handle *)
            ulKey:     ULONG;             (* Attached key *)
      END;
      TYPE PSPOOLATTACH  = POINTER TO SPOOLATTACH;


      (*****************************************************************************
      * File System Drive Information&gml DosQueryFSInfo DosSetFSInfo              *
      *****************************************************************************)

      (* FS Drive Info Levels *)
      CONST FSIL_ALLOC            =1;     (* Drive allocation info (Query only) *)
      CONST FSIL_VOLSER           =2;     (* Drive Volum/Serial info *)

      (* DosQueryFHType() *)
      (* Handle classes (low 8 bits of Handle Type) *)
      CONST FHT_DISKFILE         = 00000H;   (* Disk file handle *)
      CONST FHT_CHRDEV           = 00001H;   (* Character device handle *)
      CONST FHT_PIPE             = 00002H;   (* Pipe handle *)

      (* Handle bits (high 8 bits of Handle Type) *)
      CONST FHB_DSKREMOTE        = 08000H;   (* Remote disk *)
      CONST FHB_CHRDEVREMOTE     = 08000H;   (* Remote character device *)
      CONST FHB_PIPEREMOTE       = 08000H;   (* Remote pipe *)



   <* IF NOT DEFINED(INCL_SAADEFS) THEN *>
            (* File time and date types *)
      <* IF DEFINED(__IBMC__) THEN *>
                  TYPE FTIME = RECORD          (* ftime *)
                      twosecs: [0..31];   --       UINT   twosecs : 5;
                      minutes: [0..63];   --       UINT   minutes : 6;
                      hours:   [0..31];   --       UINT   hours   : 5;
                  END;
                  TYPE PFTIME = POINTER TO FTIME;
      <* ELSE *>
                  TYPE FTIME = RECORD          (* ftime *)
                      twosecs: [0..31];   --       USHORT   twosecs : 5;
                      minutes: [0..63];   --       USHORT   minutes : 6;
                      hours:   [0..31];   --       USHORT   hours   : 5;
                  END;
                  TYPE PFTIME = POINTER TO FTIME;
      <* END *>

      <* IF DEFINED(__IBMC__) THEN *>
                  TYPE FDATE = RECORD          (* fdate *)
                      day:   [0..31];     --       UINT   day     : 5;
                      month: [0..15];     --       UINT   month   : 4;
                      year:  [0..127];    --       UINT   year    : 7;
                  END;
                  TYPE PFDATE = POINTER TO FDATE;
      <* ELSE *>
                  TYPE FDATE = RECORD          (* fdate *)
                      day:   [0..31];     --       USHORT   day     : 5;
                      month: [0..15];     --       USHORT   month   : 4;
                      year:  [0..127];    --       USHORT   year    : 7;
                  END;
                  TYPE PFDATE = POINTER TO FDATE;
      <* END *>
   <* END *>


      TYPE VOLUMELABEL = RECORD     (* vol *)
            cch:         BYTE ;
            szVolLabel:  ARRAY [0..11] OF CHAR;
      END;
      TYPE PVOLUMELABEL = POINTER TO VOLUMELABEL;

      TYPE FSINFO = RECORD     (* fsinf *)
            fdateCreation:  FDATE ;
            ftimeCreation:  FTIME ;
            vol:            VOLUMELABEL ;
      END;
      TYPE PFSINFO = POINTER TO FSINFO;

      (* HANDTYPE values *)
      CONST HANDTYPE_FILE        = 00000H;
      CONST HANDTYPE_DEVICE      = 00001H;
      CONST HANDTYPE_PIPE        = 00002H;
      CONST HANDTYPE_PROTECTED   = 04000H;
      CONST HANDTYPE_NETWORK     = 08000H;

      TYPE FILELOCK = RECORD     (* flock *)
            lOffset:      LONG ;
            lRange:       LONG ;
      END;
      TYPE PFILELOCK = POINTER TO FILELOCK;

      TYPE HFILE  = LHANDLE;     (* hf *)
      TYPE PHFILE = POINTER TO HFILE;

   <* IF NOT DEFINED(__HEV__) THEN *>
      <* NEW __HEV__ + *>
            TYPE  HEV  = ULONG;             (* hev *)
            TYPE  PHEV = POINTER TO HEV;
   <* END *>

      TYPE  FHLOCK   = ULONG;
      TYPE  PFHLOCK = PULONG;

      PROCEDURE [APIENTRY] DosSetFileLocks(hFile:    HFILE ;
                                                                      pflUnlock: PFILELOCK ;
                                                                      pflLock:   PFILELOCK ;
                                                                      timeout:   ULONG ;
                                                                      flags:     ULONG ): APIRET;
      PROCEDURE [APIENTRY] DosProtectSetFileLocks(hFile:              HFILE ;
                                                                                    pflUnlock:           PFILELOCK ;
                                                                                    pflLock:             PFILELOCK ;
                                                                                    timeout:             ULONG;
                                                                                    flags:               ULONG ;
                                                                                    fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY] DosCancelLockRequest(hFile:   HFILE ;
                                                                                pflLock:  PFILELOCK ): APIRET;


   <* IF NOT DEFINED(INCL_SAADEFS) THEN *>

            TYPE FILEFINDBUF = RECORD    (* findbuf *)
                  fdateCreation:     FDATE  ;
                  ftimeCreation:     FTIME  ;
                  fdateLastAccess:   FDATE  ;
                  ftimeLastAccess:   FTIME  ;
                  fdateLastWrite:    FDATE  ;
                  ftimeLastWrite:    FTIME  ;
                  cbFile:            ULONG  ;
                  cbFileAlloc:       ULONG  ;
                  attrFile:          USHORT ;
                  cchName:           UCHAR  ;
                  achName:           ARRAY [0..CCHMAXPATHCOMP-1] OF CHAR;
            END;

            TYPE PFILEFINDBUF = POINTER TO FILEFINDBUF;

            (*NOINC *)
            --#pragma pack(2)
            (*INC  *)
            TYPE FILEFINDBUF2 = RECORD   (* findbuf2 *)
                  fdateCreation:     FDATE  ;
                  ftimeCreation:     FTIME  ;
                  fdateLastAccess:   FDATE  ;
                  ftimeLastAccess:   FTIME  ;
                  fdateLastWrite:    FDATE  ;
                  ftimeLastWrite:    FTIME  ;
                  cbFile:            ULONG  ;
                  cbFileAlloc:       ULONG  ;
                  attrFile:          USHORT ;
                  cbList:            ULONG  ;
                  cchName:           UCHAR  ;
                  achName:           ARRAY [0..CCHMAXPATHCOMP-1] OF CHAR;
            END;
            TYPE PFILEFINDBUF2 = POINTER TO FILEFINDBUF2;

            TYPE FILEFINDBUF3 = RECORD                (* findbuf3 *)
                  oNextEntryOffset:      ULONG   ;       (* new field *)
                  fdateCreation:         FDATE   ;
                  ftimeCreation:         FTIME   ;
                  fdateLastAccess:       FDATE   ;
                  ftimeLastAccess:       FTIME   ;
                  fdateLastWrite:        FDATE   ;
                  ftimeLastWrite:        FTIME   ;
                  cbFile:                ULONG   ;
                  cbFileAlloc:           ULONG   ;
                  attrFile:              ULONG   ;        (* widened field *)
                  cchName:               UCHAR   ;
                  achName:               ARRAY [0..CCHMAXPATHCOMP-1] OF CHAR;
            END;
            TYPE PFILEFINDBUF3 = POINTER TO FILEFINDBUF3;

            TYPE FILEFINDBUF4 = RECORD                (* findbuf4 *)
                  oNextEntryOffset:    ULONG   ; (* new field *)
                  fdateCreation:       FDATE   ;
                  ftimeCreation:       FTIME   ;
                  fdateLastAccess:     FDATE   ;
                  ftimeLastAccess:     FTIME   ;
                  fdateLastWrite:      FDATE   ;
                  ftimeLastWrite:      FTIME   ;
                  cbFile:              ULONG   ;
                  cbFileAlloc:         ULONG   ;
                  attrFile:            ULONG   ; (* widened field *)
                  cbList:              ULONG   ;
                  cchName:             UCHAR   ;
                  achName:             ARRAY [0..CCHMAXPATHCOMP-1] OF CHAR;
            END;
            TYPE PFILEFINDBUF4 = POINTER TO FILEFINDBUF4;

            (* extended attribute structures *)

            TYPE GEA = RECORD        (* gea *)
                  cbName:    BYTE;                  (* name length not including NULL *)
                  szName:    ARRAY [0..0] OF CHAR;  (* attribute name *)
            END;
            TYPE PGEA = POINTER TO GEA;

            TYPE GEALIST = RECORD    (* geal *)
                  cbList:   ULONG;       (* total bytes of structure including full list *)
                  list:     ARRAY [0..0] OF GEA;        (* variable length GEA structures *)
            END;
            TYPE PGEALIST = POINTER TO GEALIST;

            TYPE FEA = RECORD        (* fea *)
                  fEA:        BYTE;       (* flags                              *)
                  cbName:     BYTE;       (* name length not including NULL *)
                  cbValue:    USHORT;     (* value length *)
            END;
            TYPE PFEA = POINTER TO FEA;

            (* flags for _FEA.fEA *)
            CONST FEA_NEEDEA        = 080H;     (* need EA bit *)

            TYPE FEALIST = RECORD    (* feal *)
                  cbList: ULONG;       (* total bytes of structure including full list *)
                  list:   ARRAY [0..0] OF FEA;        (* variable length FEA structures *)
            END;
            TYPE PFEALIST = POINTER TO FEALIST;

            TYPE EAOP = RECORD       (* eaop *)
                  fpGEAList:  PGEALIST; (* general EA list *)
                  fpFEAList:  PFEALIST; (* full EA list *)
                  oError:     ULONG;
            END;
            TYPE PEAOP = POINTER TO EAOP;

            (*NOINC*)
            --#pragma pack(1)
            (*INC*)

            TYPE FEA2 = RECORD        (* fea2 *)
                  oNextEntryOffset:  ULONG; (* new field *)
                  fEA:               BYTE    ;
                  cbName:            BYTE    ;
                  cbValue:           USHORT  ;
                  szName:            ARRAY [0..0] OF CHAR;   (* new field *)
            END;
            TYPE PFEA2 = POINTER TO FEA2;


            TYPE FEA2LIST = RECORD    (* fea2l *)
                  cbList:        ULONG   ;
                  list:          ARRAY [0..0] OF FEA2;
            END;
            TYPE PFEA2LIST = POINTER TO FEA2LIST;

            TYPE GEA2 = RECORD         (* gea2 *)
                  oNextEntryOffset:      ULONG   ;  (*  new field *)
                  cbName:                BYTE    ;
                  szName:                ARRAY [0..0] OF CHAR; (* new field *)
            END;
            TYPE PGEA2 = POINTER TO GEA2;

            TYPE GEA2LIST = RECORD      (* gea2l *)
                  cbList:          ULONG   ;
                  list:            ARRAY [0..0] OF GEA2;
            END;
            TYPE PGEA2LIST = POINTER TO GEA2LIST;

            TYPE EAOP2 = RECORD        (* eaop2 *)
                  fpGEA2List:  PGEA2LIST; (* GEA set *)
                  fpFEA2List:  PFEA2LIST; (* FEA set *)
                  oError:      ULONG;     (* offset of FEA error *)
            END;
            TYPE PEAOP2 = POINTER TO EAOP2;


            (*
            * Equates for the types of EAs that follow the convention that we have
            * established.
            *
            * Values 0xFFFE thru 0x8000 are reserved.
            * Values 0x0000 thru 0x7fff are user definable.
            * Value  0xFFFC is not used
            *)

            CONST EAT_BINARY      =0FFFEH;      (* length preceeded binary *)
            CONST EAT_ASCII       =0FFFDH;      (* length preceeded ASCII *)
            CONST EAT_BITMAP      =0FFFBH;      (* length preceeded bitmap *)
            CONST EAT_METAFILE    =0FFFAH;      (* length preceeded metafile *)
            CONST EAT_ICON        =0FFF9H;      (* length preceeded icon *)
            CONST EAT_EA          =0FFEEH;      (* length preceeded ASCII *)
                                                                                    (* name of associated data (#include) *)
            CONST EAT_MVMT        =0FFDFH;      (* multi-valued, multi-typed field *)
            CONST EAT_MVST        =0FFDEH;      (* multi-valued, single-typed field *)
            CONST EAT_ASN1        =0FFDDH;      (* ASN.1 field *)

   <* END *>
      (*NOINC*)
      --#pragma pack()
      (*INC*)



      PROCEDURE [APIENTRY]  DosOpen(pszFileName:       PCSZ    ;
                                                        pHf:         PHFILE ;
                                                        pulAction:   PULONG ;
                                                        cbFile:      ULONG  ;
                                                        ulAttribute: ULONG  ;
                                                        fsOpenFlags: ULONG  ;
                                                        fsOpenMode:  ULONG  ;
                                                        peaop2:      PEAOP2 ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectOpen(pszFileName:  PCSZ ;
                                                                      phf:           PHFILE ;
                                                                      pulAction:     PULONG ;
                                                                      cbFile:        ULONG ;
                                                                      ulAttribute:   ULONG ;
                                                                      fsOpenFlags:   ULONG ;
                                                                      fsOpenMode:    ULONG ;
                                                                      peaop2:        PEAOP2 ;
                                                                      pfhFileHandleLockID:  PFHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosClose(hFile:  HFILE ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectClose(hFile:       HFILE ;
                                                                        fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosRead(hFile:       HFILE ;
                                                        pBuffer:      PVOID ;
                                                        cbRead:       ULONG ;
                                                        pcbActual:    PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectRead(hFile:    HFILE ;
                                                                      pBuffer:   PVOID ;
                                                                      cbRead:    ULONG ;
                                                                      pcbActual: PULONG ;
                                                                      fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosWrite(hFile:      HFILE ;
                                                          pBuffer:     PVOID ;
                                                          cbWrite:     ULONG ;
                                                          pcbActual:   PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectWrite(hFile:       HFILE ;
                                                                        pBuffer:      PVOID ;
                                                                        cbWrite:      ULONG ;
                                                                        pcbActual:    PULONG ;
                                                                        fhFileHandleLockID:  FHLOCK ): APIRET;

      (* File time and date types *)

      TYPE FILESTATUS = RECORD     (* fsts *)
            fdateCreation:     FDATE  ;
            ftimeCreation:     FTIME  ;
            fdateLastAccess:   FDATE  ;
            ftimeLastAccess:   FTIME  ;
            fdateLastWrite:    FDATE  ;
            ftimeLastWrite:    FTIME  ;
            cbFile:            ULONG  ;
            cbFileAlloc:       ULONG  ;
            attrFile:          USHORT ;
      END;
      TYPE PFILESTATUS = POINTER TO FILESTATUS;

      TYPE FILESTATUS2 = RECORD    (* fsts2 *)
            fdateCreation:      FDATE  ;
            ftimeCreation:      FTIME  ;
            fdateLastAccess:    FDATE  ;
            ftimeLastAccess:    FTIME  ;
            fdateLastWrite:     FDATE  ;
            ftimeLastWrite:     FTIME  ;
            cbFile:             ULONG  ;
            cbFileAlloc:        ULONG  ;
            attrFile:           USHORT ;
            cbList:             ULONG  ;
      END;
      TYPE PFILESTATUS2 = POINTER TO FILESTATUS2;

      TYPE FILESTATUS3 = RECORD    (* fsts3 *)
            fdateCreation:      FDATE  ;
            ftimeCreation:      FTIME  ;
            fdateLastAccess:    FDATE  ;
            ftimeLastAccess:    FTIME  ;
            fdateLastWrite:     FDATE  ;
            ftimeLastWrite:     FTIME  ;
            cbFile:             ULONG  ;
            cbFileAlloc:        ULONG  ;
            attrFile:           ULONG  ;
      END;
      TYPE PFILESTATUS3 = POINTER TO FILESTATUS3;

      TYPE FILESTATUS4 = RECORD     (* fsts4 *)
            fdateCreation:      FDATE  ;
            ftimeCreation:      FTIME  ;
            fdateLastAccess:    FDATE  ;
            ftimeLastAccess:    FTIME  ;
            fdateLastWrite:     FDATE  ;
            ftimeLastWrite:     FTIME  ;
            cbFile:             ULONG  ;
            cbFileAlloc:        ULONG  ;
            attrFile:           ULONG  ;
            cbList:             ULONG  ;
      END;
      TYPE PFILESTATUS4 = POINTER TO FILESTATUS4;


      TYPE FSALLOCATE = RECORD     (* fsalloc *)
            idFileSystem:      ULONG  ;
            cSectorUnit:       ULONG  ;
            cUnit:             ULONG  ;
            cUnitAvail:        ULONG  ;
            cbSector:          USHORT ;
      END;
      TYPE PFSALLOCATE = POINTER TO FSALLOCATE;

      TYPE HDIR  = LHANDLE;        (* hdir *)
      TYPE PHDIR = POINTER TO HDIR;


      PROCEDURE [APIENTRY]  DosDelete(pszFile:  PCSZ ): APIRET;

      PROCEDURE [APIENTRY]  DosForceDelete(pszFile:  PCSZ ): APIRET;

      PROCEDURE [APIENTRY]  DosDupHandle(hFile:  HFILE ;
                                                                  pHfile:  PHFILE ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryFHState(hFile:       HFILE ;
                                                                        pMode:        PULONG ): APIRET;
      PROCEDURE [APIENTRY]  DosProtectQueryFHState(hFile: HFILE ;
                                                                                      pMode: PULONG ;
                                                                                      fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosSetFHState(hFile: HFILE ;
                                                                    mode:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectSetFHState(hFile:  HFILE ;
                                                                                  mode:    ULONG ;
                                                                                  fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryHType(hFile: HFILE ;
                                                                    pType: PULONG ;
                                                                    pAttr:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosFindFirst(pszFileSpec:  PCSZ    ;
                                                                  phdir:         PHDIR  ;
                                                                  flAttribute:   ULONG  ;
                                                                  pfindbuf:      PVOID  ;
                                                                  cbBuf:         ULONG  ;
                                                                  pcFileNames:   PULONG ;
                                                                  ulInfoLevel:   ULONG  ): APIRET;

      PROCEDURE [APIENTRY]  DosFindNext(hDir:   HDIR   ;
                                                                pfindbuf:        PVOID  ;
                                                                cbfindbuf:       ULONG  ;
                                                                pcFilenames:     PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosFindClose(hDir:  HDIR ): APIRET;

      PROCEDURE [APIENTRY]  DosFSAttach(pszDevice:        PCSZ ;
                                                                pszFilesystem:     PCSZ ;
                                                                pData:             PVOID ;
                                                                cbData:            ULONG ;
                                                                flag:              ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryFSAttach(pszDeviceName:    PCSZ    ;
                                                                          ulOrdinal:         ULONG  ;
                                                                          ulFSAInfoLevel:    ULONG  ;
                                                                          pfsqb:             PFSQBUFFER2 ;
                                                                          pcbBuffLength:     PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosFSCtl(pData:      PVOID ;
                                                          cbData:      ULONG ;
                                                          pcbData:     PULONG ;
                                                          pParms:      PVOID ;
                                                          cbParms:     ULONG ;
                                                          pcbParms:    PULONG ;
                                                          function:    ULONG ;
                                                          pszRoute:    PCSZ ;
                                                          hFile:       HFILE ;
                                                          method:      ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSetFileSize(hFile:        HFILE ;
                                                                      cbSize:        ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectSetFileSize(hFile: HFILE ;
                                                                                    cbSize: ULONG ;
                                                                                    fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosResetBuffer(hFile:  HFILE ): APIRET;

      PROCEDURE [APIENTRY]  DosSetFilePtr(hFile:   HFILE ;
                                                                    ib:       LONG ;
                                                                    method:   ULONG ;
                                                                    ibActual: PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectSetFilePtr(hFile:   HFILE ;
                                                                                  ib:       LONG;
                                                                                  method:   ULONG ;
                                                                                  ibActual: PULONG ;
                                                                                  fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosMove(pszOld:       PCSZ ;
                                                        pszNew:        PCSZ ): APIRET;

      PROCEDURE [APIENTRY]  DosCopy(pszOld:  PCSZ ;
                                                        pszNew:   PCSZ ;
                                                        option:   ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosEditName(metalevel:  ULONG ;
                                                                pszSource:   PCSZ;
                                                                pszEdit:     PCSZ ;
                                                                pszTarget:   PBYTE ;
                                                                cbTarget:    ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosCreateDir(pszDirName:      PCSZ ;
                                                                  peaop2:           PEAOP2 ): APIRET;

      PROCEDURE [APIENTRY]  DosDeleteDir(pszDir:  PCSZ ): APIRET;

      PROCEDURE [APIENTRY]  DosSetDefaultDisk(disknum:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryCurrentDisk(pdisknum: PULONG ;
                                                                                plogical:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSetCurrentDir(pszDir: PCSZ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryCurrentDir(disknum:  ULONG ;
                                                                              pBuf:      PBYTE ;
                                                                              pcbBuf:    PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryFSInfo(disknum:      ULONG ;
                                                                      infolevel:     ULONG ;
                                                                      pBuf:          PVOID ;
                                                                      cbBuf:         ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSetFSInfo(disknum:  ULONG ;
                                                                  infolevel: ULONG ;
                                                                  pBuf:      PVOID ;
                                                                  cbBuf:     ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryVerify(pBool:  PBOOL32 ): APIRET;

      PROCEDURE [APIENTRY]  DosSetVerify(bool: BOOL32): APIRET;

      PROCEDURE [APIENTRY]  DosSetMaxFH(cFH:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSetRelMaxFH(pcbReqCount:  PLONG ;
                                                                      pcbCurMaxFH:   PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryFileInfo(hf:         HFILE ;
                                                                          ulInfoLevel: ULONG ;
                                                                          pInfo:       PVOID ;
                                                                          cbInfoBuf:   ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectQueryFileInfo(hf:         HFILE ;
                                                                                        ulInfoLevel: ULONG ;
                                                                                        pInfo:       PVOID ;
                                                                                        cbInfoBuf:   ULONG ;
                                                                                        fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosSetFileInfo(hf:          HFILE ;
                                                                      ulInfoLevel:  ULONG ;
                                                                      pInfoBuf:     PVOID ;
                                                                      cbInfoBuf:    ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectSetFileInfo(hf:    HFILE ;
                                                                                    ulInfoLevel:    ULONG ;
                                                                                    pInfoBuf:       PVOID ;
                                                                                    cbInfoBuf:      ULONG ;
                                                                                    fhFileHandleLockID:  FHLOCK ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryPathInfo(pszPathName: PCSZ   ;
                                                                          ulInfoLevel:  ULONG ;
                                                                          pInfoBuf:     PVOID ;
                                                                          cbInfoBuf:    ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSetPathInfo(pszPathName:  PCSZ   ;
                                                                      ulInfoLevel:   ULONG ;
                                                                      pInfoBuf:      PVOID ;
                                                                      cbInfoBuf:     ULONG ;
                                                                      flOptions:     ULONG ): APIRET;

      (* defines for DosSetPathInfo -pathinfo flag *)
      CONST DSPI_WRTTHRU    = 010H;    (* write through *)

      PROCEDURE [APIENTRY]  DosShutdown(ulReserved:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosEnumAttribute(ulRefType:  ULONG  ;
                                                                          pvFile:      PVOID  ;
                                                                          ulEntry:     ULONG  ;
                                                                          pvBuf:       PVOID  ;
                                                                          cbBuf:       ULONG  ;
                                                                          pulCount:    PULONG ;
                                                                          ulInfoLevel: ULONG  ): APIRET;

      PROCEDURE [APIENTRY]  DosProtectEnumAttribute(ulRefType:   ULONG ;
                                                                                        pvFile:       PVOID ;
                                                                                        ulEntry:      ULONG ;
                                                                                        pvBuf:        PVOID ;
                                                                                        cbBuf:        ULONG ;
                                                                                        pulCount:     PULONG ;
                                                                                        ulInfoLevel:  ULONG ;
                                                                                        fhFileHandleLockID :  FHLOCK ): APIRET;

      (*NOINC*)
      --#pragma pack(1)
      (*INC *)

      TYPE DENA1 = RECORD(* _dena1 level 1 info returned from DosEnumAttribute *)
            reserved: UCHAR;       (* 0 *)
            cbName:   UCHAR;         (* length of name exculding NULL *)
            cbValue:  USHORT;        (* length of value *)
            szName:   ARRAY [0..0] OF UCHAR;      (* variable length asciiz name *)
      END;
      TYPE PDENA1 = POINTER TO DENA1;

      TYPE DENA2  = FEA2;
      TYPE PDENA2 = PFEA2;

      (*NOINC*)
      --#pragma pack()
      (*INC *)
      (* Infolevels for DosEnumAttribute  *)
      CONST ENUMEA_LEVEL_NO_VALUE  = 1;      (* FEA without value *)
      (* Reference types for DosEnumAttribute *)
      CONST ENUMEA_REFTYPE_FHANDLE = 0;       (* file handle *)
      CONST ENUMEA_REFTYPE_PATH    = 1;       (* path name *)
      CONST ENUMEA_REFTYPE_MAX     = ENUMEA_REFTYPE_PATH;


      CONST DosOpen2       = DosOpen;
      CONST DosFindFirst2  = DosFindFirst;
      CONST DosQFHandState = DosQueryFHState;
      CONST DosProtectQFHandState = DosProtectQueryFHState;
      CONST DosSetFHandState = DosSetFHState;
      CONST DosProtectSetFHandState = DosProtectSetFHState;
      CONST DosQHandType   = DosQueryHType;
      CONST DosQFSAttach   = DosQueryFSAttach;
      CONST DosNewSize     = DosSetFileSize;
      CONST DosProtectNewSize = DosProtectSetFileSize;
      CONST DosBufReset    = DosResetBuffer;
      CONST DosChgFilePtr  = DosSetFilePtr;
      CONST DosProtectChgFilePtr  = DosProtectSetFilePtr;
      CONST DosMkDir       = DosCreateDir;
      CONST DosMkDir2      = DosCreateDir;
      CONST DosRmDir       = DosDeleteDir;
      CONST DosSelectDisk  = DosSetDefaultDisk;
      CONST DosQCurDisk    = DosQueryCurrentDisk;
      CONST DosChDir       = DosSetCurrentDir;
      CONST DosQCurDir     = DosQueryCurrentDir;
      CONST DosQFSInfo     = DosQueryFSInfo;
      CONST DosQVerify     = DosQueryVerify;
      CONST DosQFileInfo   = DosQueryFileInfo;
      CONST DosProtectQFileInfo   = DosProtectQueryFileInfo;
      CONST DosQPathInfo   = DosQueryPathInfo;

<* END *>

<* IF (DEFINED (INCL_DOSMEMMGR) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>
      (*** Memory management *)

      PROCEDURE [APIENTRY]  DosAllocMem(ppb:    PPVOID ;
                                                                cb:      ULONG ;
                                                                flag:    ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosFreeMem(pb:  PVOID ): APIRET;

      PROCEDURE [APIENTRY]  DosSetMem(pb:  PVOID ;
                                                            cb:   ULONG ;
                                                            flag: ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosGiveSharedMem(pb:   PVOID ;
                                                                          pid:   PID ;
                                                                          flag:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosGetSharedMem(pb:   PVOID ;
                                                                        flag:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosGetNamedSharedMem(ppb:     PPVOID ;
                                                                                  pszName:  PCSZ ;
                                                                                  flag:     ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosAllocSharedMem(ppb:    PPVOID ;
                                                                            pszName: PCSZ ;
                                                                            cb:      ULONG ;
                                                                            flag:    ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryMem(pb:    PVOID ;
                                                                pcb:    PULONG ;
                                                                pFlag:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSubAllocMem(pbBase: PVOID ;
                                                                      ppb:     PPVOID ;
                                                                      cb:      ULONG ): APIRET;
      CONST DosSubAlloc   =  DosSubAllocMem;
      CONST DOSSUBALLOC   =  DosSubAllocMem;

      PROCEDURE [APIENTRY]  DosSubFreeMem(pbBase: PVOID ;
                                                                    pb:      PVOID ;
                                                                    cb:      ULONG): APIRET;
      CONST DosSubFree    =  DosSubFreeMem;
      CONST DOSSUBFREE    =  DosSubFreeMem;

      PROCEDURE [APIENTRY]  DosSubSetMem(pbBase: PVOID ;
                                                                  flag:    ULONG ;
                                                                  cb:      ULONG ): APIRET;
      CONST DosSubSet     =  DosSubSetMem;
      CONST DOSSUBSET     =  DosSubSetMem;

      PROCEDURE [APIENTRY]  DosSubUnsetMem(pbBase:  PVOID ): APIRET;
      CONST DosSubUnset   =  DosSubUnsetMem;
      CONST DOSSUBUNSET   =  DosSubUnsetMem;

   
(* ------------- Include file: .\hm\bsememf.hm ------------- *)
(*static char *SCCSID = "@(#)bsememf.h  6.8 92/03/15";*)
  (******************************************************************************\
  *                                                                             *
  * Module Name: BSEMEMF.H                                                      *
  *                                                                             *
  * OS/2 Base MEMory Flags include file                                         *
  *                                                                             *
  * Copyright (c) 1989  - 1992 IBM Corporation                                  *
  *                                                                             *
  *******************************************************************************)


  (* Access protection *)

  CONST PAG_READ       =   (00000001H);      (* read access                      *)
  CONST PAG_WRITE      =   (00000002H);      (* write access                     *)
  CONST PAG_EXECUTE    =   (00000004H);      (* execute access                   *)
  CONST PAG_GUARD      =   (00000008H);      (* guard protection                 *)
  CONST PAG_DEFAULT    =   (00000400H);      (* default (initial) access         *)

  (* Commit *)
  CONST PAG_COMMIT      =  (00000010H);      (* commit storage                   *)
  CONST PAG_DECOMMIT    =  (00000020H);      (* decommit storage                 *)

  (* Allocation attributes *)
  CONST OBJ_TILE        =  (00000040H);      (* tile object             *)
  CONST OBJ_PROTECTED   =  (00000080H);      (* protect object          *)
                                                  (* NOTE: This flag is NOT available at the api level *)

  CONST OBJ_GETTABLE    =  (00000100H);     (* gettable by other processes      *)
  CONST OBJ_GIVEABLE    =  (00000200H);     (* giveable to other processes      *)

  CONST fPERM  = PAG_EXECUTE + PAG_READ + PAG_WRITE;
  CONST fSHARE = OBJ_GETTABLE + OBJ_GIVEABLE;

  (* DosAllocMem flags *)
  CONST fALLOC = OBJ_TILE + PAG_COMMIT + fPERM;

  (* DosAllocSharedMem flags *)
  CONST fALLOCSHR = OBJ_TILE + PAG_COMMIT + fSHARE + fPERM;

  (* DosGetNamedSharedMem flags *)
  CONST  fGETNMSHR = fPERM;

  (* DosGetSharedMem flags *)
  CONST fGETSHR = fPERM;

  (* DosGiveSharedMem flags *)
  CONST fGIVESHR = fPERM;

  (* DosSetMem flags *)
  CONST fSET = PAG_COMMIT + PAG_DECOMMIT + PAG_DEFAULT + fPERM;

  (* Dos32SubSet flags *)
  CONST DOSSUB_INIT =       01H;          (* initialize memory object for     *)
                                                                                  (* suballocation                    *)

  CONST DOSSUB_GROW      =   02H;          (* increase size of memory pool     *)
                                                                                  (* for suballocation                *)

  CONST DOSSUB_SPARSE_OBJ=   04H;          (* indicator for DosSub to          *)
                                                                                  (* manage the commitment of         *)
                                                                                  (* pages spanned by the memory      *)
                                                                                  (* pool                             *)

  CONST DOSSUB_SERIALIZE =   08H;          (* indicates that access to the     *)
                                                                                  (* memory pool is to be             *)
                                                                                  (* serialized by DosSub             *)

  (* Allocation type (returned from DosQueryMem) *)
  CONST PAG_SHARED      =  (00002000H);    (* shared object                    *)
  CONST PAG_FREE        =  (00004000H);    (* pages are free                   *)
  CONST PAG_BASE        =  (00010000H);    (* first page in object             *)

(************************** End of file ***************************************)

(* ------------- End of file:  .\hm\bsememf.hm ------------- *)

<* END *>



<* IF (DEFINED (INCL_DOSSEMAPHORES) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>

      (*
      *     32-bit Semaphore Support
      *)

      (* Semaphore Attributes *)

      CONST DC_SEM_SHARED  = 001H;   (* DosCreateMutex; DosCreateEvent; and     *)
                                                                    (*   DosCreateMuxWait use it to indicate   *)
                                                                    (*   whether the semaphore is shared or    *)
                                                                    (*   private when the PSZ is null          *)
      CONST DCMW_WAIT_ANY  = 002H;   (* DosCreateMuxWait option for wait on any *)
                                                                    (*   event/mutex to occur                  *)
      CONST DCMW_WAIT_ALL  = 004H;   (* DosCreateMuxWait option for wait on all *)
                                                                    (*   events/mutexs to occur                *)

      CONST SEM_INDEFINITE_WAIT   =  -1;
      CONST SEM_IMMEDIATE_RETURN  =   0;

   <* IF NOT DEFINED(__HSEM__) THEN *>
      <* NEW __HSEM__ + *>
            TYPE HSEM  = POINTER TO SYSTEM.void;
            TYPE PHSEM = POINTER TO HSEM;
   <* END *>

      TYPE SEMRECORD = RECORD     (* psr *)
            hsemCur:     HSEM        ;
            ulUser:      ULONG       ;
      END;
      TYPE PSEMRECORD = POINTER TO SEMRECORD;

<* END *>



<* IF DEFINED(INCL_DOSSEMAPHORES) THEN *>

   <* IF NOT DEFINED(__HEV__) THEN *>
      <* NEW __HEV__ + *>
            TYPE  HEV  = ULONG;             (* hev *)
            TYPE  PHEV = POINTER TO HEV;
   <* END *>

      TYPE  HMTX  = ULONG;            (* hmtx *)
      TYPE  PHMTX = POINTER TO HMTX;
      TYPE  HMUX  = ULONG;            (* hmux *)
      TYPE  PHMUX = POINTER TO HMUX;

      PROCEDURE [APIENTRY]  DosCreateEventSem (pszName:  PCSZ ;
                                                                              phev:      PHEV ;
                                                                              flAttr:    ULONG ;
                                                                              fState:    BOOL32 ): APIRET;

      PROCEDURE [APIENTRY]  DosOpenEventSem (pszName: PCSZ ;
                                                                          phev:     PHEV ): APIRET;

      PROCEDURE [APIENTRY]  DosCloseEventSem (hev:  HEV ): APIRET;

      PROCEDURE [APIENTRY]  DosResetEventSem (hev: HEV ;
                                                                            pulPostCt:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosPostEventSem (hev:  HEV ): APIRET;

      PROCEDURE [APIENTRY]  DosWaitEventSem (hev:  HEV ;
                                                                          ulTimeout:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryEventSem (hev: HEV ;
                                                                            pulPostCt:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosCreateMutexSem (pszName:  PCSZ ;
                                                                              phmtx:     PHMTX ;
                                                                              flAttr:    ULONG ;
                                                                              fState:    BOOL32 ): APIRET;

      PROCEDURE [APIENTRY]  DosOpenMutexSem (pszName:     PCSZ ;
                                                                          phmtx:        PHMTX ): APIRET;

      PROCEDURE [APIENTRY]  DosCloseMutexSem (hmtx:  HMTX): APIRET;

      PROCEDURE [APIENTRY]  DosRequestMutexSem (hmtx:     HMTX ;
                                                                                ulTimeout: ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosReleaseMutexSem (hmtx:  HMTX ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryMutexSem (hmtx:  HMTX ;
                                                                            ppid:   PPID;
                                                                            ptid:   PTID;
                                                                            pulCount:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosCreateMuxWaitSem (pszName: PCSZ ;
                                                                                  phmux:   PHMUX ;
                                                                                  cSemRec: ULONG ;
                                                                                  pSemRec: PSEMRECORD ;
                                                                                  flAttr:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosOpenMuxWaitSem (pszName:   PCSZ ;
                                                                              phmux:      PHMUX ): APIRET;

      PROCEDURE [APIENTRY]  DosCloseMuxWaitSem (hmux:  HMUX ): APIRET;

      PROCEDURE [APIENTRY]  DosWaitMuxWaitSem (hmux:     HMUX ;
                                                                              ulTimeout: ULONG ;
                                                                              pulUser:   PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosAddMuxWaitSem (hmux:       HMUX ;
                                                                            pSemRec:     PSEMRECORD ): APIRET;

      PROCEDURE [APIENTRY]  DosDeleteMuxWaitSem (hmux:    HMUX ;
                                                                                  hSem:     HSEM ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryMuxWaitSem (hmux:     HMUX ;
                                                                                pcSemRec:  PULONG ;
                                                                                pSemRec:   PSEMRECORD ;
                                                                                pflAttr:   PULONG ): APIRET;

<* END *>



<* IF (DEFINED (INCL_DOSDATETIME) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>

      (*** Time support *)

      TYPE DATETIME = RECORD     (* date *)
            hours:          UCHAR   ;
            minutes:        UCHAR   ;
            seconds:        UCHAR   ;
            hundredths:     UCHAR   ;
            day:            UCHAR   ;
            month:          UCHAR   ;
            year:           USHORT  ;
            timezone:       SHORT   ;
            weekday:        UCHAR   ;
      END;
      TYPE PDATETIME = POINTER TO DATETIME;

      PROCEDURE [APIENTRY]   DosGetDateTime(pdt:  PDATETIME ): APIRET;

      PROCEDURE [APIENTRY]   DosSetDateTime(pdt:  PDATETIME ): APIRET;

<* END *>



<* IF DEFINED(INCL_DOSDATETIME) THEN *>


      TYPE HTIMER  = LHANDLE;
      TYPE PHTIMER = POINTER TO HTIMER;

      PROCEDURE [APIENTRY]   DosAsyncTimer(msec:   ULONG ;
                                                                      hsem:    HSEM ;
                                                                      phtimer: PHTIMER ): APIRET;

      PROCEDURE [APIENTRY]   DosStartTimer(msec:   ULONG ;
                                                                      hsem:    HSEM ;
                                                                      phtimer: PHTIMER ): APIRET;

      PROCEDURE [APIENTRY]   DosStopTimer(htimer:  HTIMER ): APIRET;

      CONST DosTimerAsync  = DosAsyncTimer;
      CONST DosTimerStart  = DosStartTimer;
      CONST DosTimerStop   = DosStopTimer;

<* END *>




(*** Module manager *)

<* IF DEFINED(INCL_DOSMODULEMGR) THEN *>


      PROCEDURE [APIENTRY]  DosLoadModule(pszName:   PCSZ ;
                                                                    cbName:     ULONG ;
                                                                    pszModname: PCSZ ;
                                                                    phmod:      PHMODULE ): APIRET;

      PROCEDURE [APIENTRY]  DosFreeModule(hmod: HMODULE): APIRET;

      TYPE PPFN = POINTER TO SYSTEM.ADDRESS;
      PROCEDURE [APIENTRY]  DosQueryProcAddr(hmod:   HMODULE ;
                                                                          ordinal: ULONG ;
                                                                          pszName: PCSZ ;
                                                                          ppfn:    PPFN): APIRET;

      PROCEDURE [APIENTRY]  DosQueryModuleHandle(pszModname: PCSZ ;
                                                                                  phmod:       PHMODULE ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryModuleName(hmod:   HMODULE ;
                                                                              cbName:  ULONG;
                                                                              pch:     PCHAR): APIRET ;

      CONST PT_16BIT    =    0;
      CONST PT_32BIT    =    1;

      PROCEDURE [APIENTRY]  DosQueryProcType(hmod:       HMODULE ;
                                                                          ordinal:     ULONG ;
                                                                          pszName:     PCSZ ;
                                                                          pulproctype: PULONG ): APIRET;

<* END *>



<* IF (DEFINED (INCL_DOSRESOURCES) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>
      (*** Resource support *)

      (* Predefined resource types *)

      CONST RT_POINTER     = 1;   (* mouse pointer shape *)
      CONST RT_BITMAP      = 2;   (* bitmap *)
      CONST RT_MENU        = 3;   (* menu template *)
      CONST RT_DIALOG      = 4;   (* dialog template *)
      CONST RT_STRING      = 5;   (* string tables *)
      CONST RT_FONTDIR     = 6;   (* font directory *)
      CONST RT_FONT        = 7;   (* font *)
      CONST RT_ACCELTABLE  = 8;   (* accelerator tables *)
      CONST RT_RCDATA      = 9;   (* binary data *)
      CONST RT_MESSAGE     = 10;  (* error msg     tables *)
      CONST RT_DLGINCLUDE  = 11;  (* dialog include file name *)
      CONST RT_VKEYTBL     = 12;  (* key to vkey tables *)
      CONST RT_KEYTBL      = 13;  (* key to UGL tables *)
      CONST RT_CHARTBL     = 14;  (* glyph to character tables *)
      CONST RT_DISPLAYINFO = 15;  (* screen display information *)

      CONST RT_FKASHORT    = 16;  (* function key area short form *)
      CONST RT_FKALONG     = 17;  (* function key area long form *)

      CONST RT_HELPTABLE   = 18;  (* Help table for Cary Help manager *)
      CONST RT_HELPSUBTABLE= 19;  (* Help subtable for Cary Help manager *)

      CONST RT_FDDIR       = 20;  (* DBCS uniq/font driver directory *)
      CONST RT_FD          = 21;  (* DBCS uniq/font driver *)

      CONST RT_MAX         = 22;  (* 1st unused Resource Type *)


      CONST RF_ORDINALID   = 080000000H;     (* ordinal id flag in resource table *)

<* END *>




<* IF DEFINED(INCL_DOSRESOURCES) THEN *>


      PROCEDURE [APIENTRY]  DosGetResource(hmod:   HMODULE ;
                                                                      idType:  ULONG ;
                                                                      idName:  ULONG ;
                                                                      ppb:     PPVOID ): APIRET;
      CONST DosGetResource2 = DosGetResource;

      PROCEDURE [APIENTRY]  DosFreeResource(pb:  PVOID ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryResourceSize(hmod:   HMODULE ;
                                                                                  idt:     ULONG ;
                                                                                  idn:     ULONG ;
                                                                                  pulsize: PULONG ): APIRET;

<* END *>




(*** NLS Support *)

<* IF DEFINED(INCL_DOSNLS) THEN *>

      TYPE COUNTRYCODE = RECORD  (* ctryc *)
            country:    ULONG       ;
            codepage:   ULONG       ;
      END;
      TYPE PCOUNTRYCODE = POINTER TO COUNTRYCODE;

      TYPE COUNTRYINFO = RECORD  (* ctryi *)
            country:              ULONG       ;
            codepage:             ULONG       ;
            fsDateFmt:            ULONG       ;
            szCurrency:           ARRAY [0..4] OF CHAR;
            szThousandsSeparator: ARRAY [0..1] OF CHAR;
            szDecimal:            ARRAY [0..1] OF CHAR;
            szDateSeparator:      ARRAY [0..1] OF CHAR;
            szTimeSeparator:      ARRAY [0..1] OF CHAR;
            fsCurrencyFmt:        UCHAR       ;
            cDecimalPlace:        UCHAR       ;
            fsTimeFmt:            UCHAR       ;
            abReserved1:          ARRAY [0..1] OF USHORT;
            szDataSeparator:      ARRAY [0..1] OF CHAR;
            abReserved2:          ARRAY [0..4] OF USHORT;
      END;
      TYPE PCOUNTRYINFO = POINTER TO COUNTRYINFO;


      PROCEDURE [APIENTRY]  DosQueryCtryInfo(cb:  ULONG ;
                                                                          pcc:  PCOUNTRYCODE ;
                                                                          pci:  PCOUNTRYINFO ;
                                                                          pcbActual:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryDBCSEnv(cb:   ULONG ;
                                                                        pcc:   PCOUNTRYCODE ;
                                                                        pBuf:  PCHAR ): APIRET;

      PROCEDURE [APIENTRY]  DosMapCase(cb:       ULONG ;
                                                              pcc:       PCOUNTRYCODE ;
                                                              pch:       PCHAR ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryCollate(cb:   ULONG ;
                                                                        pcc:   PCOUNTRYCODE;
                                                                        pch:   PCHAR;
                                                                        pcch:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryCp(cb:    ULONG ;
                                                              arCP:   PULONG ;
                                                              pcCP:   PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSetProcessCp(cp: ULONG): APIRET;

      CONST DosGetCtryInfo = DosQueryCtryInfo;
      CONST DosGetDBCSEv   = DosQueryDBCSEnv;
      CONST DosCaseMap     = DosMapCase;
      CONST DosGetCollate  = DosQueryCollate;
      CONST DosGetCp       = DosQueryCp;
      CONST DosSetProcCp   = DosSetProcessCp;

<* END *>




(*** Signal support *)

<* IF DEFINED(INCL_DOSEXCEPTIONS) THEN *>

      (* DosSetSigExceptionFocus codes *)

      CONST SIG_UNSETFOCUS = 0;
      CONST SIG_SETFOCUS   = 1;

   
(* ------------- Include file: .\hm\bsexcpt.hm ------------- *)
(*      SCCSID = @(#)bsexcpt.h  6.9 92/03/15 *)

(*************************** START OF SPECIFICATION *****************
  *
  * Source File Name: bsexcpt.h
  *
  * Descriptive Name: Thread Exception Constants and Structure Definitions.
  *
  * Copyright: IBM Corp. 1989  - 1992
  *
  * Function: This file provides constants and data structure
  *      definitions required by application programs to use 32 bit
  *      thread exceptions management facility.
  *
  * Notes: None.
  *
  *************************** END OF SPECIFICATION *******************)

(*
  * User Exception Handler Return Codes:
  *)

CONST XCPT_CONTINUE_SEARCH    = 000000000H;      (* exception not handled   *)
CONST XCPT_CONTINUE_EXECUTION = 0FFFFFFFFH;      (* exception handled       *)
CONST XCPT_CONTINUE_STOP      = 000716668H;      (* exception handled by    *)
                                                                                                (* debugger (VIA DosDebug) *)

(*
  * fHandlerFlags values (see ExceptionReportRecord):
  *
  * The user may only set (but not clear) the EH_NONCONTINUABLE flag.
  * All other flags are set by the system.
  *
  *)

CONST EH_NONCONTINUABLE   = 1H;          (* Noncontinuable exception *)
CONST EH_UNWINDING        = 2H;          (* Unwind is in progress *)
CONST EH_EXIT_UNWIND      = 4H;          (* Exit unwind is in progress *)
CONST EH_STACK_INVALID    = 8H;          (* Stack out of limits or unaligned *)
CONST EH_NESTED_CALL      = 10H;         (* Nested exception handler call *)


(*
  * Unwind all exception handlers (see DosUnwindException API)
  *)
CONST UNWIND_ALL          = 0H;


(*
  *   Exception values are 32 bit values layed out as follows:
  *
  *   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  *   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  *   +---+-+-------------------------+-------------------------------+
  *   |Sev|C|       Facility          |               Code            |
  *   +---+-+-------------------------+-------------------------------+
  *
  *   where
  *
  *       Sev - is the severity code
  *           00 - Success
  *           01 - Informational
  *           10 - Warning
  *           11 - Error
  *
  *       C - is the Customer code flag
  *
  *       Facility - is the facility code
  *
  *       Code - is the facility's status code
  *
  *   Exceptions specific to OS/2 2.0 (e.g. XCPT_SIGNAL) will be marked
  *   with a facility code of 1.
  *
  *   System defined exceptions have a facility code of zero.
  *
  *   Each exception may also have several pieces of additional information.
  *   These are stored in the ExceptionInfo fields of the
  *   ExceptionReportRecord. They are documented here with the exceptions
  *   only for ease of reference.
  *)

CONST XCPT_FATAL_EXCEPTION    = 0C0000000H;
CONST XCPT_SEVERITY_CODE      = 0C0000000H;
CONST XCPT_CUSTOMER_CODE      = 020000000H;
CONST XCPT_FACILITY_CODE      = 01FFF0000H;
CONST XCPT_EXCEPTION_CODE     = 00000FFFFH;

(*  Violation flags in ExceptionInfo *)

CONST XCPT_UNKNOWN_ACCESS     = 00000000H;      (* Unknown access *)
CONST XCPT_READ_ACCESS        = 00000001H;      (* Read access    *)
CONST XCPT_WRITE_ACCESS       = 00000002H;      (* Write access   *)
CONST XCPT_EXECUTE_ACCESS     = 00000004H;      (* Execute access *)
CONST XCPT_SPACE_ACCESS       = 00000008H;      (* Address space access *)
CONST XCPT_LIMIT_ACCESS       = 00000010H;      (* Address space limit violation *)
CONST XCPT_DATA_UNKNOWN       = 0FFFFFFFFH;

(*  Signal numbers for XCPT_SIGNAL *)

CONST XCPT_SIGNAL_INTR      =  1H;
CONST XCPT_SIGNAL_KILLPROC  =  3H;
CONST XCPT_SIGNAL_BREAK     =  4H;

(*  Portable non-fatal software generated exceptions *)

CONST XCPT_GUARD_PAGE_VIOLATION       = 80000001H;
            (* ExceptionInfo[ 0 ] - Access Code: XCPT_READ_ACCESS
                                                                                      XCPT_WRITE_ACCESS *)
            (* ExceptionInfo[ 1 ] - FaultAddr *)

CONST XCPT_UNABLE_TO_GROW_STACK       = 80010001H;

(*  Portable fatal hardware generated exceptions *)

CONST XCPT_DATATYPE_MISALIGNMENT      = 0C000009EH;
            (* ExceptionInfo[ 0 ] - Access Code: XCPT_READ_ACCESS
                                                                                      XCPT_WRITE_ACCESS *)
            (* ExceptionInfo[ 1 ] - Alignment *)
            (* ExceptionInfo[ 2 ] - FaultAddr *)

CONST XCPT_BREAKPOINT                 = 0C000009FH;
CONST XCPT_SINGLE_STEP                = 0C00000A0H;
CONST XCPT_ACCESS_VIOLATION           = 0C0000005H;
            (* ExceptionInfo[ 0 ] - Access Code: XCPT_READ_ACCESS
                                                                                      XCPT_WRITE_ACCESS
                                                                                      XCPT_SPACE_ACCESS
                                                                                      XCPT_LIMIT_ACCESS
                                                                                      XCPT_UNKNOWN_ACCESS *)
            (* ExceptionInfo[ 1 ] - FaultAddr (XCPT_READ_ACCESS/XCPT_WRITE_ACCESS)
                                                            Selector  (XCPT_SPACE_ACCESS)
                                                            -1        (XCPT_LIMIT_ACCESS) *)

CONST XCPT_ILLEGAL_INSTRUCTION        = 0C000001CH;
CONST XCPT_FLOAT_DENORMAL_OPERAND     = 0C0000094H;
CONST XCPT_FLOAT_DIVIDE_BY_ZERO       = 0C0000095H;
CONST XCPT_FLOAT_INEXACT_RESULT       = 0C0000096H;
CONST XCPT_FLOAT_INVALID_OPERATION    = 0C0000097H;
CONST XCPT_FLOAT_OVERFLOW             = 0C0000098H;
CONST XCPT_FLOAT_STACK_CHECK          = 0C0000099H;
CONST XCPT_FLOAT_UNDERFLOW            = 0C000009AH;
CONST XCPT_INTEGER_DIVIDE_BY_ZERO     = 0C000009BH;
CONST XCPT_INTEGER_OVERFLOW           = 0C000009CH;
CONST XCPT_PRIVILEGED_INSTRUCTION     = 0C000009DH;

(*  Portable fatal software generated exceptions *)

CONST XCPT_IN_PAGE_ERROR              = 0C0000006H;
            (* ExceptionInfo[ 0 ] - FaultAddr *)

CONST XCPT_PROCESS_TERMINATE          = 0C0010001H;
CONST XCPT_ASYNC_PROCESS_TERMINATE    = 0C0010002H;
            (* ExceptionInfo[ 0 ] - TID of 'terminator' thread *)

CONST XCPT_NONCONTINUABLE_EXCEPTION   = 0C0000024H;
CONST XCPT_INVALID_DISPOSITION        = 0C0000025H;

(*  Non-portable fatal exceptions *)

CONST XCPT_INVALID_LOCK_SEQUENCE      = 0C000001DH;
CONST XCPT_ARRAY_BOUNDS_EXCEEDED      = 0C0000093H;
CONST XCPT_B1NPX_ERRATA_02            = 0C0010004H;

(*  Misc exceptions *)

CONST XCPT_UNWIND                     = 0C0000026H;
CONST XCPT_BAD_STACK                  = 0C0000027H;
CONST XCPT_INVALID_UNWIND_TARGET      = 0C0000028H;

(*  Signal Exceptions *)

CONST XCPT_SIGNAL                     = 0C0010003H;
            (* ExceptionInfo[ 0 ] - Signal Number *)

(*
  * ContextRecord
  *
  * This is the machine specific register contents for the thread
  * at the time of the exception. Note that only the register sets
  * specified by ContextFlags contain valid data. Conversely, only
  * registers specified in ContextFlags will be restored if an exception
  * is handled.
  *)

(*  The following flags control the contents of the CONTEXT structure. *)

CONST CONTEXT_CONTROL        = (00000001H); (* SS:ESP, CS:EIP,    *)
                                                                                                        (* EFLAGS, EBP        *)
CONST CONTEXT_INTEGER        = (00000002H); (* EAX, EBX, ECX, EDX,*)
                                                                                                        (* ESI, EDI           *)
CONST CONTEXT_SEGMENTS       = (00000004H); (* DS, ES, FS, GS     *)
CONST CONTEXT_FLOATING_POINT = (00000008H); (* num. coprocessor state *)

CONST CONTEXT_FULL           = CONTEXT_CONTROL + CONTEXT_INTEGER +
                                                              CONTEXT_SEGMENTS + CONTEXT_FLOATING_POINT;

(*XLATOFF *)
--#pragma pack(1)
(*XLATON  *)
TYPE FPREG = RECORD (* coprocessor stack register element *)
      losig:     ULONG;
      hisig:     ULONG;
      signexp:   USHORT;
END;
TYPE PFPREG = POINTER TO FPREG;
--#pragma pack()

TYPE CONTEXTRECORD = RECORD
    (*
      * The flags values within this flag control the contents of
      * a ContextRecord.
      *
      * If the ContextRecord is used as an input parameter, then
      * for each portion of the ContextRecord controlled by a flag
      * whose value is set, it is assumed that that portion of the
      * ContextRecord contains valid context. If the ContextRecord
      * is being used to modify a thread's context, then only that
      * portion of the thread's context will be modified.
      *
      * If the ContextRecord is used as an Input/Output parameter to
      * capture the context of a thread, then only those portions of the
      * thread's context corresponding to set flags will be returned.
      *)

      ContextFlags:  ULONG;

    (*
      * This section is specified/returned if the ContextFlags
      * contains the flag CONTEXT_FLOATING_POINT.
      *)

      ctx_env:     ARRAY [0..6] OF ULONG;
      ctx_stack:   ARRAY [0..7] OF FPREG;

    (*
      * This section is specified/returned if the ContextFlags
      * contains the flag CONTEXT_SEGMENTS.
      *)

      ctx_SegGs:     ULONG;
      ctx_SegFs:     ULONG;
      ctx_SegEs:     ULONG;
      ctx_SegDs:     ULONG;

    (*
      * This section is specified/returned if the ContextFlags
      * contains the flag CONTEXT_INTEGER.
      *)

      ctx_RegEdi:    ULONG;
      ctx_RegEsi:    ULONG;
      ctx_RegEax:    ULONG;
      ctx_RegEbx:    ULONG;
      ctx_RegEcx:    ULONG;
      ctx_RegEdx:    ULONG;

    (*
      * This section is specified/returned if the ContextFlags
      * contains the flag CONTEXT_CONTROL.
      *)

      ctx_RegEbp:    ULONG;
      ctx_RegEip:    ULONG;
      ctx_SegCs:     ULONG;
      ctx_EFlags:    ULONG;
      ctx_RegEsp:    ULONG;
      ctx_SegSs:     ULONG;

END;

TYPE PCONTEXTRECORD = POINTER TO CONTEXTRECORD;


(*
  * ExceptionReportRecord
  *
  * This structure contains machine independant information about an
  * exception/unwind. No system exception will ever have more than
  * EXCEPTION_MAXIMUM_PARAMETERS parameters. User exceptions are not
  * bound to this limit.
  *)


CONST EXCEPTION_MAXIMUM_PARAMETERS = 4;  (* Enough for all system exceptions. *)

TYPE PEXCEPTIONREPORTRECORD = POINTER TO EXCEPTIONREPORTRECORD;
TYPE EXCEPTIONREPORTRECORD = RECORD
      ExceptionNum:           ULONG;        (* exception number *)
      fHandlerFlags:          ULONG;
      NestedExceptionReportRecord:    PEXCEPTIONREPORTRECORD;
      ExceptionAddress:       PVOID;
      cParameters:            ULONG;        (* Size of Exception Specific Info *)
      ExceptionInfo:          ARRAY [0..EXCEPTION_MAXIMUM_PARAMETERS-1] OF ULONG;
                                                                                  (* Exception Specfic Info *)
END;

(*
  * ExceptionRegistrationRecord
  *
  * These are linked together to form a chain of exception handlers that
  * will be dispatched to upon receipt of an exception.
  *)

(* ??? volatile spec. is there;  *)

TYPE PEXCEPTIONREGISTRATIONRECORD = POINTER TO EXCEPTIONREGISTRATIONRECORD;

TYPE _ERR = PROCEDURE [APIENTRY] (PEXCEPTIONREPORTRECORD,
                                              PEXCEPTIONREGISTRATIONRECORD,
                                              PCONTEXTRECORD,
                                              PVOID): ULONG;

TYPE ERR = POINTER TO _ERR;


TYPE EXCEPTIONREGISTRATIONRECORD = RECORD
      prev_structure:     PEXCEPTIONREGISTRATIONRECORD;
      ExceptionHandler:   POINTER TO _ERR;
END;

(* End of exception chain marker. *)

--CONST END_OF_CHAIN = PEXCEPTIONREGISTRATIONRECORD - 1;

(************************** End of file ***************************************)

(* ------------- End of file:  .\hm\bsexcpt.hm ------------- *)

      PROCEDURE [APIENTRY]  DosSetExceptionHandler(pERegRec:  PEXCEPTIONREGISTRATIONRECORD ): APIRET;

      PROCEDURE [APIENTRY]  DosUnsetExceptionHandler(pERegRec:  PEXCEPTIONREGISTRATIONRECORD ): APIRET;

      PROCEDURE [APIENTRY]  DosRaiseException(pexcept:  PEXCEPTIONREPORTRECORD ): APIRET;

      PROCEDURE [APIENTRY]  DosSendSignalException(pid:       PID ;
                                                                                      exception:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosUnwindException(phandler:  PEXCEPTIONREGISTRATIONRECORD ;
                                                                              pTargetIP:  PVOID ;
                                                                              pERepRec:   PEXCEPTIONREPORTRECORD ): APIRET;

      PROCEDURE [APIENTRY]  DosSetSignalExceptionFocus(flag:    BOOL32 ;
                                                                                              pulTimes: PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosEnterMustComplete(pulNesting:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosExitMustComplete(pulNesting:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosAcknowledgeSignalException(ulSignalNum:  ULONG ): APIRET;

<* END *>


(*** Pipe and queue support *)

<* IF DEFINED(INCL_DOSQUEUES) THEN *>
   <* IF (DEFINED (INCL_DOSFILEMGR) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>

            TYPE HQUEUE  = LHANDLE;  (* hq *)
            TYPE PHQUEUE = POINTER TO HQUEUE;
            TYPE REQUESTDATA = RECORD    (* reqqdata *)
                  pid:          PID         ;
                  ulData:       ULONG       ;
            END;
            TYPE PREQUESTDATA = POINTER TO REQUESTDATA;

            CONST QUE_FIFO             = 0H;
            CONST QUE_LIFO             = 1H;
            CONST QUE_PRIORITY         = 2H;
            CONST QUE_NOCONVERT_ADDRESS= 0H;
            CONST QUE_CONVERT_ADDRESS  = 4H;


            PROCEDURE [APIENTRY]  DosCreatePipe(phfRead:   PHFILE ;
                                                                          phfWrite:   PHFILE ;
                                                                          cb:         ULONG ): APIRET;

            PROCEDURE [APIENTRY]  DosCloseQueue(hq:  HQUEUE ): APIRET;

            PROCEDURE [APIENTRY]  DosCreateQueue(phq:     PHQUEUE ;
                                                                            priority: ULONG ;
                                                                            pszName:  PCSZ ): APIRET;

            PROCEDURE [APIENTRY]  DosOpenQueue(ppid:    PPID ;
                                                                        phq:      PHQUEUE ;
                                                                        pszName:  PCSZ ): APIRET;

            PROCEDURE [APIENTRY]  DosPeekQueue(hq:          HQUEUE ;
                                                                        pRequest:     PREQUESTDATA ;
                                                                        pcbData:      PULONG ;
                                                                        ppbuf:        PPVOID ;
                                                                        element:      PULONG ;
                                                                        nowait:       BOOL32 ;
                                                                        ppriority:    PBYTE ;
                                                                        hsem:         HEV ): APIRET;

            PROCEDURE [APIENTRY]  DosPurgeQueue(hq:  HQUEUE ): APIRET;

            PROCEDURE [APIENTRY]  DosQueryQueue(hq:        HQUEUE ;
                                                                          pcbEntries: PULONG ): APIRET;

            PROCEDURE [APIENTRY]  DosReadQueue(hq:          HQUEUE ;
                                                                        pRequest:     PREQUESTDATA ;
                                                                        pcbData:      PULONG ;
                                                                        ppbuf:        PPVOID ;
                                                                        element:      ULONG ;
                                                                        wait:         BOOL32 ;
                                                                        ppriority:    PBYTE ;
                                                                        hsem:         HEV ): APIRET;

            PROCEDURE [APIENTRY]  DosWriteQueue(hq:         HQUEUE ;
                                                                          request:     ULONG ;
                                                                          cbData:      ULONG ;
                                                                          pbData:      PVOID ;
                                                                          priority:    ULONG ): APIRET;

   <* ELSE *>
      $; -- In the source file was: #error PHFILE not defined - define INCL_DOSFILEMGR or undefine INCL_NOCOMMON
   <* END *>
<* END *>



<* IF DEFINED(INCL_DOSMISC) THEN *>

      (* definitions for DosSearchPath control word *)
      CONST DSP_IMPLIEDCUR         = 1; (* current dir will be searched first *)
      CONST DSP_PATHREF            = 2; (* from env.variable *)
      CONST DSP_IGNORENETERR       = 4; (* ignore net errs & continue search *)

      (* indices for DosQuerySysInfo *)
      CONST QSV_MAX_PATH_LENGTH    = 1;
      CONST Q_MAX_PATH_LENGTH      = QSV_MAX_PATH_LENGTH;
      CONST QSV_MAX_TEXT_SESSIONS  = 2;
      CONST QSV_MAX_PM_SESSIONS    = 3;
      CONST QSV_MAX_VDM_SESSIONS   = 4;
      CONST QSV_BOOT_DRIVE         = 5;       (* 1=A; 2=B; etc. *)
      CONST QSV_DYN_PRI_VARIATION  = 6;       (* 0=Absolute; 1=Dynamic *)
      CONST QSV_MAX_WAIT           = 7;       (* seconds *)
      CONST QSV_MIN_SLICE          = 8;       (* milli seconds *)
      CONST QSV_MAX_SLICE          = 9;       (* milli seconds *)
      CONST QSV_PAGE_SIZE          = 10;
      CONST QSV_VERSION_MAJOR      = 11;
      CONST QSV_VERSION_MINOR      = 12;
      CONST QSV_VERSION_REVISION   = 13;      (* Revision letter *)
      CONST QSV_MS_COUNT           = 14;      (* Free running millisecond counter *)
      CONST QSV_TIME_LOW           = 15;      (* Low dword of time in seconds *)
      CONST QSV_TIME_HIGH          = 16;      (* High dword of time in seconds *)
      CONST QSV_TOTPHYSMEM         = 17;      (* Physical memory on system *)
      CONST QSV_TOTRESMEM          = 18;      (* Resident memory on system *)
      CONST QSV_TOTAVAILMEM        = 19;      (* Available memory for all processes *)
      CONST QSV_MAXPRMEM           = 20;      (* Avail private mem for calling proc *)
      CONST QSV_MAXSHMEM           = 21;      (* Avail shared mem for calling proc *)
      CONST QSV_TIMER_INTERVAL     = 22;      (* Timer interval in tenths of ms *)
      CONST QSV_MAX_COMP_LENGTH    = 23;      (* max len of one component in a name *)
      CONST QSV_MAX                = QSV_MAX_COMP_LENGTH;

      (* definitions for DosError - combine with | *)
      CONST FERR_DISABLEHARDERR    = 000000000H;    (* disable hard error popups *)
      CONST FERR_ENABLEHARDERR     = 000000001H;    (* enable hard error popups *)
      CONST FERR_ENABLEEXCEPTION   = 000000000H;    (* enable exception popups *)
      CONST FERR_DISABLEEXCEPTION  = 000000002H;    (* disable exception popups *)

      (* definitions for DosQueryRASInfo Index *)
      CONST SIS_MMIOADDR           = 0;
      CONST SIS_MEC_TABLE          = 1;
      CONST SIS_SYS_LOG            = 2;


      PROCEDURE [APIENTRY]  DosError(error:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosGetMessage(pTable:   PPCHAR ;
                                                                    cTable:    ULONG ;
                                                                    pBuf:      PCHAR ;
                                                                    cbBuf:     ULONG ;
                                                                    msgnumber: ULONG ;
                                                                    pszFile:   PCSZ ;
                                                                    pcbMsg:    PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosErrClass(code:   ULONG ;
                                                                pClass:  PULONG ;
                                                                pAction: PULONG ;
                                                                pLocus:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosInsertMessage(pTable: PPCHAR;
                                                                          cTable:  ULONG ;
                                                                          pszMsg:  PCSZ ;
                                                                          cbMsg:   ULONG ;
                                                                          pBuf:    PCHAR ;
                                                                          cbBuf:   ULONG ;
                                                                          pcbMsg:  PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosPutMessage(hfile: HFILE ;
                                                                    cbMsg:  ULONG ;
                                                                    pBuf:   PCHAR ): APIRET;

      PROCEDURE [APIENTRY]  DosQuerySysInfo(iStart: ULONG ;
                                                                        iLast:   ULONG ;
                                                                        pBuf:    PVOID ;
                                                                        cbBuf:   ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosScanEnv(pszName:   PCSZ ;
                                                                      ppszValue:  PPCSZ): APIRET;

      PROCEDURE [APIENTRY]  DosSearchPath(flag:           ULONG ;
                                                                    pszPathOrName:   PCSZ ;
                                                                    pszFilename:     PCSZ ;
                                                                    pBuf:            PBYTE ;
                                                                    cbBuf:           ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryMessageCP(pb:         PCHAR ;
                                                                            cb:          ULONG ;
                                                                            pszFilename: PCSZ ;
                                                                            cbBuf:       PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryRASInfo(Index:       ULONG ;
                                                                        Addr:         PPVOID ): APIRET;

      CONST DosInsMessage  = DosInsertMessage;
      CONST DosQSysInfo    = DosQuerySysInfo;

<* END *>


(*** Session manager support *)

<* IF DEFINED(INCL_DOSSESMGR) THEN *>

      TYPE STARTDATA = RECORD    (* stdata *)
            Length:           USHORT  ;
            Related:          USHORT  ;
            FgBg:             USHORT  ;
            TraceOpt:         USHORT  ;
            PgmTitle:         PSZ     ;
            PgmName:          PSZ     ;
            PgmInputs:        PBYTE   ;
            TermQ:            PBYTE   ;
            Environment:      PBYTE   ;
            InheritOpt:       USHORT  ;
            SessionType:      USHORT  ;
            IconFile:         PSZ     ;
            PgmHandle:        ULONG   ;
            PgmControl:       USHORT  ;
            InitXPos:         USHORT  ;
            InitYPos:         USHORT  ;
            InitXSize:        USHORT  ;
            InitYSize:        USHORT  ;
            Reserved:         USHORT  ;
            ObjectBuffer:     PSZ     ;
            ObjectBuffLen:    ULONG   ;
      END;
      TYPE PSTARTDATA = POINTER TO STARTDATA;

      CONST SSF_RELATED_INDEPENDENT =0;
      CONST SSF_RELATED_CHILD       =1;

      CONST SSF_FGBG_FORE           =0;
      CONST SSF_FGBG_BACK           =1;

      CONST SSF_TRACEOPT_NONE       =0;
      CONST SSF_TRACEOPT_TRACE      =1;
      CONST SSF_TRACEOPT_TRACEALL   =2;

      CONST SSF_INHERTOPT_SHELL     =0;
      CONST SSF_INHERTOPT_PARENT    =1;

      (* note that these types are identical to those in pmshl.h for PROG_* *)
      CONST SSF_TYPE_DEFAULT        =0;
      CONST SSF_TYPE_FULLSCREEN     =1;
      CONST SSF_TYPE_WINDOWABLEVIO  =2;
      CONST SSF_TYPE_PM             =3;
      CONST SSF_TYPE_VDM            =4;
      CONST SSF_TYPE_GROUP          =5;
      CONST SSF_TYPE_DLL            =6;
      CONST SSF_TYPE_WINDOWEDVDM    =7;
      CONST SSF_TYPE_PDD            =8;
      CONST SSF_TYPE_VDD            =9;

      (* note that these flags are identical to those in pmshl.h for SHE_* *)
      CONST SSF_CONTROL_VISIBLE     =00000H;
      CONST SSF_CONTROL_INVISIBLE   =00001H;
      CONST SSF_CONTROL_MAXIMIZE    =00002H;
      CONST SSF_CONTROL_MINIMIZE    =00004H;
      CONST SSF_CONTROL_NOAUTOCLOSE =00008H;
      CONST SSF_CONTROL_SETPOS      =08000H;

      TYPE STATUSDATA = RECORD  (* stsdata *)
            Length:    USHORT ;
            SelectInd: USHORT ;
            BondInd:   USHORT ;
      END;
      TYPE PSTATUSDATA = POINTER TO STATUSDATA;

      (* SelectInd and BondInd paramater values for DosSetSession *)
      CONST SET_SESSION_UNCHANGED     = 0;
      CONST SET_SESSION_SELECTABLE    = 1;
      CONST SET_SESSION_NON_SELECTABLE= 2;
      CONST SET_SESSION_BOND          = 1;
      CONST SET_SESSION_NO_BOND       = 2;

      (* TargetOption (scope) parameter values for DosStopSession *)
      CONST STOP_SESSION_SPECIFIED    = 0;
      CONST STOP_SESSION_ALL          = 1;




      PROCEDURE [APIENTRY]  DosStartSession(psd:        PSTARTDATA ;
                                                                        pidSession:  PULONG ;
                                                                        ppid:        PPID ): APIRET;

      PROCEDURE [APIENTRY]  DosSetSession(idSession:     ULONG ;
                                                                    psd:            PSTATUSDATA ): APIRET;

      PROCEDURE [APIENTRY]  DosSelectSession(idSession:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosStopSession(scope:        ULONG ;
                                                                      idSession:     ULONG ): APIRET;

      PROCEDURE [APIENTRY] DosQueryAppType(pszName:       PCSZ ;
                                                                      pFlags:         PULONG ): APIRET;

      CONST DosQAppType   =  DosQueryAppType;

<* END *>



<* IF (DEFINED (INCL_DOSSESMGR) OR DEFINED (INCL_DOSFILEMGR) ) THEN *>

      (* AppType returned in by DosQueryAppType in pFlags as follows          *)
      CONST FAPPTYP_NOTSPEC        = 00000H;
      CONST FAPPTYP_NOTWINDOWCOMPAT= 00001H;
      CONST FAPPTYP_WINDOWCOMPAT   = 00002H;
      CONST FAPPTYP_WINDOWAPI      = 00003H;
      CONST FAPPTYP_BOUND          = 00008H;
      CONST FAPPTYP_DLL            = 00010H;
      CONST FAPPTYP_DOS            = 00020H;
      CONST FAPPTYP_PHYSDRV        = 00040H;  (* physical device driver       *)
      CONST FAPPTYP_VIRTDRV        = 00080H;  (* virtual device driver        *)
      CONST FAPPTYP_PROTDLL        = 00100H;  (* 'protected memory' dll       *)
      CONST FAPPTYP_WINDOWSREAL    = 00200H;  (* Windows real mode app        *)
      CONST FAPPTYP_WINDOWSPROT    = 00400H;  (* Windows protect mode app     *)
      CONST FAPPTYP_WINDOWSPROT31  = 01000H;  (* Windows 3.1 protect mode app *)
      CONST FAPPTYP_32BIT          = 04000H;
      CONST FAPPTYP_EXETYPE        = FAPPTYP_WINDOWAPI;

      CONST FAPPTYP_RESERVED       = -1-(FAPPTYP_WINDOWAPI + FAPPTYP_BOUND + FAPPTYP_DLL + FAPPTYP_DOS + FAPPTYP_PHYSDRV + FAPPTYP_VIRTDRV + FAPPTYP_PROTDLL + FAPPTYP_32BIT);

   <* IF DEFINED(INCL_DOSFILEMGR) THEN *>

            CONST EAT_APPTYP_PMAPI    =    000H;            (* Uses PM API *)
            CONST EAT_APPTYP_DOS      =    001H;            (* DOS APP *)
            CONST EAT_APPTYP_PMW      =    002H;            (* Window compatible *)
            CONST EAT_APPTYP_NOPMW    =    003H;            (* Not Window compatible *)
            CONST EAT_APPTYP_EXETYPE  =    003H;            (* EXE type mask *)
            CONST EAT_APPTYP_RESERVED =    -1-(EAT_APPTYP_EXETYPE);

   <* END *>

<* END *>




(*** Device support *)

<* IF DEFINED(INCL_DOSDEVICES) THEN *>


      PROCEDURE [APIENTRY]  DosDevConfig(pdevinfo:       PVOID ;
                                                                  item:            ULONG ): APIRET;

      CONST DEVINFO_PRINTER       =  0;       (* Number of printers attached *)
      CONST DEVINFO_RS232         =  1;       (* Number of RS232 ports *)
      CONST DEVINFO_FLOPPY        =  2;       (* Number of diskette drives *)
      CONST DEVINFO_COPROCESSOR   =  3;       (* Presence of math coprocessor *)
      CONST DEVINFO_SUBMODEL      =  4;       (* PC Submodel Type *)
      CONST DEVINFO_MODEL         =  5;       (* PC Model Type *)
      CONST DEVINFO_ADAPTER       =  6;       (* Primary display adapter type *)

      PROCEDURE [APIENTRY]  DosDevIOCtl(hDevice:      HFILE ;
                                                                category:      ULONG ;
                                                                function:      ULONG ;
                                                                pParams:       PVOID ;
                                                                cbParmLenMax:  ULONG ;
                                                                pcbParmLen:    PULONG ;
                                                                pData:         PVOID ;
                                                                cbDataLenMax:  ULONG ;
                                                                pcbDataLen:    PULONG ): APIRET;


      CONST DosDevIOCtl2   =  DosDevIOCtl;

      PROCEDURE [APIENTRY]  DosPhysicalDisk(function:    ULONG ;
                                                                        pBuf:         PVOID ;
                                                                        cbBuf:        ULONG ;
                                                                        pParams:      PVOID ;
                                                                        cbParams:     ULONG ): APIRET;

      CONST INFO_COUNT_PARTITIONABLE_DISKS = 1;       (* # of partitionable disks *)
      CONST INFO_GETIOCTLHANDLE            = 2;       (* Obtain handle            *)
      CONST INFO_FREEIOCTLHANDLE           = 3;       (* Release handle           *)

<* END *>


(*** DosNamedPipes API Support *)

<* IF DEFINED(INCL_DOSNMPIPES) THEN *>

      (*** Data structures used with named pipes ***)

      TYPE HPIPE  = LHANDLE;     (* hp *)
      TYPE PHPIPE = POINTER TO HPIPE;

      TYPE AVAILDATA = RECORD             (* AVAILDATA *)
            cbpipe:     USHORT;         (* bytes left in the pipe *)
            cbmessage:  USHORT;         (* bytes left in the current message *)
      END;
      TYPE PAVAILDATA = POINTER TO AVAILDATA;

      TYPE PIPEINFO = RECORD              (* nmpinf *)
            cbOut:      USHORT;     (* length of outgoing I/O buffer *)
            cbIn:       USHORT;     (* length of incoming I/O buffer *)
            cbMaxInst:  BYTE;       (* maximum number of instances   *)
            cbCurInst:  BYTE;       (* current number of instances   *)
            cbName:     BYTE;       (* length of pipe name           *)
            szName:     ARRAY [0..0] OF CHAR;  (* start of name      *)
      END;
      TYPE PPIPEINFO = POINTER TO PIPEINFO;

      TYPE PIPESEMSTATE = RECORD   (* nmpsmst *)
            fStatus:  BYTE;           (* type of record; 0 = EOI; 1 = read ok; *)
                                                                (* 2 = write ok; 3 = pipe closed         *)
            fFlag:    BYTE;           (* additional info; 01 = waiting thread  *)
            usKey:    USHORT;         (* user's key value                      *)
            usAvail:  USHORT;         (* available data/space if status = 1/2  *)
      END;
      TYPE PPIPESEMSTATE = POINTER TO PIPESEMSTATE;

      CONST NP_INDEFINITE_WAIT    =  -1;
      CONST NP_DEFAULT_WAIT       =   0;

      (* DosPeekNmPipe() pipe states *)

      CONST NP_STATE_DISCONNECTED  = 00001H;
      CONST NP_STATE_LISTENING     = 00002H;
      CONST NP_STATE_CONNECTED     = 00003H;
      CONST NP_STATE_CLOSING       = 00004H;

      (* DosCreateNPipe open modes *)

      CONST NP_ACCESS_INBOUND      = 00000H;
      CONST NP_ACCESS_OUTBOUND     = 00001H;
      CONST NP_ACCESS_DUPLEX       = 00002H;
      CONST NP_INHERIT             = 00000H;
      CONST NP_NOINHERIT           = 00080H;
      CONST NP_WRITEBEHIND         = 00000H;
      CONST NP_NOWRITEBEHIND       = 04000H;

      (* DosCreateNPipe and DosQueryNPHState state *)

      CONST NP_READMODE_BYTE       = 00000H;
      CONST NP_READMODE_MESSAGE    = 00100H;
      CONST NP_TYPE_BYTE           = 00000H;
      CONST NP_TYPE_MESSAGE        = 00400H;
      CONST NP_END_CLIENT          = 00000H;
      CONST NP_END_SERVER          = 04000H;
      CONST NP_WAIT                = 00000H;
      CONST NP_NOWAIT              = 08000H;
      CONST NP_UNLIMITED_INSTANCES = 000FFH;


      PROCEDURE [APIENTRY]  DosCallNPipe(pszName: PCSZ ;
                                                                  pInbuf:   PVOID ;
                                                                  cbIn:     ULONG ;
                                                                  pOutbuf:  PVOID ;
                                                                  cbOut:    ULONG ;
                                                                  pcbActual: PULONG ;
                                                                  msec:     ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosConnectNPipe(hpipe:  HPIPE ): APIRET;

      PROCEDURE [APIENTRY]  DosDisConnectNPipe(hpipe:  HPIPE ): APIRET;

      PROCEDURE [APIENTRY]  DosCreateNPipe(pszName: PCSZ ;
                                                                      pHpipe:   PHPIPE ;
                                                                      openmode: ULONG ;
                                                                      pipemode: ULONG ;
                                                                      cbInbuf:  ULONG ;
                                                                      cbOutbuf: ULONG ;
                                                                      msec:     ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosPeekNPipe(hpipe:    HPIPE ;
                                                                  pBuf:      PVOID ;
                                                                  cbBuf:     ULONG ;
                                                                  pcbActual: PULONG ;
                                                                  pAvail:    PAVAILDATA ;
                                                                  pState:    PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryNPHState(hpipe:      HPIPE ;
                                                                          pState:      PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryNPipeInfo(hpipe:     HPIPE ;
                                                                            infolevel:  ULONG ;
                                                                            pBuf:       PVOID ;
                                                                            cbBuf:      ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryNPipeSemState(hsem:  HSEM ;
                                                                                    pnpss:  PPIPESEMSTATE ;
                                                                                    cbBuf:  ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosRawReadNPipe(pszName: PCSZ ;
                                                                        cb:       ULONG ;
                                                                        pLen:     PULONG ;
                                                                        pBuf:     PVOID ): APIRET;

      PROCEDURE [APIENTRY]  DosRawWriteNPipe(pszName:  PCSZ ;
                                                                          cb:        ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSetNPHState(hpipe:  HPIPE ;
                                                                      state:   ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosSetNPipeSem(hpipe: HPIPE ;
                                                                      hsem:   HSEM ;
                                                                      key:    ULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosTransactNPipe(hpipe:      HPIPE ;
                                                                          pOutbuf:     PVOID ;
                                                                          cbOut:       ULONG ;
                                                                          pInbuf:      PVOID ;
                                                                          cbIn:        ULONG ;
                                                                          pcbRead:     PULONG ): APIRET;

      PROCEDURE [APIENTRY]  DosWaitNPipe(pszName: PCSZ ;
                                                                  msec:     ULONG ): APIRET;

      (* values in fStatus *)
      CONST NPSS_EOI                  = 0;     (* End Of Information    *)
      CONST NPSS_RDATA                = 1;     (* read data available   *)
      CONST NPSS_WSPACE               = 2;     (* write space available *)
      CONST NPSS_CLOSE                = 3;     (* pipe in CLOSING state *)

      (* values in npss_flag *)
      CONST NPSS_WAIT                 = 001H;  (* waiting thread on end of pipe *)

      (* defined bits in pipe mode *)
      CONST NP_NBLK                   = 08000H; (* non-blocking read/write *)
      CONST NP_SERVER                 = 04000H; (* set if server end       *)
      CONST NP_WMESG                  = 00400H; (* write messages          *)
      CONST NP_RMESG                  = 00100H; (* read as messages        *)
      CONST NP_ICOUNT                 = 000FFH; (* instance count field    *)


      (*Named pipes may be in one of several states depending on the actions
      * that have been taken on it by the server end and client end.  The
      * following state/action table summarizes the valid state transitions:
      *
      * Current state           Action                  Next state
      *
      *  <none>             server DosMakeNmPipe        DISCONNECTED
      *  DISCONNECTED       server connect              LISTENING
      *  LISTENING          client open                 CONNECTED
      *  CONNECTED          server disconn              DISCONNECTED
      *  CONNECTED          client close                CLOSING
      *  CLOSING            server disconn              DISCONNECTED
      *  CONNECTED          server close                CLOSING
      *  <any other>        server close                <pipe deallocated>
      *
      * If a server disconnects his end of the pipe; the client end will enter a
      * special state in which any future operations (except close) on the file
      * descriptor associated with the pipe will return an error.
      *)

      (*
      *      Values for named pipe state
      *)

      CONST NP_DISCONNECTED      = 1;         (* after pipe creation or Disconnect *)
      CONST NP_LISTENING         = 2;         (* after DosNmPipeConnect            *)
      CONST NP_CONNECTED         = 3;         (* after Client open                 *)
      CONST NP_CLOSING           = 4;         (* after Client or Server close      *)


<* END *>



(*** DosProfile API support *)

 <* IF DEFINED(INCL_DOSPROFILE) THEN *>

      (*** Perfview API support *)

      PROCEDURE [APIENTRY] DosTmrQueryFreq(pulTmrFreq:  PULONG ): APIRET;

      PROCEDURE [APIENTRY] DosTmrQueryTime(pqwTmrTime:  PQWORD ): APIRET;

      PROCEDURE [APIENTRY] DosRegisterPerfCtrs(pbDataBlk:  PBYTE ;
                                                                              pbTextBlk:   PBYTE ;
                                                                              flFlags:     ULONG ): APIRET;

      (* DosProfile ordinal number *)

      CONST PROF_ORDINAL       = 133;

      (* DosProfile usType *)

      CONST PROF_SYSTEM          = 0;
      CONST PROF_USER            = 1;
      CONST PROF_USEDD           = 2;
      CONST PROF_KERNEL          = 4;
      CONST PROF_VERBOSE         = 8;
      CONST PROF_ENABLE          =16;

      (* DosProfile usFunc *)

      CONST PROF_ALLOC           = 0;
      CONST PROF_CLEAR           = 1;
      CONST PROF_ON              = 2;
      CONST PROF_OFF             = 3;
      CONST PROF_DUMP            = 4;
      CONST PROF_FREE            = 5;

      (* DosProfile tic count granularity (DWORD) *)

      CONST PROF_SHIFT           = 2;

      (* DosProfile module name string length *)

      CONST PROF_MOD_NAME_SIZE   =10;

      (* DosProfile error code for end of data *)

      CONST PROF_END_OF_DATA     =13;

<* END *>



(* Virtual DOS Machine API support *)
<* IF DEFINED(INCL_DOSMVDM) THEN *>

      TYPE HVDD  = LHANDLE;     (* hvdd *)
      TYPE PHVDD = POINTER TO HVDD;    (* phvdd *)

      PROCEDURE [APIENTRY]  DosOpenVDD(pszVDD:    PCSZ ;
                                                              phvdd:      PHVDD ): APIRET;

      PROCEDURE [APIENTRY]  DosRequestVDD(hvdd:    HVDD ;
                                                                    sgid:     SGID ;
                                                                    cmd:      ULONG ;
                                                                    cbInput:  ULONG ;
                                                                    pInput:   PVOID ;
                                                                    cbOutput: ULONG ;
                                                                    pOutput:  PVOID ): APIRET;

      PROCEDURE [APIENTRY]  DosCloseVDD(hvdd:  HVDD ): APIRET;

      PROCEDURE [APIENTRY]  DosQueryDOSProperty(sgid:     SGID ;
                                                                                pszName:   PCSZ ;
                                                                                cb:        ULONG ;
                                                                                pch:       PCSZ ): APIRET;

      PROCEDURE [APIENTRY]  DosSetDOSProperty(sgid:       SGID ;
                                                                            pszName:     PCSZ ;
                                                                            cb:          ULONG ;
                                                                            pch:         PCSZ ): APIRET;
<* END *>


<* IF DEFINED(INCL_BDCALLS) THEN *>

(*   #include "bdcalls.hm" -- we can't use it *) 

<* END *>

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\bsedos.hm ------------- *)


<* IF DEFINED(INCL_DOSDEVIOCTL) THEN *>
   
(* ------------- Include file: .\hm\bsedev.hm ------------- *)
(*static char *SCCSID = "@(#)bsedev.h	6.10 92/03/15";*)
(**************************************************************************\
*                                                                         *
* Module Name: BSEDEV.H                                                   *
*                                                                         *
* OS/2 Structures and constants for use with DosDevIOCtl                  *
*                                                                         *
* Copyright (c) 1987-1992, IBM Corporation                                *
*                                                                         *
\**************************************************************************)

<* NEW BSEDEV_INCLUDED + *>

(* Input and Output Control Categories *)

CONST  IOCTL_ASYNC                        = 00001H;
CONST  IOCTL_SCR_AND_PTRDRAW              = 00003H;
CONST  IOCTL_KEYBOARD                     = 00004H;
CONST  IOCTL_PRINTER                      = 00005H;
CONST  IOCTL_LIGHTPEN                     = 00006H;
CONST  IOCTL_POINTINGDEVICE               = 00007H;
CONST  IOCTL_DISK                         = 00008H;
CONST  IOCTL_PHYSICALDISK                 = 00009H;
CONST  IOCTL_MONITOR                      = 0000AH;
CONST  IOCTL_GENERAL                      = 0000BH;

(* Serial-Device Control *)

CONST  ASYNC_SETBAUDRATE                  = 00041H;
CONST  ASYNC_SETLINECTRL                  = 00042H;
CONST  ASYNC_TRANSMITIMM                  = 00044H;
CONST  ASYNC_SETBREAKOFF                  = 00045H;
CONST  ASYNC_SETMODEMCTRL                 = 00046H;
CONST  ASYNC_SETBREAKON                   = 0004BH;
CONST  ASYNC_STOPTRANSMIT                 = 00047H;
CONST  ASYNC_STARTTRANSMIT                = 00048H;
CONST  ASYNC_SETDCBINFO                   = 00053H;
CONST  ASYNC_GETBAUDRATE                  = 00061H;
CONST  ASYNC_GETLINECTRL                  = 00062H;
CONST  ASYNC_GETCOMMSTATUS                = 00064H;
CONST  ASYNC_GETLINESTATUS                = 00065H;
CONST  ASYNC_GETMODEMOUTPUT               = 00066H;
CONST  ASYNC_GETMODEMINPUT                = 00067H;
CONST  ASYNC_GETINQUECOUNT                = 00068H;
CONST  ASYNC_GETOUTQUECOUNT               = 00069H;
CONST  ASYNC_GETCOMMERROR                 = 0006DH;
CONST  ASYNC_GETCOMMEVENT                 = 00072H;
CONST  ASYNC_GETDCBINFO                   = 00073H;

(* Screen/Pointer-Draw Control *)

CONST  SCR_ALLOCLDT                       = 00070H;
CONST  SCR_DEALLOCLDT                     = 00071H;
CONST  PTR_GETPTRDRAWADDRESS              = 00072H;
CONST  SCR_ALLOCLDTOFF                    = 00075H;

(* Keyboard Control *)

CONST  KBD_SETTRANSTABLE                  = 00050H;
CONST  KBD_SETINPUTMODE                   = 00051H;
CONST  KBD_SETINTERIMFLAG                 = 00052H;
CONST  KBD_SETSHIFTSTATE                  = 00053H;
CONST  KBD_SETTYPAMATICRATE               = 00054H;
CONST  KBD_SETFGNDSCREENGRP               = 00055H;
CONST  KBD_SETSESMGRHOTKEY                = 00056H;
CONST  KBD_SETFOCUS                       = 00057H;
CONST  KBD_SETKCB                         = 00058H;
CONST  KBD_SETNLS                         = 0005CH;
CONST  KBD_CREATE                         = 0005DH;
CONST  KBD_DESTROY                        = 0005EH;
CONST  KBD_GETINPUTMODE                   = 00071H;
CONST  KBD_GETINTERIMFLAG                 = 00072H;
CONST  KBD_GETSHIFTSTATE                  = 00073H;
CONST  KBD_READCHAR                       = 00074H;
CONST  KBD_PEEKCHAR                       = 00075H;
CONST  KBD_GETSESMGRHOTKEY                = 00076H;
CONST  KBD_GETKEYBDTYPE                   = 00077H;
CONST  KBD_GETCODEPAGEID                  = 00078H;
CONST  KBD_XLATESCAN                      = 00079H;

(* Printer Control *)

CONST  PRT_QUERYJOBHANDLE                 = 00021H;
CONST  PRT_SETFRAMECTL                    = 00042H;
CONST  PRT_SETINFINITERETRY               = 00044H;
CONST  PRT_INITPRINTER                    = 00046H;
CONST  PRT_ACTIVATEFONT                   = 00048H;
CONST  PRT_GETFRAMECTL                    = 00062H;
CONST  PRT_GETINFINITERETRY               = 00064H;
CONST  PRT_GETPRINTERSTATUS               = 00066H;
CONST  PRT_QUERYACTIVEFONT                = 00069H;
CONST  PRT_VERIFYFONT                     = 0006AH;

(* Pointing-Device (Mouse) Control *)

CONST  MOU_ALLOWPTRDRAW                   = 00050H;
CONST  MOU_UPDATEDISPLAYMODE              = 00051H;
CONST  MOU_SCREENSWITCH                   = 00052H;
CONST  MOU_SETSCALEFACTORS                = 00053H;
CONST  MOU_SETEVENTMASK                   = 00054H;
CONST  MOU_SETHOTKEYBUTTON                = 00055H;
CONST  MOU_SETPTRSHAPE                    = 00056H;
CONST  MOU_DRAWPTR                        = 00057H;
CONST  MOU_REMOVEPTR                      = 00058H;
CONST  MOU_SETPTRPOS                      = 00059H;
CONST  MOU_SETPROTDRAWADDRESS             = 0005AH;
CONST  MOU_SETREALDRAWADDRESS             = 0005BH;
CONST  MOU_SETMOUSTATUS                   = 0005CH;
CONST  MOU_DISPLAYMODECHANGE              = 0005DH;
CONST  MOU_GETBUTTONCOUNT                 = 00060H;
CONST  MOU_GETMICKEYCOUNT                 = 00061H;
CONST  MOU_GETMOUSTATUS                   = 00062H;
CONST  MOU_READEVENTQUE                   = 00063H;
CONST  MOU_GETQUESTATUS                   = 00064H;
CONST  MOU_GETEVENTMASK                   = 00065H;
CONST  MOU_GETSCALEFACTORS                = 00066H;
CONST  MOU_GETPTRPOS                      = 00067H;
CONST  MOU_GETPTRSHAPE                    = 00068H;
CONST  MOU_GETHOTKEYBUTTON                = 00069H;
CONST  MOU_VER                            = 0006AH;

(* Disk/Diskette Control *)

CONST  DSK_LOCKDRIVE                      = 00000H;
CONST  DSK_UNLOCKDRIVE                    = 00001H;
CONST  DSK_REDETERMINEMEDIA               = 00002H;
CONST  DSK_SETLOGICALMAP                  = 00003H;
CONST  DSK_BLOCKREMOVABLE                 = 00020H;
CONST  DSK_GETLOGICALMAP                  = 00021H;
CONST  DSK_SETDEVICEPARAMS                = 00043H;
CONST  DSK_WRITETRACK                     = 00044H;
CONST  DSK_FORMATVERIFY                   = 00045H;
CONST  DSK_GETDEVICEPARAMS                = 00063H;
CONST  DSK_READTRACK                      = 00064H;
CONST  DSK_VERIFYTRACK                    = 00065H;

(* Physical-Disk Control *)

CONST  PDSK_LOCKPHYSDRIVE                 = 00000H;
CONST  PDSK_UNLOCKPHYSDRIVE               = 00001H;
CONST  PDSK_WRITEPHYSTRACK                = 00044H;
CONST  PDSK_GETPHYSDEVICEPARAMS           = 00063H;
CONST  PDSK_READPHYSTRACK                 = 00064H;
CONST  PDSK_VERIFYPHYSTRACK               = 00065H;

(* Character-Monitor Control *)
CONST  MON_REGISTERMONITOR                = 00040H;

(* General Device Control *)
CONST  DEV_FLUSHINPUT                     = 00001H;
CONST  DEV_FLUSHOUTPUT                    = 00002H;
CONST  DEV_QUERYMONSUPPORT                = 00060H;


(* ASYNC_GETCOMMERROR, ASYNC_SETBREAKOFF, ASYNC_SETBREAKON,
  * ASYNC_SETMODEMCTRL
  *)

CONST  RX_QUE_OVERRUN                     = 00001H;
CONST  RX_HARDWARE_OVERRUN                = 00002H;
CONST  PARITY_ERROR                       = 00004H;
CONST  FRAMING_ERROR                      = 00008H;

(* ASYNC_GETCOMMEVENT *)
CONST  CHAR_RECEIVED                      = 00001H;
CONST  LAST_CHAR_SENT                     = 00004H;
CONST  CTS_CHANGED                        = 00008H;
CONST  DSR_CHANGED                        = 00010H;
CONST  DCD_CHANGED                        = 00020H;
CONST  BREAK_DETECTED                     = 00040H;
CONST  ERROR_OCCURRED                     = 00080H;
CONST  RI_DETECTED                        = 00100H;

(* ASYNC_GETCOMMSTATUS *)
CONST  TX_WAITING_FOR_CTS                 = 00001H;
CONST  TX_WAITING_FOR_DSR                 = 00002H;
CONST  TX_WAITING_FOR_DCD                 = 00004H;
CONST  TX_WAITING_FOR_XON                 = 00008H;
CONST  TX_WAITING_TO_SEND_XON             = 00010H;
CONST  TX_WAITING_WHILE_BREAK_ON          = 00020H;
CONST  TX_WAITING_TO_SEND_IMM             = 00040H;
CONST  RX_WAITING_FOR_DSR                 = 00080H;

(* ASYNC_GETLINESTATUS *)
CONST  WRITE_REQUEST_QUEUED               = 00001H;
CONST  DATA_IN_TX_QUE                     = 00002H;
CONST  HARDWARE_TRANSMITTING              = 00004H;
CONST  CHAR_READY_TO_SEND_IMM             = 00008H;
CONST  WAITING_TO_SEND_XON                = 00010H;
CONST  WAITING_TO_SEND_XOFF               = 00020H;

(* ASYNC_GETMODEMINPUT *)
CONST  CTS_ON                             = 010H;
CONST  DSR_ON                             = 020H;
CONST  RI_ON                              = 040H;
CONST  DCD_ON                             = 080H;

(* DSK_SETDEVICEPARAMS *)
CONST  BUILD_BPB_FROM_MEDIUM              = 000H;
CONST  REPLACE_BPB_FOR_DEVICE             = 001H;
CONST  REPLACE_BPB_FOR_MEDIUM             = 002H;

(* KBD_GETINPUTMODE, KBD_PEEKCHAR, KBD_SETINPUTMODE*)
CONST  ASCII_MODE                         = 000H;
CONST  BINARY_MODE                        = 080H;

(* KBD_GETINTERIMFLAG *)
CONST  CONVERSION_REQUEST                 = 020H;
CONST  INTERIM_CHAR                       = 080H;

(* KBD_GETSESMGRHOTKEY *)
CONST  HOTKEY_MAX_COUNT                   = 00000H;
CONST  HOTKEY_CURRENT_COUNT               = 00001H;

(* KBD_PEEKCHAR *)
CONST  KBD_DATA_RECEIVED                  = 00001H;
CONST  KBD_DATA_BINARY                    = 08000H;

(* KBD_READCHAR *)
CONST  KBD_READ_WAIT                      = 00000H;
CONST  KBD_READ_NOWAIT                    = 08000H;

(* KBD_SETINPUTMODE *)
CONST  SHIFT_REPORT_MODE                  = 001H;

<* IF NOT DEFINED (INCL_MOU)  THEN *>

      CONST  MOUSE_MOTION                    = 00001H;
      CONST  MOUSE_MOTION_WITH_BN1_DOWN      = 00002H;
      CONST  MOUSE_BN1_DOWN                  = 00004H;
      CONST  MOUSE_MOTION_WITH_BN2_DOWN      = 00008H;
      CONST  MOUSE_BN2_DOWN                  = 00010H;
      CONST  MOUSE_MOTION_WITH_BN3_DOWN      = 00020H;
      CONST  MOUSE_BN3_DOWN                  = 00040H;

      CONST  MHK_BUTTON1                     = 00001H;
      CONST  MHK_BUTTON2                     = 00002H;
      CONST  MHK_BUTTON3                     = 00004H;

      CONST  MOU_NOWAIT                      = 00000H;
      CONST  MOU_WAIT                        = 00001H;

<* END *>

(* MOU_GETHOTKEYBUTTON, MOU_SETHOTKEYBUTTON *)
CONST  MHK_NO_HOTKEY                      = 00000H;

(* MOU_GETMOUSTATUS *)
CONST  MOUSE_QUEUEBUSY                    = 00001H;
CONST  MOUSE_BLOCKREAD                    = 00002H;
CONST  MOUSE_FLUSH                        = 00004H;
CONST  MOUSE_UNSUPPORTED_MODE             = 00008H;
CONST  MOUSE_DISABLED                     = 00100H;
CONST  MOUSE_MICKEYS                      = 00200H;

(* PRT_GETPRINTERSTATUS *)
CONST  PRINTER_TIMEOUT                    = 00001H;
CONST  PRINTER_IO_ERROR                   = 00008H;
CONST  PRINTER_SELECTED                   = 00010H;
CONST  PRINTER_OUT_OF_PAPER               = 00020H;
CONST  PRINTER_ACKNOWLEDGED               = 00040H;
CONST  PRINTER_NOT_BUSY                   = 00080H;

(* fbCtlHndShake *)
CONST  MODE_DTR_CONTROL                   = 001H;
CONST  MODE_DTR_HANDSHAKE                 = 002H;
CONST  MODE_CTS_HANDSHAKE                 = 008H;
CONST  MODE_DSR_HANDSHAKE                 = 010H;
CONST  MODE_DCD_HANDSHAKE                 = 020H;
CONST  MODE_DSR_SENSITIVITY               = 040H;

(* fbFlowReplace *)
CONST  MODE_AUTO_TRANSMIT                 = 001H;
CONST  MODE_AUTO_RECEIVE                  = 002H;
CONST  MODE_ERROR_CHAR                    = 004H;
CONST  MODE_NULL_STRIPPING                = 008H;
CONST  MODE_BREAK_CHAR                    = 010H;
CONST  MODE_RTS_CONTROL                   = 040H;
CONST  MODE_RTS_HANDSHAKE                 = 080H;
CONST  MODE_TRANSMIT_TOGGLE               = 0C0H;

(* fbTimeout *)
CONST  MODE_NO_WRITE_TIMEOUT              = 001H;
CONST  MODE_READ_TIMEOUT                  = 002H;
CONST  MODE_WAIT_READ_TIMEOUT             = 004H;
CONST  MODE_NOWAIT_READ_TIMEOUT           = 006H;

TYPE DCBINFO = RECORD        (* dcbinf *)
                usWriteTimeout:           USHORT;
                usReadTimeout:            USHORT;
                fbCtlHndShake:            BYTE;
                fbFlowReplace:            BYTE;
                fbTimeout:                BYTE;
                bErrorReplacementChar:    BYTE;
                bBreakReplacementChar:    BYTE;
                bXONChar:                 BYTE;
                bXOFFChar:                BYTE;
END;
TYPE PDCBINFO = POINTER TO DCBINFO;

--#pragma pack(1)

TYPE TRACKLAYOUT = RECORD     (* trckl *)
                bCommand:       BYTE;
                usHead:         USHORT;
                usCylinder:     USHORT;
                usFirstSector:  USHORT;
                cSectors:       USHORT;
                TrackTable:     POINTER TO ARRAY[0..0] OF
                                                                    RECORD
                                                                        usSectorNumber:  USHORT;
                                                                        usSectorSize:    USHORT;
                                                                    END;
END;
TYPE PTRACKLAYOUT = POINTER TO TRACKLAYOUT;


CONST  DEVTYPE_48TPI                      = 00000H;
CONST  DEVTYPE_96TPI                      = 00001H;
CONST  DEVTYPE_35                         = 00002H;
CONST  DEVTYPE_8SD                        = 00003H;
CONST  DEVTYPE_8DD                        = 00004H;
CONST  DEVTYPE_FIXED                      = 00005H;
CONST  DEVTYPE_TAPE                       = 00006H;
CONST  DEVTYPE_UNKNOWN                    = 00007H;


--#pragma pack(1)

TYPE BIOSPARAMETERBLOCK = RECORD     (* bspblk *)
                usBytesPerSector:     USHORT ;
                bSectorsPerCluster:   BYTE   ;
                usReservedSectors:    USHORT ;
                cFATs:                BYTE   ;
                cRootEntries:         USHORT ;
                cSectors:             USHORT ;
                bMedia:               BYTE   ;
                usSectorsPerFAT:      USHORT ;
                usSectorsPerTrack:    USHORT ;
                cHeads:               USHORT ;
                cHiddenSectors:       ULONG  ;
                cLargeSectors:        ULONG  ;
                abReserved:           ARRAY [0..5] OF BYTE;
                cCylinders:           USHORT ;
                bDeviceType:          BYTE   ;
                fsDeviceAttr:         USHORT ;
END;
TYPE PBIOSPARAMETERBLOCK = POINTER TO BIOSPARAMETERBLOCK;

TYPE SCREENGROUP = RECORD    (* scrgrp *)
                idScreenGrp:  USHORT ;
                fTerminate:   USHORT ;
END;
TYPE PSCREENGROUP = POINTER TO SCREENGROUP;

TYPE FRAME = RECORD          (* frm *)
                bCharsPerLine: BYTE ;
                bLinesPerInch: BYTE ;
END;
TYPE PFRAME = POINTER TO FRAME;

TYPE KBDTYPE = RECORD        (* kbdtyp *)
                usType:          USHORT ;
                reserved1:       USHORT ;
                reserved2:       USHORT ;
END;
TYPE PKBDTYPE = POINTER TO KBDTYPE;

TYPE LINECONTROL = RECORD    (* lnctl *)
                bDataBits:      BYTE ;
                bParity:        BYTE ;
                bStopBits:      BYTE ;
                fTransBreak:    BYTE ;
END;
TYPE PLINECONTROL = POINTER TO LINECONTROL;

(* MODEMSTATUS.fbModemOn, ASYNC_GETMODEMOUTPUT *)
CONST  DTR_ON                             = 001H;
CONST  RTS_ON                             = 002H;

(* MODEMSTATUS.fbModemOff *)
CONST  DTR_OFF                            = 0FEH;
CONST  RTS_OFF                            = 0FDH;

TYPE MODEMSTATUS = RECORD    (* mdmst *)
                fbModemOn:  BYTE ;
                fbModemOff: BYTE ;
END;
TYPE PMODEMSTATUS = POINTER TO MODEMSTATUS;

--#pragma pack(1)

TYPE TRACKFORMAT = RECORD    (* trckfmt *)
                bCommand:        BYTE ;
                usHead:          USHORT ;
                usCylinder:      USHORT ;
                usReserved:      USHORT ;
                cSectors:        USHORT ;
                FormatTable:     ARRAY [0..0] OF
                                                                                  RECORD
                                                                                      bCylinder:    BYTE ;
                                                                                      bHead:        BYTE ;
                                                                                      idSector:     BYTE ;
                                                                                      bBytesSector: BYTE ;
                                                                                  END;
END;

TYPE PTRACKFORMAT = POINTER TO TRACKFORMAT;

TYPE RXQUEUE = RECORD        (* rxq *)
                cch:  USHORT ;
                cb:   USHORT ;
END;
TYPE PRXQUEUE = POINTER TO RXQUEUE;

TYPE DEVICEPARAMETERBLOCK = RECORD   (* dvpblck *)
                reserved1:        USHORT ;
                cCylinders:       USHORT ;
                cHeads:           USHORT ;
                cSectorsPerTrack: USHORT ;
                reserved2:        USHORT ;
                reserved3:        USHORT ;
                reserved4:        USHORT ;
                reserved5:        USHORT ;
END;
TYPE PDEVICEPARAMETERBLOCK = POINTER TO DEVICEPARAMETERBLOCK;

(* The following must be packed on 2 bytes boundary *)
--#pragma pack(2)

TYPE PTRDRAWFUNCTION = RECORD        (* ptrdfnc *)
                usReturnCode: USHORT ;
                pfnDraw:      SYSTEM.ADDRESS ;
                pchDataSeg:   PCH ;
END;
TYPE PPTRDRAWFUNCTION = POINTER TO PTRDRAWFUNCTION;

TYPE PTRDRAWADDRESS = RECORD         (* ptrdaddr *)
                reserved:    USHORT ;
                ptrdfnc:     PTRDRAWFUNCTION ;
END;
TYPE PPTRDRAWADDRESS  = POINTER TO PTRDRAWADDRESS;

TYPE SHIFTSTATE = RECORD     (* shftst *)
                fsState: USHORT ;
                fNLS:    BYTE   ;
END;
TYPE PSHIFTSTATE = POINTER TO SHIFTSTATE;



(* HOTKEY.fsHotKey/SHIFTSTATE.fsState *)
CONST  RIGHTSHIFT                         = 00001H;
CONST  LEFTSHIFT                          = 00002H;
CONST  CONTROL                            = 00004H;
CONST  ALT                                = 00008H;
CONST  SCROLLLOCK_ON                      = 00010H;
CONST  NUMLOCK_ON                         = 00020H;
CONST  CAPSLOCK_ON                        = 00040H;
CONST  INSERT_ON                          = 00080H;
CONST  LEFTCONTROL                        = 00100H;
CONST  LEFTALT                            = 00200H;
CONST  RIGHTCONTROL                       = 00400H;
CONST  RIGHTALT                           = 00800H;
CONST  SCROLLLOCK                         = 01000H;
CONST  NUMLOCK                            = 02000H;
CONST  CAPSLOCK                           = 04000H;
CONST  SYSREQ                             = 08000H;

TYPE HOTKEY = RECORD         (* htky *)
                fsHotKey:            USHORT ;
                uchScancodeMake:     UCHAR  ;
                uchScancodeBreak:    UCHAR  ;
                idHotKey:            USHORT ;
END;
TYPE PHOTKEY = POINTER TO HOTKEY;

TYPE MONITORPOSITION = RECORD        (* mnpos *)
                fPosition:       USHORT ;
                index:           USHORT ;
                pbInBuf:         ULONG  ;
                offOutBuf:       USHORT ;
END;
TYPE PMONITORPOSITION = POINTER TO MONITORPOSITION;

TYPE RATEDELAY = RECORD      (* rtdly *)
                usDelay:      USHORT ;
                usRate:       USHORT ;
END;
TYPE PRATEDELAY = POINTER TO RATEDELAY;

TYPE CODEPAGEINFO = RECORD   (* cpi *)
                pbTransTable:  PBYTE ;
                idCodePage:    USHORT ;
                idTable:       USHORT ;
END;
TYPE PCODEPAGEINFO = POINTER TO CODEPAGEINFO;

TYPE CPID = RECORD   (* cpid *)
                idCodePage:   USHORT ;
                Reserved:     USHORT ;
END;
TYPE PCPID = POINTER TO CPID;

TYPE LDTADDRINFO = RECORD     (* ldtaddr *)
                pulPhysAddr:   PULONG ;
                cb:            USHORT ;
END;
TYPE PLDTADDRINFO = POINTER TO LDTADDRINFO;

TYPE PTRDRAWDATA = RECORD    (* ptrdd *)
                cb:         USHORT ;
                usConfig:   USHORT ;
                usFlag:     USHORT ;
END;
---#pragma pack()                           (*restore default packing *)

TYPE PPTRDRAWDATA = POINTER TO PTRDRAWDATA;

(************************** End of file ***************************************)

(* ------------- End of file:  .\hm\bsedev.hm ------------- *)
<* END *>

<* IF DEFINED(__NEWER_DEFINED_NAME) THEN *> (* it was '#if' 0 in the source text *)
   
(* ------------- Include file: .\hm\bsesub.hm ------------- *)
<* IF DEFINED(__NEWER_DEFINED_NAME) THEN *> (* it was '#if' 0 in the source text *)
(****************************** Module Header ******************************\
*
* Module Name: BSESUB.H
*
* OS/2 Base include file.
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* The folowing symbols are used in this file for conditional sections.
*
* Subcomponents marked with "+" are partially included by default:
*
*   #define:                To include:
*
*   INCL_KBD                KBD
*   INCL_VIO                VIO
*   INCL_MOU                MOU
*
* ===========================================================================
*
* Comments at the end of each TYPE  line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)


<* IF DEFINED (INCL_SUB)  THEN *>
   <* NEW INCL_KBD + *>
   <* NEW INCL_VIO + *>
   <* NEW INCL_MOU + *>
<* END *>

<* IF DEFINED (INCL_KBD)  THEN *>


      TYPE HKBD   = SYSTEM.CARD16;
      TYPE PHKBD  = POINTER TO HKBD;

      PROCEDURE [APIENTRY16] KBD16REGISTER (pszModName:  PSZ ;
                                                                  pszEntryPt:  PSZ ;
                                                                  FunMask:     ULONG):  APIRET16;

      CONST KR_KBDCHARIN               = 000000001H;
      CONST KR_KBDPEEK                 = 000000002H;
      CONST KR_KBDFLUSHBUFFER          = 000000004H;
      CONST KR_KBDGETSTATUS            = 000000008H;
      CONST KR_KBDSETSTATUS            = 000000010H;
      CONST KR_KBDSTRINGIN             = 000000020H;
      CONST KR_KBDOPEN                 = 000000040H;
      CONST KR_KBDCLOSE                = 000000080H;
      CONST KR_KBDGETFOCUS             = 000000100H;
      CONST KR_KBDFREEFOCUS            = 000000200H;
      CONST KR_KBDGETCP                = 000000400H;
      CONST KR_KBDSETCP                = 000000800H;
      CONST KR_KBDXLATE                = 000001000H;
      CONST KR_KBDSETCUSTXT            = 000002000H;

      CONST IO_WAIT                  =  0;
      CONST IO_NOWAIT                =  1;

      PROCEDURE [APIENTRY16] KBD16DEREGISTER (): APIRET16; 

      (* KBDKEYINFO structure, for KbdCharIn and KbdPeek *)
      --#pragma pack(2)


      TYPE KBDKEYINFO = RECORD     (* kbci *)
            chChar:          UCHAR ;
            chScan:          UCHAR ;
            fbStatus:        UCHAR ;
            bNlsShift:       UCHAR ;
            fsState:         USHORT;
            time:            ULONG ;
      END;
      TYPE PKBDKEYINFO = POINTER TO KBDKEYINFO;


      PROCEDURE [APIENTRY16] KBD16CHARIN(pkbci:        PKBDKEYINFO ;
                                                            fWait:        USHORT ;
                                                            hkbd:         HKBD):  APIRET16;
      PROCEDURE [APIENTRY16] KBD16PEEK (pkbci:     PKBDKEYINFO ;
                                                          hkbd:      HKBD):  APIRET16;

      (* structure for KBD16STRINGIN() *)

      TYPE STRINGINBUF = RECORD    (* kbsi *)
            cb:    USHORT ;
            cchIn: USHORT ;
      END;
      TYPE PSTRINGINBUF = POINTER TO STRINGINBUF;

      PROCEDURE [APIENTRY16]  KBD16STRINGIN (pch:     PCH ;
                                                                    pchIn:   PSTRINGINBUF ;
                                                                    fsWait:  USHORT ;
                                                                    hkbd:    HKBD): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16FLUSHBUFFER (hkbd: HKBD): APIRET16;

      (* KBDINFO.fsMask *)

      CONST KEYBOARD_ECHO_ON                = 00001H;
      CONST KEYBOARD_ECHO_OFF               = 00002H;
      CONST KEYBOARD_BINARY_MODE            = 00004H;
      CONST KEYBOARD_ASCII_MODE             = 00008H;
      CONST KEYBOARD_MODIFY_STATE           = 00010H;
      CONST KEYBOARD_MODIFY_INTERIM         = 00020H;
      CONST KEYBOARD_MODIFY_TURNAROUND      = 00040H;
      CONST KEYBOARD_2B_TURNAROUND          = 00080H;
      CONST KEYBOARD_SHIFT_REPORT           = 00100H;

   <* IF NOT DEFINED (INCL_DOSDEVIOCTL)  THEN *>
            (* KBDINFO.fsState/KBDKEYINFO.fsState/KBDTRANS.fsState *)
            CONST KBDSTF_RIGHTSHIFT               = 00001H;
            CONST KBDSTF_LEFTSHIFT                = 00002H;
            CONST KBDSTF_CONTROL                  = 00004H;
            CONST KBDSTF_ALT                      = 00008H;
            CONST KBDSTF_SCROLLLOCK_ON            = 00010H;
            CONST KBDSTF_NUMLOCK_ON               = 00020H;
            CONST KBDSTF_CAPSLOCK_ON              = 00040H;
            CONST KBDSTF_INSERT_ON                = 00080H;
            CONST KBDSTF_LEFTCONTROL              = 00100H;
            CONST KBDSTF_LEFTALT                  = 00200H;
            CONST KBDSTF_RIGHTCONTROL             = 00400H;
            CONST KBDSTF_RIGHTALT                 = 00800H;
            CONST KBDSTF_SCROLLLOCK               = 01000H;
            CONST KBDSTF_NUMLOCK                  = 02000H;
            CONST KBDSTF_CAPSLOCK                 = 04000H;
            CONST KBDSTF_SYSREQ                   = 08000H;
   <* END *>

      (* KBDINFO structure, for KbdSet/GetStatus *)
      TYPE KBDINFO = RECORD         (* kbst *)
            cb:                USHORT ;
            fsMask:            USHORT ;
            chTurnAround:      USHORT ;
            fsInterim:         USHORT ;
            fsState:           USHORT ;
      END;
      TYPE  PKBDINFO = POINTER TO KBDINFO;


      PROCEDURE [APIENTRY16]  KBD16SETSTATUS (pkbdinfo:   PKBDINFO ;
                                                                      hkbd:       HKBD): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16GETSTATUS (pkbdinfo:  PKBDINFO ;
                                                                      hdbd:      HKBD):  APIRET16;

      PROCEDURE [APIENTRY16]  KBD16SETCP (usReserved:  USHORT ;
                                                              pidCP:       USHORT ;
                                                              hdbd:        HKBD): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16GETCP (ulReserved:  ULONG ;
                                                              pidCP:       PUSHORT ;
                                                              hkbd:        HKBD): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16OPEN (phkbd: PHKBD): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16CLOSE (hkbd: HKBD ): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16GETFOCUS (fWait: USHORT ;
                                                                    hkbd:  HKBD ): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16FREEFOCUS (hkbd: HKBD ): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16SYNCH (fsWait: USHORT ): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16SETFGND(): APIRET16;

      (* structure for KbdGetHWID() *)
      TYPE KBDHWID = RECORD        (* kbhw *)
            cb:          USHORT ;
            idKbd:       USHORT ;
            usReserved1: USHORT ;
            usReserved2: USHORT ;
      END;
      TYPE  PKBDHWID = POINTER TO KBDHWID;

      PROCEDURE [APIENTRY16]  KBD16GETHWID (pkbdhwid:     PKBDHWID ;
                                                                  hkbd: HKBD ): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16SETHWID (pkbdhwid:     PKBDHWID ;
                                                                          hkbd:     HKBD): APIRET16;


      (* KBDTRANS.fbStatus *)

      CONST KBDTRF_SHIFT_KEY_IN             = 001H;
      CONST KBDTRF_CONVERSION_REQUEST       = 020H;
      CONST KBDTRF_FINAL_CHAR_IN            = 040H;
      CONST KBDTRF_INTERIM_CHAR_IN          = 080H;

      (* structure for KbdXlate() *)
      --#pragma pack(2)

      TYPE  KBDTRANS = RECORD       (* kbxl *)
            chChar:         UCHAR ;
            chScan:         UCHAR ;
            fbStatus:       UCHAR ;
            bNlsShift:      UCHAR ;
            fsState:        USHORT;
            time:           ULONG ;
            fsDD:           USHORT;
            fsXlate:        USHORT;
            fsShift:        USHORT;
            sZero:          USHORT;
      END;
      TYPE  PKBDTRANS = POINTER TO KBDTRANS;

      PROCEDURE [APIENTRY16]  KBD16XLATE (pkbdtrans:     PKBDTRANS ;
                                                              hkbd:          HKBD): APIRET16;

      PROCEDURE [APIENTRY16]  KBD16SETCUSTXT (usCodePage: PUSHORT ;
                                                                      hkbd:       HKBD): APIRET16;


      CONST Kbd16CharIn      =  KBD16CHARIN;
      CONST Kbd16Close       =  KBD16CLOSE;
      CONST Kbd16DeRegister  =  KBD16DEREGISTER;
      CONST Kbd16FlushBuffer =  KBD16FLUSHBUFFER;
      CONST Kbd16FreeFocus   =  KBD16FREEFOCUS;
      CONST Kbd16GetCp       =  KBD16GETCP;
      CONST Kbd16GetFocus    =  KBD16GETFOCUS;
      CONST Kbd16GetHWID     =  KBD16GETHWID;
      CONST Kbd16GetStatus   =  KBD16GETSTATUS;
      CONST Kbd16Open        =  KBD16OPEN;
      CONST Kbd16Peek        =  KBD16PEEK;
      CONST Kbd16Register    =  KBD16REGISTER;
      CONST Kbd16SetCp       =  KBD16SETCP;
      CONST Kbd16SetCustXt   =  KBD16SETCUSTXT;
      CONST Kbd16SetFgnd     =  KBD16SETFGND;
      CONST Kbd16SetHWID     =  KBD16SETHWID;
      CONST Kbd16SetStatus   =  KBD16SETSTATUS;
      CONST Kbd16StringIn    =  KBD16STRINGIN;
      CONST Kbd16Synch       =  KBD16SYNCH;
      CONST Kbd16Xlate       =  KBD16XLATE;

      CONST KbdCharIn        =  KBD16CHARIN;
      CONST KbdClose         =  KBD16CLOSE;
      CONST KbdDeRegister    =  KBD16DEREGISTER;
      CONST KbdFlushBuffer   =  KBD16FLUSHBUFFER;
      CONST KbdFreeFocus     =  KBD16FREEFOCUS;
      CONST KbdGetCp         =  KBD16GETCP;
      CONST KbdGetFocus      =  KBD16GETFOCUS;
      CONST KbdGetHWID       =  KBD16GETHWID;
      CONST KbdGetStatus     =  KBD16GETSTATUS;
      CONST KbdOpen          =  KBD16OPEN;
      CONST KbdPeek          =  KBD16PEEK;
      CONST KbdRegister      =  KBD16REGISTER;
      CONST KbdSetCp         =  KBD16SETCP;
      CONST KbdSetCustXt     =  KBD16SETCUSTXT;
      CONST KbdSetFgnd       =  KBD16SETFGND;
      CONST KbdSetHWID       =  KBD16SETHWID;
      CONST KbdSetStatus     =  KBD16SETSTATUS;
      CONST KbdStringIn      =  KBD16STRINGIN;
      CONST KbdSynch         =  KBD16SYNCH;
      CONST KbdXlate         =  KBD16XLATE;
<* END *>

<* IF DEFINED (INCL_VIO)  THEN *>

      TYPE  HVIO  = SYSTEM.CARD16;
      TYPE  PHVIO = POINTER TO HVIO;

      PROCEDURE [APIENTRY16]  VIO16REGISTER (pszModName:       PSZ ;
                                                                    pszEntryName:     PSZ ;
                                                                    flFun1:           ULONG ;
                                                                    flFun2:           ULONG): APIRET16;

      PROCEDURE [APIENTRY16]  VioGlobalReg(pszModName:       PSZ ;
                                                                    pszEntryName:     PSZ ;
                                                                    flFun1:           ULONG ;
                                                                    flFun2:           ULONG ;
                                                                    usReturn:         USHORT): APIRET16;

      (* first parameter registration constants   *)
      CONST VR_VIOGETCURPOS            = 000000001H;
      CONST VR_VIOGETCURTYPE           = 000000002H;
      CONST VR_VIOGETMODE              = 000000004H;
      CONST VR_VIOGETBUF               = 000000008H;
      CONST VR_VIOGETPHYSBUF           = 000000010H;
      CONST VR_VIOSETCURPOS            = 000000020H;
      CONST VR_VIOSETCURTYPE           = 000000040H;
      CONST VR_VIOSETMODE              = 000000080H;
      CONST VR_VIOSHOWBUF              = 000000100H;
      CONST VR_VIOREADCHARSTR          = 000000200H;
      CONST VR_VIOREADCELLSTR          = 000000400H;
      CONST VR_VIOWRTNCHAR             = 000000800H;
      CONST VR_VIOWRTNATTR             = 000001000H;
      CONST VR_VIOWRTNCELL             = 000002000H;
      CONST VR_VIOWRTTTY               = 000004000H;
      CONST VR_VIOWRTCHARSTR           = 000008000H;

      CONST VR_VIOWRTCHARSTRATT        = 000010000H;
      CONST VR_VIOWRTCELLSTR           = 000020000H;
      CONST VR_VIOSCROLLUP             = 000040000H;
      CONST VR_VIOSCROLLDN             = 000080000H;
      CONST VR_VIOSCROLLLF             = 000100000H;
      CONST VR_VIOSCROLLRT             = 000200000H;
      CONST VR_VIOSETANSI              = 000400000H;
      CONST VR_VIOGETANSI              = 000800000H;
      CONST VR_VIOPRTSC                = 001000000H;
      CONST VR_VIOSCRLOCK              = 002000000H;
      CONST VR_VIOSCRUNLOCK            = 004000000H;
      CONST VR_VIOSAVREDRAWWAIT        = 008000000H;
      CONST VR_VIOSAVREDRAWUNDO        = 010000000H;
      CONST VR_VIOPOPUP                = 020000000H;
      CONST VR_VIOENDPOPUP             = 040000000H;
      CONST VR_VIOPRTSCTOGGLE          = 080000000H;

      (* second parameter registration constants  *)
      CONST VR_VIOMODEWAIT             = 000000001H;
      CONST VR_VIOMODEUNDO             = 000000002H;
      CONST VR_VIOGETFONT              = 000000004H;
      CONST VR_VIOGETCONFIG            = 000000008H;
      CONST VR_VIOSETCP                = 000000010H;
      CONST VR_VIOGETCP                = 000000020H;
      CONST VR_VIOSETFONT              = 000000040H;
      CONST VR_VIOGETSTATE             = 000000080H;
      CONST VR_VIOSETSTATE             = 000000100H;

      PROCEDURE [APIENTRY16]  VIO16DEREGISTER (): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16GETBUF (pLVB:    PULONG ;
                                                                pcbLVB:  PUSHORT ;
                                                                hvio:    HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16GETCURPOS (pusRow:      PUSHORT;
                                                                      pusColumn:   PUSHORT;
                                                                      hvio:        HVIO):  APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SETCURPOS (usRow:     USHORT ;
                                                                      usColumn:  USHORT ;
                                                                      hvio:      HVIO): APIRET16;

      (* structure for VioSet/GetCurType() *)
      TYPE VIOCURSORINFO = RECORD  (* vioci *)
            yStart:  USHORT   ;
            cEnd:    USHORT   ;
            cx:      USHORT   ;
            attr:    USHORT   ;
      END;

      TYPE  PVIOCURSORINFO = POINTER TO VIOCURSORINFO;

      PROCEDURE [APIENTRY16]  VIO16GETCURTYPE (pvioCursorInfo:  PVIOCURSORINFO ;
                                                                        hvio:            HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SETCURTYPE (pvioCursorInfo:  PVIOCURSORINFO ;
                                                                        hvio:            HVIO): APIRET16;


      (* VIOMODEINFO.color constants *)

      CONST COLORS_2        = 00001H;
      CONST COLORS_4        = 00002H;
      CONST COLORS_16       = 00004H;

      (* structure for VioSet/GetMode() *)
      --#pragma pack(1)


      TYPE VIOMODEINFO = RECORD    (* viomi *)
            cb:             USHORT ;
            fbType:         UCHAR  ;
            color:          UCHAR  ;
            col:            USHORT ;
            row:            USHORT ;
            hres:           USHORT ;
            vres:           USHORT ;
            fmt_ID:         UCHAR  ;
            attrib:         UCHAR  ;
            buf_addr:       ULONG  ;
            buf_length:     ULONG  ;
            full_length:    ULONG  ;
            partial_length: ULONG  ;
            ext_data_addr:  PCH    ;
      END;
      TYPE  PVIOMODEINFO = POINTER TO VIOMODEINFO;

      CONST VGMT_OTHER                 = 001H;
      CONST VGMT_GRAPHICS              = 002H;
      CONST VGMT_DISABLEBURST          = 004H;

      PROCEDURE [APIENTRY16]  VIO16GETMODE (pvioModeInfo:   PVIOMODEINFO ;
                                                                  hvio:           HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SETMODE (pvioModeInfo: PVIOMODEINFO ;
                                                                  hvio:         HVIO): APIRET16;

      (* structure for VIO16GETPHYSBUF() *)
      TYPE VIOPHYSBUF = RECORD      (* viopb *)
            pBuf: PBYTE    ;
            cb:   ULONG    ;
            asel: ARRAY [0..0] OF SEL;
      END;

      TYPE  PVIOPHYSBUF  = POINTER TO VIOPHYSBUF;

      PROCEDURE [APIENTRY16]  VIO16GETPHYSBUF (pvioPhysBuf:    PVIOPHYSBUF ;
                                                                        usReserved:     USHORT): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16READCELLSTR (pchCellStr:    PCH ;
                                                                          pcb:           PUSHORT ;
                                                                          usRow:         USHORT ;
                                                                          usColumn:      USHORT ;
                                                                          hvio:          HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16READCHARSTR    (pchCellStr: PCH ;
                                                                                pcb:        PUSHORT ;
                                                                                usRow:      USHORT ;
                                                                                usColumn:   USHORT ;
                                                                                hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16WRTCELLSTR    (pchCellStr:  PCH ;
                                                                              cb:          USHORT ;
                                                                              usRow:       USHORT ;
                                                                              usColumn:    USHORT ;
                                                                              hvio:        HVIO): APIRET16;

      PROCEDURE [APIENTRY16] VIO16WRTCHARSTR   (pchStr:      PCH ;
                                                                              cb:          USHORT ;
                                                                              usRow:       USHORT ;
                                                                              usColumn:    USHORT ;
                                                                              hvio:        HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SCROLLDN  (usTopRow:   USHORT ;
                                                                          usLeftCol:  USHORT ;
                                                                          usBotRow:   USHORT ;
                                                                          usRightCol: USHORT ;
                                                                          cbLines:    USHORT ;
                                                                          pCell:      PBYTE ;
                                                                          hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SCROLLUP  (usTopRow:   USHORT ;
                                                                          usLeftCol:  USHORT ;
                                                                          usBotRow:   USHORT ;
                                                                          usRightCol: USHORT ;
                                                                          cbLines:    USHORT ;
                                                                          pCell:      PBYTE ;
                                                                          hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SCROLLLF  (usTopRow:   USHORT ;
                                                                          usLeftCol:  USHORT ;
                                                                          usBotRow:   USHORT ;
                                                                          usRightCol: USHORT ;
                                                                          cbCol:      USHORT ;
                                                                          pCell:      PBYTE ;
                                                                          hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SCROLLRT  (usTopRow:   USHORT ;
                                                                          usLeftCol:  USHORT ;
                                                                          usBotRow:   USHORT ;
                                                                          usRightCol: USHORT ;
                                                                          cbCol:      USHORT ;
                                                                          pCell:      PBYTE ;
                                                                          hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16WRTNATTR ( pAttr:      PBYTE ;
                                                                          cb:         USHORT ;
                                                                          usRow:      USHORT ;
                                                                          usColumn:   USHORT ;
                                                                          hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16WRTNCELL (   pCell:      PBYTE ;
                                                                          cb:         USHORT ;
                                                                          usRow:      USHORT ;
                                                                          usColumn:   USHORT ;
                                                                          hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16WRTNCHAR (   pchChar:       PCH ;
                                                                          cb:            USHORT ;
                                                                          usRow:         USHORT ;
                                                                          usColumn:      USHORT ;
                                                                          hvio:          HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16WRTTTY (   pch:     PCH ;
                                                                      cb:      USHORT ;
                                                                      hvio:    HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16WRTCHARSTRATT (   pch:      PCH ;
                                                                                    cb:       USHORT ;
                                                                                    usRow:    USHORT ;
                                                                                    usColumn: USHORT ;
                                                                                    pAttr:    PBYTE ;
                                                                                    hvio:     HVIO): APIRET16;

      CONST VCC_SBCSCHAR             =  0;
      CONST VCC_DBCSFULLCHAR         =  1;
      CONST VCC_DBCS1STHALF          =  2;
      CONST VCC_DBCS2NDHALF          =  3;

      PROCEDURE [APIENTRY16]  VIO16CHECKCHARTYPE (   pType:         PUSHORT ;
                                                                                    usRow:         USHORT ;
                                                                                    usColumn:      USHORT ;
                                                                                    hvio:          HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SHOWBUF (   offLVB:  USHORT ;
                                                                        cb:      USHORT ;
                                                                        hvio:    HVIO): APIRET16;


      CONST ANSI_ON                   = 1;
      CONST ANSI_OFF                  = 0;

      PROCEDURE [APIENTRY16]  VIO16SETANSI (   fAnsi:   USHORT ;
                                                                        hvio:    HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16GETANSI (   pfAnsi:     PUSHORT ;
                                                                        hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16PRTSC ( hvio:       HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16PRTSCTOGGLE ( hvio: HVIO): APIRET16;

      CONST VSRWI_SAVEANDREDRAW       = 0;
      CONST VSRWI_REDRAW              = 1;

      CONST VSRWN_SAVE                = 0;
      CONST VSRWN_REDRAW              = 1;

      CONST UNDOI_GETOWNER            = 0;
      CONST UNDOI_RELEASEOWNER        = 1;

      CONST UNDOK_ERRORCODE           = 0;
      CONST UNDOK_TERMINATE           = 1;

      PROCEDURE [APIENTRY16]  VIO16REDRAWSIZE ( pcbRedraw:   PULONG): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SAVREDRAWWAIT (   usRedrawInd:    USHORT ;
                                                                                    pNotifyType:    PUSHORT ;
                                                                                    usReserved:     USHORT): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SAVREDRAWUNDO (   usOwnerInd:    USHORT ;
                                                                                    usKillInd:     USHORT ;
                                                                                    usReserved:    USHORT): APIRET16;

      CONST VMWR_POPUP                = 0;
      CONST VMWN_POPUP                = 0;

      PROCEDURE [APIENTRY16]  VIO16MODEWAIT (   usReqType:     USHORT ;
                                                                          pNotifyType:   PUSHORT ;
                                                                          usReserved:    USHORT): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16MODEUNDO (   usOwnerInd: USHORT ;
                                                                          usKillInd:  USHORT ;
                                                                          usReserved: USHORT): APIRET16;

      CONST LOCKIO_NOWAIT            =  0;
      CONST LOCKIO_WAIT              =  1;

      CONST LOCK_SUCCESS             =  0;
      CONST LOCK_FAIL                =  1;

      PROCEDURE [APIENTRY16]  VIO16SCRLOCK (   fWait:       USHORT ;
                                                                        pfNotLocked: PUCHAR ;
                                                                        hvio:        HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SCRUNLOCK ( hvio:   HVIO): APIRET16;

      CONST VP_NOWAIT                  = 00000H;
      CONST VP_WAIT                    = 00001H;
      CONST VP_OPAQUE                  = 00000H;
      CONST VP_TRANSPARENT             = 00002H;

      PROCEDURE [APIENTRY16]  VIO16POPUP (   pfWait:       PUSHORT ;
                                                                    hvio:         HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16ENDPOPUP ( hvio:    HVIO): APIRET16;


      (* VIOCONFIGINFO.adapter constants *)

      CONST DISPLAY_MONOCHROME      = 00000H;
      CONST DISPLAY_CGA             = 00001H;
      CONST DISPLAY_EGA             = 00002H;
      CONST DISPLAY_VGA             = 00003H;
      CONST DISPLAY_8514A           = 00007H;
      CONST DISPLAY_IMAGEADAPTER    = 00008H;
      CONST DISPLAY_XGA             = 00009H;

      (* VIOCONFIGINFO.display constants *)

      CONST MONITOR_MONOCHROME      = 00000H;
      CONST MONITOR_COLOR           = 00001H;
      CONST MONITOR_ENHANCED        = 00002H;
      CONST MONITOR_8503            = 00003H;
      CONST MONITOR_851X_COLOR      = 00004H;
      CONST MONITOR_8514            = 00009H;
      CONST MONITOR_FLATPANEL       = 0000AH;
      CONST MONITOR_8507_8604       = 0000BH;
      CONST MONITOR_8515            = 0000CH;
      CONST MONITOR_9515            = 0000FH;
      CONST MONITOR_9517            = 00011H;
      CONST MONITOR_9518            = 00012H;

      (* structure for VioGetConfig() *)
      --#pragma pack(2)

      TYPE  VIOCONFIGINFO = RECORD  (* vioin *)
            cb:               USHORT  ;
            adapter:          USHORT  ;
            display:          USHORT  ;
            cbMemory:         ULONG   ;
            Configuration:    USHORT  ;
            VDHVersion:       USHORT  ;
            Flags:            USHORT  ;
            HWBufferSize:     ULONG   ;
            FullSaveSize:     ULONG   ;
            PartSaveSize:     ULONG   ;
            EMAdaptersOFF:    USHORT  ;
            EMDisplaysOFF:    USHORT  ;
      END;

      TYPE  PVIOCONFIGINFO = POINTER TO VIOCONFIGINFO;


      CONST VIO_CONFIG_CURRENT       =  0;
      CONST VIO_CONFIG_PRIMARY       =  1;
      CONST VIO_CONFIG_SECONDARY     =  2;

      PROCEDURE [APIENTRY16]  VIO16GETCONFIG (   usConfigId:  USHORT ;
                                                                            pvioin:      PVIOCONFIGINFO ;
                                                                            hvio:        HVIO): APIRET16;

      (* structure for VioGet/SetFont() *)
      TYPE VIOFONTINFO = RECORD    (* viofi *)
            cb:       USHORT  ;
            type:     USHORT  ;
            cxCell:   USHORT  ;
            cyCell:   USHORT  ;
            pbData:   PVOID16 ;
            cbData:   USHORT  ;
      END;
      TYPE  PVIOFONTINFO = POINTER TO VIOFONTINFO;

      CONST VGFI_GETCURFONT          =  0;
      CONST VGFI_GETROMFONT          =  1;

      PROCEDURE [APIENTRY16]  VIO16GETFONT (   pviofi:        PVIOFONTINFO ;
                                                                        hvio:          HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SETFONT (    pviofi:       PVIOFONTINFO ;
                                                                          hvio:         HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16GETCP (   usReserved:   USHORT ;
                                                                    pIdCodePage:  PUSHORT ;
                                                                    hvio:         HVIO): APIRET16;

      PROCEDURE [APIENTRY16]  VIO16SETCP (   usReserved:    USHORT ;
                                                                    idCodePage:    USHORT ;
                                                                    hvio:          HVIO): APIRET16;

      TYPE VIOPALSTATE = RECORD    (* viopal *)
            cb:       USHORT  ;
            type:     USHORT  ;
            iFirst:   USHORT  ;
            acolor:   ARRAY [0..0] OF USHORT;
      END;
      TYPE  PVIOPALSTATE = POINTER TO VIOPALSTATE;

      TYPE VIOOVERSCAN = RECORD     (* vioos *)
            cb:       USHORT  ;
            type:     USHORT  ;
            color:    USHORT  ;
      END;
      TYPE  PVIOOVERSCAN = POINTER TO VIOOVERSCAN;

      TYPE VIOINTENSITY = RECORD   (* vioint *)
            cb:    USHORT  ;
            type:  USHORT  ;
            fs:    USHORT  ;
      END;
      TYPE  PVIOINTENSITY = POINTER TO VIOINTENSITY;

      TYPE VIOCOLORREG = RECORD   (* viocreg *)
            cb:               USHORT  ;
            type:             USHORT  ;
            firstcolorreg:    USHORT  ;
            numcolorregs:     USHORT  ;
            colorregaddr:     PCH;
      END;
      TYPE  PVIOCOLORREG = POINTER TO VIOCOLORREG;

      TYPE VIOSETULINELOC = RECORD   (* viouline *)
            cb:       USHORT  ;
            type:     USHORT  ;
            scanline: USHORT  ;
      END;
      TYPE  PVIOSETULINELOC = POINTER TO VIOSETULINELOC;

      TYPE VIOSETTARGET = RECORD   (* viosett *)
            cb:               USHORT  ;
            type:             USHORT  ;
            defaultalgorithm: USHORT  ;
      END;
      TYPE  PVIOSETTARGET = POINTER TO VIOSETTARGET;

      PROCEDURE [APIENTRY16]  VIO16GETSTATE (   pState:      PVOID ;
                                                                          hvio:        HVIO): APIRET16;
      PROCEDURE [APIENTRY16]  VIO16SETSTATE (   pState:      PVOID ;
                                                                          hvio:        HVIO): APIRET16;


      CONST VioCheckCharType      =  VIO16CHECKCHARTYPE;
      CONST VioDeRegister         =  VIO16DEREGISTER;
      CONST VioEndPopUp           =  VIO16ENDPOPUP;
      CONST VioGetAnsi            =  VIO16GETANSI;
      CONST VioGetBuf             =  VIO16GETBUF;
      CONST VioGetConfig          =  VIO16GETCONFIG;
      CONST VioGetCp              =  VIO16GETCP;
      CONST VioGetCurPos          =  VIO16GETCURPOS;
      CONST VioGetCurType         =  VIO16GETCURTYPE;
      CONST VioGetFont            =  VIO16GETFONT;
      CONST VioGetMode            =  VIO16GETMODE;
      CONST VioGetPhysBuf         =  VIO16GETPHYSBUF;
      CONST VioGetState           =  VIO16GETSTATE;
      CONST VioModeUndo           =  VIO16MODEUNDO;
      CONST VioModeWait           =  VIO16MODEWAIT;
      CONST VioPopUp              =  VIO16POPUP;
      CONST VioPrtSc              =  VIO16PRTSC;
      CONST VioPrtScToggle        =  VIO16PRTSCTOGGLE;
      CONST VioReadCellStr        =  VIO16READCELLSTR;
      CONST VioReadCharStr        =  VIO16READCHARSTR;
      CONST VioRedrawSize         =  VIO16REDRAWSIZE;
      CONST VioRegister           =  VIO16REGISTER;
      CONST VioSavRedrawUndo      =  VIO16SAVREDRAWUNDO;
      CONST VioSavRedrawWait      =  VIO16SAVREDRAWWAIT;
      CONST VioScrLock            =  VIO16SCRLOCK;
      CONST VioScrUnLock          =  VIO16SCRUNLOCK;
      CONST VioScrollDn           =  VIO16SCROLLDN;
      CONST VioScrollLf           =  VIO16SCROLLLF;
      CONST VioScrollRt           =  VIO16SCROLLRT;
      CONST VioScrollUp           =  VIO16SCROLLUP;
      CONST VioSetAnsi            =  VIO16SETANSI;
      CONST VioSetCp              =  VIO16SETCP;
      CONST VioSetCurPos          =  VIO16SETCURPOS;
      CONST VioSetCurType         =  VIO16SETCURTYPE;
      CONST VioSetFont            =  VIO16SETFONT;
      CONST VioSetMode            =  VIO16SETMODE;
      CONST VioSetState           =  VIO16SETSTATE;
      CONST VioShowBuf            =  VIO16SHOWBUF;
      CONST VioWrtCellStr         =  VIO16WRTCELLSTR;
      CONST VioWrtCharStr         =  VIO16WRTCHARSTR;
      CONST VioWrtCharStrAtt      =  VIO16WRTCHARSTRATT;
      CONST VioWrtNAttr           =  VIO16WRTNATTR;
      CONST VioWrtNCell           =  VIO16WRTNCELL;
      CONST VioWrtNChar           =  VIO16WRTNCHAR;
      CONST VioWrtTTY             =  VIO16WRTTTY;

      CONST Vio16CheckCharType    =  VIO16CHECKCHARTYPE;
      CONST Vio16DeRegister       =  VIO16DEREGISTER;
      CONST Vio16EndPopUp         =  VIO16ENDPOPUP;
      CONST Vio16GetAnsi          =  VIO16GETANSI;
      CONST Vio16GetBuf           =  VIO16GETBUF;
      CONST Vio16GetConfig        =  VIO16GETCONFIG;
      CONST Vio16GetCp            =  VIO16GETCP;
      CONST Vio16GetCurPos        =  VIO16GETCURPOS;
      CONST Vio16GetCurType       =  VIO16GETCURTYPE;
      CONST Vio16GetFont          =  VIO16GETFONT;
      CONST Vio16GetMode          =  VIO16GETMODE;
      CONST Vio16GetPhysBuf       =  VIO16GETPHYSBUF;
      CONST Vio16GetState         =  VIO16GETSTATE;
      CONST Vio16ModeUndo         =  VIO16MODEUNDO;
      CONST Vio16ModeWait         =  VIO16MODEWAIT;
      CONST Vio16PopUp            =  VIO16POPUP;
      CONST Vio16PrtSc            =  VIO16PRTSC;
      CONST Vio16PrtScToggle      =  VIO16PRTSCTOGGLE;
      CONST Vio16ReadCellStr      =  VIO16READCELLSTR;
      CONST Vio16ReadCharStr      =  VIO16READCHARSTR;
      CONST Vio16RedrawSize       =  VIO16REDRAWSIZE;
      CONST Vio16Register         =  VIO16REGISTER;
      CONST Vio16SavRedrawUndo    =  VIO16SAVREDRAWUNDO;
      CONST Vio16SavRedrawWait    =  VIO16SAVREDRAWWAIT;
      CONST Vio16ScrLock          =  VIO16SCRLOCK;
      CONST Vio16ScrUnLock        =  VIO16SCRUNLOCK;
      CONST Vio16ScrollDn         =  VIO16SCROLLDN;
      CONST Vio16ScrollLf         =  VIO16SCROLLLF;
      CONST Vio16ScrollRt         =  VIO16SCROLLRT;
      CONST Vio16ScrollUp         =  VIO16SCROLLUP;
      CONST Vio16SetAnsi          =  VIO16SETANSI;
      CONST Vio16SetCp            =  VIO16SETCP;
      CONST Vio16SetCurPos        =  VIO16SETCURPOS;
      CONST Vio16SetCurType       =  VIO16SETCURTYPE;
      CONST Vio16SetFont          =  VIO16SETFONT;
      CONST Vio16SetMode          =  VIO16SETMODE;
      CONST Vio16SetState         =  VIO16SETSTATE;
      CONST Vio16ShowBuf          =  VIO16SHOWBUF;
      CONST Vio16WrtCellStr       =  VIO16WRTCELLSTR;
      CONST Vio16WrtCharStr       =  VIO16WRTCHARSTR;
      CONST Vio16WrtCharStrAtt    =  VIO16WRTCHARSTRATT;
      CONST Vio16WrtNAttr         =  VIO16WRTNATTR;
      CONST Vio16WrtNCell         =  VIO16WRTNCELL;
      CONST Vio16WrtNChar         =  VIO16WRTNCHAR;
      CONST Vio16WrtTTY           =  VIO16WRTTTY;

<* END *>



<* IF DEFINED (INCL_MOU)  THEN *>

      TYPE  HMOU  = SYSTEM.CARD16;
      TYPE  PHMOU = POINTER TO HMOU;

      PROCEDURE [APIENTRY16]  MOU16REGISTER (   pszModName:    PSZ ;
                                                                          pszEntryName:  PSZ ;
                                                                          flFuns:        ULONG): APIRET16;

      CONST MR_MOUGETNUMBUTTONS        = 000000001H;
      CONST MR_MOUGETNUMMICKEYS        = 000000002H;
      CONST MR_MOUGETDEVSTATUS         = 000000004H;
      CONST MR_MOUGETNUMQUEEL          = 000000008H;
      CONST MR_MOUREADEVENTQUE         = 000000010H;
      CONST MR_MOUGETSCALEFACT         = 000000020H;
      CONST MR_MOUGETEVENTMASK         = 000000040H;
      CONST MR_MOUSETSCALEFACT         = 000000080H;
      CONST MR_MOUSETEVENTMASK         = 000000100H;
      CONST MR_MOUOPEN                 = 000000800H;
      CONST MR_MOUCLOSE                = 000001000H;
      CONST MR_MOUGETPTRSHAPE          = 000002000H;
      CONST MR_MOUSETPTRSHAPE          = 000004000H;
      CONST MR_MOUDRAWPTR              = 000008000H;
      CONST MR_MOUREMOVEPTR            = 000010000H;
      CONST MR_MOUGETPTRPOS            = 000020000H;
      CONST MR_MOUSETPTRPOS            = 000040000H;
      CONST MR_MOUINITREAL             = 000080000H;
      CONST MR_MOUSETDEVSTATUS         = 000100000H;

      PROCEDURE [APIENTRY16]  MOU16DEREGISTER (): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16FLUSHQUE ( hmou:    HMOU): APIRET16;

      CONST MHK_BUTTON1                = 00001H;
      CONST MHK_BUTTON2                = 00002H;
      CONST MHK_BUTTON3                = 00004H;

      (* structure for MouGet/SetPtrPos() *)
      TYPE PTRLOC = RECORD     (* moupl *)
            row:    USHORT ;
            col:    USHORT ;
      END;
      TYPE  PPTRLOC = POINTER TO PTRLOC;

      PROCEDURE [APIENTRY16]  MOU16GETPTRPOS (   pmouLoc:  PPTRLOC ;
                                                                            hmou:     HMOU): APIRET16;
      PROCEDURE [APIENTRY16]  MOU16SETPTRPOS (   pmouLoc: PPTRLOC ;
                                                                            hmou:    HMOU): APIRET16;

      (* structure for MouGet/SetPtrShape() *)
      TYPE PTRSHAPE = RECORD   (* moups *)
            cb:        USHORT ;
            col:       USHORT ;
            row:       USHORT ;
            colHot:    USHORT ;
            rowHot:    USHORT ;
      END;
      TYPE  PPTRSHAPE = POINTER TO PTRSHAPE;

      PROCEDURE [APIENTRY16]  MOU16SETPTRSHAPE (   pBuf:         PBYTE ;
                                                                                pmoupsInfo:   PPTRSHAPE ;
                                                                                hmou:         HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16GETPTRSHAPE (   pBuf:         PBYTE ;
                                                                                pmoupsInfo:   PPTRSHAPE ;
                                                                                hmou:         HMOU): APIRET16;

      (* MouGetDevStatus/MouSetDevStatus device status constants *)

      CONST MOUSE_QUEUEBUSY        = 00001H;
      CONST MOUSE_BLOCKREAD        = 00002H;
      CONST MOUSE_FLUSH            = 00004H;
      CONST MOUSE_UNSUPPORTED_MODE = 00008H;
      CONST MOUSE_DISABLED         = 00100H;
      CONST MOUSE_MICKEYS          = 00200H;


      PROCEDURE [APIENTRY16]  MOU16GETDEVSTATUS (   pfsDevStatus:  PUSHORT ;
                                                                                  hmou:          HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16GETNUMBUTTONS (    pcButtons:   PUSHORT ;
                                                                                      hmou:        HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16GETNUMMICKEYS (    pcMickeys:   PUSHORT ;
                                                                                      hmou:        HMOU): APIRET16;

      (* MouReadEventQue *)

      CONST MOU_NOWAIT      = 00000H;
      CONST MOU_WAIT        = 00001H;

      (* structure for MouReadEventQue() *)

      TYPE   MOUEVENTINFO = RECORD   (* mouev *)
            fs:       USHORT ;
            time:     ULONG  ;
            row:      SHORT  ;
            col:      SHORT  ;
      END;
      TYPE  PMOUEVENTINFO = POINTER TO MOUEVENTINFO;

      PROCEDURE [APIENTRY16]  MOU16READEVENTQUE (   pmouevEvent:  PMOUEVENTINFO ;
                                                                                  pfWait:       PUSHORT ;
                                                                                  hmou:         HMOU): APIRET16;

      (* structure for MouGetNumQueEl() *)
      TYPE MOUQUEINFO = RECORD     (* mouqi *)
            cEvents:           USHORT ;
            cmaxEvents:        USHORT ;
      END;
      TYPE  PMOUQUEINFO = POINTER TO MOUQUEINFO;

      PROCEDURE [APIENTRY16]  MOU16GETNUMQUEEL (   qmouqi:     PMOUQUEINFO ;
                                                                                hmou:       HMOU): APIRET16;

      (* MouGetEventMask/MouSetEventMask events *)

      CONST MOUSE_MOTION                 = 00001H;
      CONST MOUSE_MOTION_WITH_BN1_DOWN   = 00002H;
      CONST MOUSE_BN1_DOWN               = 00004H;
      CONST MOUSE_MOTION_WITH_BN2_DOWN   = 00008H;
      CONST MOUSE_BN2_DOWN               = 00010H;
      CONST MOUSE_MOTION_WITH_BN3_DOWN   = 00020H;
      CONST MOUSE_BN3_DOWN               = 00040H;

      PROCEDURE [APIENTRY16]  MOU16GETEVENTMASK (   pfsEvents:     PUSHORT ;
                                                                                  hmou:          HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16SETEVENTMASK (   pfsEvents:     PUSHORT ;
                                                                                  hmou:          HMOU): APIRET16;

      (* structure for MouGet/SetScaleFact() *)
      TYPE  SCALEFACT = RECORD   (* mousc *)
            rowScale:        USHORT ;
            colScale:        USHORT ;
      END;
      TYPE  PSCALEFACT = POINTER TO SCALEFACT;

      PROCEDURE [APIENTRY16]  MOU16GETSCALEFACT (   pmouscFactors:      PSCALEFACT ;
                                                                                  hmou:               HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16SETSCALEFACT (   pmouscFactors:      PSCALEFACT ;
                                                                                  hmou:               HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16OPEN (   pszDvrName:        PSZ ;
                                                                  phmou:             PHMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16CLOSE (hmou:      HMOU): APIRET16;

      (* structure for MouRemovePtr() *)
      TYPE NOPTRRECT = RECORD   (* mourt *)
            row:       USHORT ;
            col:       USHORT ;
            cRow:      USHORT ;
            cCol:      USHORT ;
      END;
      TYPE  PNOPTRRECT = POINTER TO NOPTRRECT;

      PROCEDURE [APIENTRY16]  MOU16REMOVEPTR (   pmourtRect:    PNOPTRRECT ;
                                                                            hmou:          HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16DRAWPTR ( hmou:     HMOU): APIRET16;

      CONST MOU_NODRAW                 = 00001H;
      CONST MOU_DRAW                   = 00000H;
      CONST MOU_MICKEYS                = 00002H;
      CONST MOU_PELS                   = 00000H;

      PROCEDURE [APIENTRY16]  MOU16SETDEVSTATUS (   pfsDevStatus:  PUSHORT ;
                                                                                  hmou:          HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16INITREAL (psz: PSZ): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16SYNCH (pszDvrName:   USHORT): APIRET16;

      TYPE THRESHOLD = RECORD       (* threshold *)
            Length:   USHORT;   (* Length Field            *)
            Level1:   USHORT;   (* First movement level    *)
            Lev1Mult: USHORT;   (* First level multiplier  *)
            Level2:   USHORT;   (* Second movement level   *)
            lev2Mult: USHORT;   (* Second level multiplier *)
      END;
      TYPE  PTHRESHOLD = POINTER TO THRESHOLD;

      PROCEDURE [APIENTRY16]  MOU16GETTHRESHOLD ( pthreshold:  PTHRESHOLD ;
                                                                                hmou:        HMOU): APIRET16;

      PROCEDURE [APIENTRY16]  MOU16SETTHRESHOLD ( pthreshold:  PTHRESHOLD ;
                                                                                hmou:        HMOU): APIRET16;


      CONST MouClose              =  MOU16CLOSE;
      CONST MouDeRegister         =  MOU16DEREGISTER;
      CONST MouDrawPtr            =  MOU16DRAWPTR;
      CONST MouFlushQue           =  MOU16FLUSHQUE;
      CONST MouGetDevStatus       =  MOU16GETDEVSTATUS;
      CONST MouGetEventMask       =  MOU16GETEVENTMASK;
      CONST MouGetNumButtons      =  MOU16GETNUMBUTTONS;
      CONST MouGetNumMickeys      =  MOU16GETNUMMICKEYS;
      CONST MouGetNumQueEl        =  MOU16GETNUMQUEEL;
      CONST MouGetPtrPos          =  MOU16GETPTRPOS;
      CONST MouGetPtrShape        =  MOU16GETPTRSHAPE;
      CONST MouGetScaleFact       =  MOU16GETSCALEFACT;
      CONST MouGetThreshold       =  MOU16GETTHRESHOLD;
      CONST MouInitReal           =  MOU16INITREAL;
      CONST MouOpen               =  MOU16OPEN;
      CONST MouReadEventQue       =  MOU16READEVENTQUE;
      CONST MouRegister           =  MOU16REGISTER;
      CONST MouRemovePtr          =  MOU16REMOVEPTR;
      CONST MouSetDevStatus       =  MOU16SETDEVSTATUS;
      CONST MouSetEventMask       =  MOU16SETEVENTMASK;
      CONST MouSetPtrPos          =  MOU16SETPTRPOS;
      CONST MouSetPtrShape        =  MOU16SETPTRSHAPE;
      CONST MouSetScaleFact       =  MOU16SETSCALEFACT;
      CONST MouSetThreshold       =  MOU16SETTHRESHOLD;
      CONST MouSynch              =  MOU16SYNCH;

      CONST Mou16Close            =  MOU16CLOSE;
      CONST Mou16DeRegister       =  MOU16DEREGISTER;
      CONST Mou16DrawPtr          =  MOU16DRAWPTR;
      CONST Mou16FlushQue         =  MOU16FLUSHQUE;
      CONST Mou16GetDevStatus     =  MOU16GETDEVSTATUS;
      CONST Mou16GetEventMask     =  MOU16GETEVENTMASK;
      CONST Mou16GetNumButtons    =  MOU16GETNUMBUTTONS;
      CONST Mou16GetNumMickeys    =  MOU16GETNUMMICKEYS;
      CONST Mou16GetNumQueEl      =  MOU16GETNUMQUEEL;
      CONST Mou16GetPtrPos        =  MOU16GETPTRPOS;
      CONST Mou16GetPtrShape      =  MOU16GETPTRSHAPE;
      CONST Mou16GetScaleFact     =  MOU16GETSCALEFACT;
      CONST Mou16GetThreshold     =  MOU16GETTHRESHOLD;
      CONST Mou16InitReal         =  MOU16INITREAL;
      CONST Mou16Open             =  MOU16OPEN;
      CONST Mou16ReadEventQue     =  MOU16READEVENTQUE;
      CONST Mou16Register         =  MOU16REGISTER;
      CONST Mou16RemovePtr        =  MOU16REMOVEPTR;
      CONST Mou16SetDevStatus     =  MOU16SETDEVSTATUS;
      CONST Mou16SetEventMask     =  MOU16SETEVENTMASK;
      CONST Mou16SetPtrPos        =  MOU16SETPTRPOS;
      CONST Mou16SetPtrShape      =  MOU16SETPTRSHAPE;
      CONST Mou16SetScaleFact     =  MOU16SETSCALEFACT;
      CONST Mou16SetThreshold     =  MOU16SETTHRESHOLD;
      CONST Mou16Synch            =  MOU16SYNCH;


<* END *>

(**************************** end of file **********************************)
<* END *>

(* ------------- End of file:  .\hm\bsesub.hm ------------- *)
<* END *>

   
(* ------------- Include file: .\hm\bseerr.hm ------------- *)
(*static char *SCCSID = "@(#)bseerr.h	6.8 92/03/24";*)
(****************************** Module Header ******************************\
*
* Module Name: BSEERR.H
*
* This file includes the error codes for Base OS/2 applications.
*
* Copyright (c) 1987  Microsoft Corporation
* Copyright (c) 1987  IBM Corporation
*
* ===========================================================================
*
* The following symbols are used in this file for conditional sections.
*
*   INCL_DOSERRORS -  OS/2 Errors         - only included if symbol defined
*   INCL_ERROR_H   -  Set from error.h  - to be deleted when error.h deleted
*   INCL_ERROR2_H  -  Set from error2.h - to be deleted when error.h deleted
*
* Note that the message id's for the first 1000 error codes (in basemid.h)
* are constructed from the comment on the #define for those error codes.
* See h.mak and basemid.skl for further information.  Note that some message
* id's conflict with error codes, so some error codes are unusable.  In
* other words, if there is a message id defined in a certain location,
* that position may not, in general, be used for an error id.
*
* There are three formats of these special comments:
*       #define ERROR_NO <nnn>  <opencomment> <MSG>%<none> <closecomment>
*       #define ERROR_NO <nnn>  <opencomment> <MSG>%<message_name> <closecomment>
*       <opencomment>           <nnn>%<msg>%<message_name> <closecomment>
* The first version is used when there is an error id, but no message id
* associated with it.  This is the case when the error is an internal error
* and is never seen by the user, or it is incorrect and there really should
* be a message.
*
* The second format is used when there is both an error id and message id.
*
* The third case is used when there is a message id in that position, but no
* error id.  It may also be used when there is more than one message id for
* a particular error id.
*
* Whenever a new error id is defined, the person defining that error MUST
* decide if it is to be a user-seeable error or not.  If it is, a message
* id MUST be declared, and the appropriate message added to oso001.txt.
* This should be coordinated with the IBM Instructional Design people.
* The current contact is Kathleen Hamill.
*
\***************************************************************************)

<* IF DEFINED (INCL_ERRORS)  THEN *>

<* NEW INCL_DOSERRORS + *>
<* NEW INCL_ERROR_H + *>
<* NEW INCL_ERROR2_H + *>

<* END *>

<* IF DEFINED (INCL_DOSERRORS) OR DEFINED (INCL_ERROR_H)  THEN *>

CONST NO_ERROR       = 0;       (* MSG%RESPONSE_DATA *)
CONST ERROR_INVALID_FUNCTION = 1;       (* MSG%INVALID_FUNCTION *)
CONST ERROR_FILE_NOT_FOUND   = 2;       (* MSG%FILE_NOT_FOUND *)
CONST ERROR_PATH_NOT_FOUND   = 3;       (* MSG%PATH_NOT_FOUND *)
CONST ERROR_TOO_MANY_OPEN_FILES = 4;    (* MSG%OUT_OF_HANDLES *)
CONST ERROR_ACCESS_DENIED    = 5;       (* MSG%ACCESS_DENIED *)
CONST ERROR_INVALID_HANDLE   = 6;       (* MSG%INVALID_HANDLE *)
CONST ERROR_ARENA_TRASHED    = 7;       (* MSG%MEMORY_BLOCKS_BAD *)
CONST ERROR_NOT_ENOUGH_MEMORY= 8;       (* MSG%NO_MEMORY *)
CONST ERROR_INVALID_BLOCK    = 9;       (* MSG%INVALID_MEM_ADDR *)
CONST ERROR_BAD_ENVIRONMENT  = 10;      (* MSG%INVALID_ENVIRON *)
CONST ERROR_BAD_FORMAT       = 11;      (* MSG%INVALID_FORMAT *)
CONST ERROR_INVALID_ACCESS   = 12;      (* MSG%INVALID_ACC_CODE *)
CONST ERROR_INVALID_DATA     = 13;      (* MSG%INVALID_DATA *)
CONST ERROR_INVALID_DRIVE    = 15;      (* MSG%INVALID_DRIVE *)
CONST ERROR_CURRENT_DIRECTORY= 16;      (* MSG%ATT_RD_CURDIR *)
CONST ERROR_NOT_SAME_DEVICE  = 17;      (* MSG%NOT_SAME_DEVICE *)
CONST ERROR_NO_MORE_FILES    = 18;      (* MSG%NO_MORE_FILES *)
CONST ERROR_WRITE_PROTECT    = 19;      (* MSG%ATT_WRITE_PROT *)
CONST ERROR_BAD_UNIT = 20;      (* MSG%UNKNOWN_UNIT *)
CONST ERROR_NOT_READY= 21;      (* MSG%DRIVE_NOT_READY *)
CONST ERROR_BAD_COMMAND      = 22;      (* MSG%UNKNOWN_COMMAND *)
CONST ERROR_CRC      = 23;      (* MSG%DATA_ERROR *)
CONST ERROR_BAD_LENGTH       = 24;      (* MSG%BAD_REQ_STRUCTURE *)
CONST ERROR_SEEK     = 25;      (* MSG%SEEK_ERROR *)
CONST ERROR_NOT_DOS_DISK     = 26;      (* MSG%UNKNOWN_MEDIA *)
CONST ERROR_SECTOR_NOT_FOUND = 27;      (* MSG%SECTOR_NOT_FOUND *)
CONST ERROR_OUT_OF_PAPER     = 28;      (* MSG%OUT_OF_PAPER *)
CONST ERROR_WRITE_FAULT      = 29;      (* MSG%WRITE_FAULT *)
CONST ERROR_READ_FAULT       = 30;      (* MSG%READ_FAULT *)
CONST ERROR_GEN_FAILURE      = 31;      (* MSG%GENERAL_FAILURE *)
CONST ERROR_SHARING_VIOLATION= 32;      (* MSG%SHARING_VIOLATION *)
(*                                      32%msg%SHAR_VIOLAT_FIND *)
CONST ERROR_LOCK_VIOLATION   = 33;      (* MSG%LOCK_VIOLATION *)
CONST ERROR_WRONG_DISK       = 34;      (* MSG%INVALID_DISK_CHANGE *)
CONST ERROR_FCB_UNAVAILABLE  = 35;      (* MSG%35 *)
CONST ERROR_SHARING_BUFFER_EXCEEDED  = 36;      (* MSG%SHARING_BUFF_OFLOW *)
CONST ERROR_CODE_PAGE_MISMATCHED     = 37;      (* MSG%ERROR_WRITE_PROTECT *)
CONST ERROR_HANDLE_EOF       = 38;      (* MSG%ERROR_BAD_UNIT *)
CONST ERROR_HANDLE_DISK_FULL = 39;      (* MSG%ERROR_NOT_READY *)
(*                                      40%msg%ERROR_BAD_COMMAND *)
(*                                      41%msg%ERROR_CRC *)
(*                                      42%msg%ERROR_BAD_LENGTH *)
(*                                      43%msg%ERROR_SEEK *)
(*                                      44%msg%ERROR_NOT_DOS_DISK *)
(*                                      45%msg%ERROR_SECTOR_NOT_FOUND *)
(*                                      46%msg%ERROR_OUT_OF_PAPER *)
(*                                      47%msg%ERROR_WRITE_FAULT *)
(*                                      48%msg%ERROR_READ_FAULT *)
(*                                      49%msg%ERROR_GEN_FAILURE *)
CONST ERROR_NOT_SUPPORTED    = 50;      (* MSG%NET_REQ_NOT_SUPPORT *)
CONST ERROR_REM_NOT_LIST     = 51;      (* MSG%NET_REMOTE_NOT_ONLINE *)
CONST ERROR_DUP_NAME = 52;      (* MSG%NET_DUP_FILENAME *)
CONST ERROR_BAD_NETPATH      = 53;      (* MSG%NET_PATH_NOT_FOUND *)
CONST ERROR_NETWORK_BUSY     = 54;      (* MSG%NET_BUSY *)
CONST ERROR_DEV_NOT_EXIST    = 55;      (* MSG%NET_DEV_NOT_INSTALLED *)
CONST ERROR_TOO_MANY_CMDS    = 56;      (* MSG%NET_BIOS_LIMIT_REACHED *)
CONST ERROR_ADAP_HDW_ERR     = 57;      (* MSG%NET_ADAPT_HRDW_ERROR *)
CONST ERROR_BAD_NET_RESP     = 58;      (* MSG%NET_INCORRECT_RESPONSE *)
CONST ERROR_UNEXP_NET_ERR    = 59;      (* MSG%NET_UNEXPECT_ERROR *)
CONST ERROR_BAD_REM_ADAP     = 60;      (* MSG%NET_REMOT_ADPT_INCOMP *)
CONST ERROR_PRINTQ_FULL      = 61;      (* MSG%NET_PRINT_Q_FULL *)
CONST ERROR_NO_SPOOL_SPACE   = 62;      (* MSG%NET_NO_SPACE_TO_PRINT_FL *)
CONST ERROR_PRINT_CANCELLED  = 63;      (* MSG%NET_PRINT_FILE_DELETED *)
CONST ERROR_NETNAME_DELETED  = 64;      (* MSG%NET_NAME_DELETED *)
CONST ERROR_NETWORK_ACCESS_DENIED    = 65;      (* MSG%NET_ACCESS_DENIED *)
CONST ERROR_BAD_DEV_TYPE     = 66;      (* MSG%NET_DEV_TYPE_INVALID *)
CONST ERROR_BAD_NET_NAME     = 67;      (* MSG%NET_NAME_NOT_FOUND *)
CONST ERROR_TOO_MANY_NAMES   = 68;      (* MSG%NET_NAME_LIMIT_EXCEED *)
CONST ERROR_TOO_MANY_SESS    = 69;      (* MSG%NET_BIOS_LIMIT_EXCEED *)
CONST ERROR_SHARING_PAUSED   = 70;      (* MSG%NET_TEMP_PAUSED *)
CONST ERROR_REQ_NOT_ACCEP    = 71;      (* MSG%NET_REQUEST_DENIED *)
CONST ERROR_REDIR_PAUSED     = 72;      (* MSG%NET_PRT_DSK_REDIR_PAUSE *)
CONST ERROR_SBCS_ATT_WRITE_PROT = 73;   (* Attempted write on protected disk *)
CONST ERROR_SBCS_GENERAL_FAILURE= 74;   (* General failure *)
CONST ERROR_XGA_OUT_MEMORY   = 75;      (* MSG%XGA_OUT_MEMORY *)
CONST ERROR_FILE_EXISTS      = 80;      (* MSG%FILE_EXISTS *)
CONST ERROR_DUP_FCB  = 81;      (* MSG%none *)
CONST ERROR_CANNOT_MAKE      = 82;      (* MSG%CANNOT_MAKE *)
CONST ERROR_FAIL_I24 = 83;      (* MSG%NET_FAIL_INT_TWO_FOUR *)
CONST ERROR_OUT_OF_STRUCTURES= 84;      (* MSG%NET_TOO_MANY_REDIRECT *)
CONST ERROR_ALREADY_ASSIGNED = 85;      (* MSG%NET_DUP_REDIRECTION *)
CONST ERROR_INVALID_PASSWORD = 86;      (* MSG%NET_INVALID_PASSWORD *)
CONST ERROR_INVALID_PARAMETER= 87;      (* MSG%NET_INCORR_PARAMETER *)
CONST ERROR_NET_WRITE_FAULT  = 88;      (* MSG%NET_DATA_FAULT *)
CONST ERROR_NO_PROC_SLOTS    = 89;      (* MSG%NO_PROC_SLOTS *)
CONST ERROR_NOT_FROZEN       = 90;      (* MSG%none *)
CONST ERROR_SYS_COMP_NOT_LOADED      = ERROR_NOT_FROZEN;
CONST ERR_TSTOVFL    = 91;      (* MSG%none *)
CONST ERR_TSTDUP     = 92;      (* MSG%none *)
CONST ERROR_NO_ITEMS = 93;      (* MSG%none *)
CONST ERROR_INTERRUPT= 95;      (* MSG%none *)
CONST ERROR_DEVICE_IN_USE    = 99;      (* MSG%DEVICE_IN_USE *)
CONST ERROR_TOO_MANY_SEMAPHORES      = 100;     (* MSG%TOO_MANY_SEMAPHORES *)
CONST ERROR_EXCL_SEM_ALREADY_OWNED   = 101;     (* MSG%EXCL_SEM_ALREADY_OWNED *)
CONST ERROR_SEM_IS_SET       = 102;     (* MSG%SEM_IS_SET *)
CONST ERROR_TOO_MANY_SEM_REQUESTS    = 103;     (* MSG%TOO_MANY_SEM_REQUESTS *)
CONST ERROR_INVALID_AT_INTERRUPT_TIME= 104;     (* MSG%INVALID_AT_INTERRUPT_TIME *)
CONST ERROR_SEM_OWNER_DIED   = 105;     (* MSG%SEM_OWNER_DIED *)
CONST ERROR_SEM_USER_LIMIT   = 106;     (* MSG%ERROR_DISK_CHANGE *)
CONST ERROR_DISK_CHANGE      = 107;     (* MSG%DISK_CHANGE *)
CONST ERROR_DRIVE_LOCKED     = 108;     (* MSG%DRIVE_LOCKED *)
CONST ERROR_BROKEN_PIPE      = 109;     (* MSG%BROKEN_PIPE *)
CONST ERROR_OPEN_FAILED      = 110;     (* MSG%ERROR_OPEN_FAILED *)
CONST ERROR_BUFFER_OVERFLOW  = 111;     (* MSG%ERROR_FILENAME_LONG *)
CONST ERROR_DISK_FULL= 112;     (* MSG%DISK_FULL *)
CONST ERROR_NO_MORE_SEARCH_HANDLES   = 113;     (* MSG%NO_SEARCH_HANDLES *)
CONST ERROR_INVALID_TARGET_HANDLE    = 114;     (* MSG%ERR_INV_TAR_HANDLE *)
CONST ERROR_PROTECTION_VIOLATION     = 115;     (* MSG%none *)
CONST ERROR_VIOKBD_REQUEST   = 116;     (* MSG%none *)
CONST ERROR_INVALID_CATEGORY = 117;     (* MSG%INVALID_CATEGORY *)
CONST ERROR_INVALID_VERIFY_SWITCH    = 118;     (* MSG%INVALID_VERIFY_SWITCH *)
CONST ERROR_BAD_DRIVER_LEVEL = 119;     (* MSG%BAD_DRIVER_LEVEL *)
CONST ERROR_CALL_NOT_IMPLEMENTED     = 120;     (* MSG%BAD_DYNALINK *)
CONST ERROR_SEM_TIMEOUT      = 121;     (* MSG%SEM_TIMEOUT *)
CONST ERROR_INSUFFICIENT_BUFFER      = 122;     (* MSG%INSUFFICIENT_BUFFER *)
CONST ERROR_INVALID_NAME     = 123;     (* MSG%INVALID_NAME *)
(*                                      123%msg%HPFS_INVALID_VOLUME_CHAR *)
CONST ERROR_INVALID_LEVEL    = 124;     (* MSG%INVALID_LEVEL *)
CONST ERROR_NO_VOLUME_LABEL  = 125;     (* MSG%NO_VOLUME_LABEL *)
CONST ERROR_MOD_NOT_FOUND    = 126;     (* MSG%MOD_NOT_FOUND *)
CONST ERROR_PROC_NOT_FOUND   = 127;     (* MSG%PROC_NOT_FOUND *)
CONST ERROR_WAIT_NO_CHILDREN = 128;     (* MSG%none *)
CONST ERROR_CHILD_NOT_COMPLETE       = 129;     (* MSG%PROT_MODE_ONLY *)
CONST ERROR_DIRECT_ACCESS_HANDLE     = 130;     (* MSG%APPL_SINGLEFRAMECHAR *)
CONST ERROR_NEGATIVE_SEEK    = 131;     (* MSG%APPL_DOUBLEFRAMECHAR *)
CONST ERROR_SEEK_ON_DEVICE   = 132;     (* MSG%APPL_ARROWCHAR *)
CONST ERROR_IS_JOIN_TARGET   = 133;     (* MSG%JOIN_ON_DRIV_IS_TAR *)
CONST ERROR_IS_JOINED= 134;     (* MSG%JOIN_DRIVE_IS *)
CONST ERROR_IS_SUBSTED       = 135;     (* MSG%SUB_DRIVE_IS *)
CONST ERROR_NOT_JOINED       = 136;     (* MSG%DRIVE_IS_NOT_JOINED *)
CONST ERROR_NOT_SUBSTED      = 137;     (* MSG%DRIVE_NOT_SUBSTED *)
CONST ERROR_JOIN_TO_JOIN     = 138;     (* MSG%JOIN_CANNOT_JOIN_DRIVE *)
CONST ERROR_SUBST_TO_SUBST   = 139;     (* MSG%SUB_CANNOT_SUBST_DRIVE *)
CONST ERROR_JOIN_TO_SUBST    = 140;     (* MSG%JOIN_CANNOT_SUB_DRIVE *)
CONST ERROR_SUBST_TO_JOIN    = 141;     (* MSG%SUB_CANNOT_JOIN_DRIVE *)
CONST ERROR_BUSY_DRIVE       = 142;     (* MSG%DRIVE_IS_BUSY *)
CONST ERROR_SAME_DRIVE       = 143;     (* MSG%JOIN_SUB_SAME_DRIVE *)
CONST ERROR_DIR_NOT_ROOT     = 144;     (* MSG%DIRECT_IS_NOT_SUBDIR *)
CONST ERROR_DIR_NOT_EMPTY    = 145;     (* MSG%DIRECT_IS_NOT_EMPTY *)
CONST ERROR_IS_SUBST_PATH    = 146;     (* MSG%PATH_USED_SUBST_JOIN *)
CONST ERROR_IS_JOIN_PATH     = 147;     (* MSG%NO_NEEDED_RESOURCES *)
CONST ERROR_PATH_BUSY= 148;     (* MSG%PATH_BUSY *)
CONST ERROR_IS_SUBST_TARGET  = 149;     (* MSG%SUB_ON_DRIVE_IS_JOIN *)
CONST ERROR_SYSTEM_TRACE     = 150;     (* MSG%SYSTEM_TRACE *)
CONST ERROR_INVALID_EVENT_COUNT      = 151;     (* MSG%INVALID_EVENT_COUNT *)
CONST ERROR_TOO_MANY_MUXWAITERS      = 152;     (* MSG%TOO_MANY_MUXWAITERS *)
CONST ERROR_INVALID_LIST_FORMAT      = 153;     (* MSG%INVALID_LIST_FORMAT *)
CONST ERROR_LABEL_TOO_LONG   = 154;     (* MSG%VOLUME_TOO_LONG *)
(*                                      154%msg%HPFS_VOL_LABEL_LONG *)
CONST ERROR_TOO_MANY_TCBS    = 155;     (* MSG%TOO_MANY_TCBS *)
CONST ERROR_SIGNAL_REFUSED   = 156;     (* MSG%SIGNAL_REFUSED *)
CONST ERROR_DISCARDED= 157;     (* MSG%DISCARDED *)
CONST ERROR_NOT_LOCKED       = 158;     (* MSG%NOT_LOCKED *)
CONST ERROR_BAD_THREADID_ADDR= 159;     (* MSG%BAD_THREADID_ADDR *)
CONST ERROR_BAD_ARGUMENTS    = 160;     (* MSG%BAD_ARGUMENTS *)
CONST ERROR_BAD_PATHNAME     = 161;     (* MSG%none *)
CONST ERROR_SIGNAL_PENDING   = 162;     (* MSG%SIGNAL_PENDING *)
CONST ERROR_UNCERTAIN_MEDIA  = 163;     (* MSG%none *)
CONST ERROR_MAX_THRDS_REACHED= 164;     (* MSG%MAX_THRDS_REACHED *)
CONST ERROR_MONITORS_NOT_SUPPORTED   = 165;     (* MSG%none *)
CONST ERROR_UNC_DRIVER_NOT_INSTALLED = 166;     (* MSG%UNC_DRIVER_NOT_INSTALLED *)
CONST ERROR_LOCK_FAILED      = 167;     (* MSG%LOCK_FAILED *)
CONST ERROR_SWAPIO_FAILED    = 168;     (* MSG%SWAPIO_FAILED *)
CONST ERROR_SWAPIN_FAILED    = 169;     (* MSG%SWAPIN_ATTEMPT_FAILED *)
CONST ERROR_BUSY             = 170;     (* MSG%SEGMENT_BUSY *)
(*                                      171%msg%INT_TOO_LONG *)
CONST ERROR_CANCEL_VIOLATION    = 173;     (* MSG%UNLOCK_VIOLATION *)
CONST ERROR_ATOMIC_LOCK_NOT_SUPPORTED= 174; (* MSG%none *)
CONST ERROR_READ_LOCKS_NOT_SUPPORTED = 175; (* MSG%none *)
CONST ERROR_INVALID_SEGMENT_NUMBER   = 180;     (* MSG%INVALID_SEGMENT_NUM *)
CONST ERROR_INVALID_CALLGATE = 181;     (* MSG%none *)
CONST ERROR_INVALID_ORDINAL  = 182;     (* MSG%INVALID_ORDINAL *)
CONST ERROR_ALREADY_EXISTS   = 183;     (* MSG%none *)
CONST ERROR_NO_CHILD_PROCESS = 184;     (* MSG%none *)
CONST ERROR_CHILD_ALIVE_NOWAIT       = 185;     (* MSG%none *)
CONST ERROR_INVALID_FLAG_NUMBER      = 186;     (* MSG%INVALID_FLAG_NUMBER *)
CONST ERROR_SEM_NOT_FOUND    = 187;     (* MSG%SEM_NOT_FOUND *)
CONST ERROR_INVALID_STARTING_CODESEG = 188;     (* MSG%INVALID_STARTING_CODESEG *)
CONST ERROR_INVALID_STACKSEG = 189;     (* MSG%INVALID_STACKSEG *)
CONST ERROR_INVALID_MODULETYPE       = 190;     (* MSG%INVALID_MODULETYPE *)
CONST ERROR_INVALID_EXE_SIGNATURE    = 191;     (* MSG%INVALID_EXE_SIGNATURE *)
CONST ERROR_EXE_MARKED_INVALID       = 192;     (* MSG%EXE_MARKED_INVALID *)
CONST ERROR_BAD_EXE_FORMAT   = 193;     (* MSG%BAD_EXE_FORMAT *)
CONST ERROR_ITERATED_DATA_EXCEEDS_64k= 194;     (* MSG%ITERATED_DATA_EXCEEDS_64K *)
CONST ERROR_INVALID_MINALLOCSIZE     = 195;     (* MSG%INVALID_MINALLOCSIZE *)
CONST ERROR_DYNLINK_FROM_INVALID_RING= 196;     (* MSG%DYNLINK_FROM_INVALID_RING *)
CONST ERROR_IOPL_NOT_ENABLED = 197;     (* MSG%IOPL_NOT_ENABLED *)
CONST ERROR_INVALID_SEGDPL   = 198;     (* MSG%INVALID_SEGDPL *)
CONST ERROR_AUTODATASEG_EXCEEDS_64k  = 199;     (* MSG%AUTODATASEG_EXCEEDS_64K *)
CONST ERROR_RING2SEG_MUST_BE_MOVABLE = 200;     (* MSG%CODESEG_CANNOT_BE_64K *)
CONST ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201;     (* MSG%RELOC_CHAIN_XEEDS_SEGMENT *)
CONST ERROR_INFLOOP_IN_RELOC_CHAIN   = 202;     (* MSG%INFLOOP_IN_RELOC_CHAIN *)
CONST ERROR_ENVVAR_NOT_FOUND = 203;     (* MSG%ENVVAR_NOT_FOUND *)
CONST ERROR_NOT_CURRENT_CTRY = 204;     (* MSG%none *)
CONST ERROR_NO_SIGNAL_SENT   = 205;     (* MSG%SIGNAL_NOT_SENT *)
CONST ERROR_FILENAME_EXCED_RANGE     = 206;     (* MSG%NAME_TOO_LONG *)
CONST ERROR_RING2_STACK_IN_USE       = 207;     (* MSG%RING2_STACK_IN_USE *)
CONST ERROR_META_EXPANSION_TOO_LONG  = 208;     (* MSG%WILD_CARD_NAME *)
CONST ERROR_INVALID_SIGNAL_NUMBER    = 209;     (* MSG%INVALID_SIGNAL_NUMBER *)
CONST ERROR_THREAD_1_INACTIVE= 210;     (* MSG%THREAD_1_INACTIVE *)
CONST ERROR_INFO_NOT_AVAIL   = 211;     (* MSG%none *)
CONST ERROR_LOCKED   = 212;     (* MSG%LOCKED *)
CONST ERROR_BAD_DYNALINK     = 213;     (* MSG%none *)
CONST ERROR_TOO_MANY_MODULES = 214;     (* MSG%TOO_MANY_MODULES *)
CONST ERROR_NESTING_NOT_ALLOWED      = 215;     (* MSG%none *)
CONST ERROR_CANNOT_SHRINK    = 216;     (* MSG%CANNOT_SHRINK *)
CONST ERROR_ZOMBIE_PROCESS   = 217;     (* MSG%none *)
CONST ERROR_STACK_IN_HIGH_MEMORY     = 218;     (* MSG%none *)
CONST ERROR_INVALID_EXITROUTINE_RING = 219;     (* MSG%INVALID_EXITROUTINE_RING *)
CONST ERROR_GETBUF_FAILED    = 220;     (* MSG%none *)
CONST ERROR_FLUSHBUF_FAILED  = 221;     (* MSG%none *)
CONST ERROR_TRANSFER_TOO_LONG= 222;     (* MSG%none *)
CONST ERROR_FORCENOSWAP_FAILED       = 223;     (* MSG%none *)
CONST ERROR_SMG_NO_TARGET_WINDOW     = 224;     (* PM ID can't be selected *)
CONST ERROR_NO_CHILDREN      = 228;     (* MSG%NO_CHILDREN *)
CONST ERROR_INVALID_SCREEN_GROUP     = 229;     (* MSG%none *)
CONST ERROR_BAD_PIPE = 230;     (* MSG%ERROR_BAD_PIPE *)
CONST ERROR_PIPE_BUSY= 231;     (* MSG%ERROR_PIPE_BUSY *)
CONST ERROR_NO_DATA  = 232;     (* MSG%ERROR_NO_DATA *)
CONST ERROR_PIPE_NOT_CONNECTED       = 233;     (* MSG%ERROR_PIPE_NOT_CONNECTED *)
CONST ERROR_MORE_DATA= 234;     (* MSG%ERROR_MORE_DATA *)
CONST ERROR_VC_DISCONNECTED  = 240;     (* MSG%ERROR_VC_DISCONNECTED *)
CONST ERROR_CIRCULARITY_REQUESTED    = 250;     (* MSG%CIRCULARITY_REQUESTED *)
CONST ERROR_DIRECTORY_IN_CDS = 251;     (* MSG%DIRECTORY_IN_CDS *)
CONST ERROR_INVALID_FSD_NAME = 252;     (* MSG%INVALID_FSD_NAME *)
CONST ERROR_INVALID_PATH     = 253;     (* MSG%INVALID_PATH *)
CONST ERROR_INVALID_EA_NAME  = 254;     (* MSG%INVALID_EA_NAME *)
CONST ERROR_EA_LIST_INCONSISTENT     = 255;     (* MSG%EA_LIST_INCONSISTENT *)
CONST ERROR_EA_LIST_TOO_LONG = 256;     (* MSG%EA_LIST_TOO_LONG *)
CONST ERROR_NO_META_MATCH    = 257;     (* MSG%NO_META_MATCH *)
CONST ERROR_FINDNOTIFY_TIMEOUT       = 258;     (* MSG%FINDNOTIFY_TIMEOUT *)
CONST ERROR_NO_MORE_ITEMS    = 259;     (* MSG%NO_MORE_ITEMS *)
CONST ERROR_SEARCH_STRUC_REUSED      = 260;     (* MSG%SEARCH_STRUC_REUSED *)
CONST ERROR_CHAR_NOT_FOUND   = 261;     (* MSG%CHAR_NOT_FOUND *)
CONST ERROR_TOO_MUCH_STACK   = 262;     (* MSG%TOO_MUCH_STACK *)
CONST ERROR_INVALID_ATTR     = 263;     (* MSG%INVALID_ATTR *)
CONST ERROR_INVALID_STARTING_RING    = 264;     (* MSG%INVALID_STARTING_RING *)
CONST ERROR_INVALID_DLL_INIT_RING    = 265;     (* MSG%INVALID_DLL_INIT_RING *)
CONST ERROR_CANNOT_COPY      = 266;     (* MSG%CANNOT_COPY *)
CONST ERROR_DIRECTORY= 267;     (* MSG%DIRECTORY *)
CONST ERROR_OPLOCKED_FILE    = 268;     (* MSG%OPLOCKED_FILE *)
CONST ERROR_OPLOCK_THREAD_EXISTS     = 269;     (* MSG%OPLOCK_THREAD_EXISTS *)
CONST ERROR_VOLUME_CHANGED   = 270;     (* MSG%none *)
CONST ERROR_FINDNOTIFY_HANDLE_IN_USE = 271;     (* MSG%none *)
CONST ERROR_FINDNOTIFY_HANDLE_CLOSED = 272;     (* MSG%none *)
CONST ERROR_NOTIFY_OBJECT_REMOVED    = 273;     (* MSG%none *)
CONST ERROR_ALREADY_SHUTDOWN = 274;     (* MSG%none *)
CONST ERROR_EAS_DIDNT_FIT    = 275;     (* MSG%none *)
CONST ERROR_EA_FILE_CORRUPT  = 276;     (* MSG%ERROR_EAS_CORRUPT *)
CONST ERROR_EA_TABLE_FULL    = 277;     (* MSG%EA_TABLE_FULL *)
CONST ERROR_INVALID_EA_HANDLE= 278;     (* MSG%INVALID_EA_HANDLE *)
CONST ERROR_NO_CLUSTER       = 279;     (* MSG%NO_CLUSTER *)
CONST ERROR_CREATE_EA_FILE   = 280;     (* MSG%ERROR_CREATE_EA_FILE *)
CONST ERROR_CANNOT_OPEN_EA_FILE      = 281;     (* MSG%CANNOT_OPEN_FILE *)
CONST ERROR_EAS_NOT_SUPPORTED= 282;     (* MSG%EAS_NOT_SUPPORTED *)
CONST ERROR_NEED_EAS_FOUND   = 283;     (* MSG%NEED_EAS_FOUND *)
CONST ERROR_DUPLICATE_HANDLE = 284;     (* MSG%EAS_DISCARDED *)
CONST ERROR_DUPLICATE_NAME   = 285;     (* MSG%DUPLICATE_SEM_NAME *)
CONST ERROR_EMPTY_MUXWAIT    = 286;     (* MSG%EMPTY_MUXWAIT_SEM *)
CONST ERROR_MUTEX_OWNED      = 287;     (* MSG%MUTEX_SEM_OWNED *)
CONST ERROR_NOT_OWNER        = 288;     (* MSG%NOT_MUTEX_SEM_OWNER *)
CONST ERROR_PARAM_TOO_SMALL  = 289;     (* MSG%QUERY_MUX_PARAM_TOO_SMALL *)
CONST ERROR_TOO_MANY_HANDLES = 290;     (* MSG%TOO_MANY_SEM_HANDLES *)
CONST ERROR_TOO_MANY_OPENS   = 291;     (* MSG%TOO_MANY_SEM_OPENS *)
CONST ERROR_WRONG_TYPE       = 292;     (* MSG%SEM_WRONG_TYPE *)
CONST ERROR_UNUSED_CODE              = 293;     (* MSG%none *)
CONST ERROR_THREAD_NOT_TERMINATED    = 294;     (* MSG%none *)
CONST ERROR_INIT_ROUTINE_FAILED      = 295;     (* MSG%none *)
CONST ERROR_MODULE_IN_USE            = 296;     (* MSG%none *)
CONST ERROR_NOT_ENOUGH_WATCHPOINTS   = 297;     (* MSG%none *)
CONST ERROR_TOO_MANY_POSTS   = 298;     (* MSG%TOO_MANY_EVENT_SEM_POSTS *)
CONST ERROR_ALREADY_POSTED   = 299;     (* MSG%EVENT_SEM_ALREADY_POSTED *)
CONST ERROR_ALREADY_RESET    = 300;     (* MSG%EVENT_SEM_ALREADY_RESET *)
CONST ERROR_SEM_BUSY         = 301;     (* MSG%SEM_BUSY *)

(* end of set 0 - 302 *)

CONST ERROR_USER_DEFINED_BASE        = 0FF00H;

CONST ERROR_I24_WRITE_PROTECT        = 0;
CONST ERROR_I24_BAD_UNIT             = 1;
CONST ERROR_I24_NOT_READY            = 2;
CONST ERROR_I24_BAD_COMMAND          = 3;
CONST ERROR_I24_CRC                  = 4;
CONST ERROR_I24_BAD_LENGTH           = 5;
CONST ERROR_I24_SEEK                 = 6;
CONST ERROR_I24_NOT_DOS_DISK         = 7;
CONST ERROR_I24_SECTOR_NOT_FOUND     = 8;
CONST ERROR_I24_OUT_OF_PAPER         = 9;
CONST ERROR_I24_WRITE_FAULT          = 10;
CONST ERROR_I24_READ_FAULT           = 11;
CONST ERROR_I24_GEN_FAILURE          = 12;
CONST ERROR_I24_DISK_CHANGE          = 13;
CONST ERROR_I24_WRONG_DISK           = 15;
CONST ERROR_I24_UNCERTAIN_MEDIA      = 16;
CONST ERROR_I24_CHAR_CALL_INTERRUPTED= 17;
CONST ERROR_I24_NO_MONITOR_SUPPORT   = 18;
CONST ERROR_I24_INVALID_PARAMETER    = 19;
CONST ERROR_I24_DEVICE_IN_USE        = 20;
CONST ERROR_I24_QUIET_INIT_FAIL      = 21;

CONST ALLOWED_FAIL                   = 0001H;
CONST ALLOWED_ABORT                  = 0002H;
CONST ALLOWED_RETRY                  = 0004H;
CONST ALLOWED_IGNORE                 = 0008H;
CONST ALLOWED_ACKNOWLEDGE            = 0010H;
CONST ALLOWED_DISPATCH               = 8000H;
CONST ALLOWED_REGDUMP                = 0020H;
CONST ALLOWED_DETACHED               = ALLOWED_DISPATCH;
CONST ALLOWED_RESERVED = 0-1-(ALLOWED_FAIL+ALLOWED_ABORT+ALLOWED_RETRY+ALLOWED_IGNORE+ALLOWED_ACKNOWLEDGE);
CONST I24_OPERATION                  = 01H;
CONST I24_AREA                       = 06H;
CONST I24_CLASS                      = 80H;

(* Values for error CLASS *)
CONST ERRCLASS_OUTRES                = 1;   (* Out of Resource                *)
CONST ERRCLASS_TEMPSIT               = 2;   (* Temporary Situation            *)
CONST ERRCLASS_AUTH                  = 3;   (* Permission problem             *)
CONST ERRCLASS_INTRN                 = 4;   (* Internal System Error          *)
CONST ERRCLASS_HRDFAIL               = 5;   (* Hardware Failure               *)
CONST ERRCLASS_SYSFAIL               = 6;   (* System Failure                 *)
CONST ERRCLASS_APPERR                = 7;   (* Application Error              *)
CONST ERRCLASS_NOTFND                = 8;   (* Not Found                      *)
CONST ERRCLASS_BADFMT                = 9;   (* Bad Format                     *)
CONST ERRCLASS_LOCKED                = 10;  (* Locked                         *)
CONST ERRCLASS_MEDIA                 = 11;  (* Media Failure                  *)
CONST ERRCLASS_ALREADY               = 12;  (* Collision with Existing Item   *)
CONST ERRCLASS_UNK                   = 13;  (* Unknown/other                  *)
CONST ERRCLASS_CANT                  = 14;
CONST ERRCLASS_TIME                  = 15;

(* Values for error ACTION *)
CONST ERRACT_RETRY                   = 1;   (* Retry                          *)
CONST ERRACT_DLYRET                  = 2;   (* Delay Retry, retry after pause *)
CONST ERRACT_USER                    = 3;   (* Ask user to regive information *)
CONST ERRACT_ABORT                   = 4;   (* abort with clean up            *)
CONST ERRACT_PANIC                   = 5;   (* abort immediately              *)
CONST ERRACT_IGNORE                  = 6;   (* ignore                         *)
CONST ERRACT_INTRET                  = 7;   (* Retry after User Intervention  *)

(* Values for error LOCUS *)
CONST ERRLOC_UNK                     = 1;   (* No appropriate value           *)
CONST ERRLOC_DISK                    = 2;   (* Random Access Mass Storage     *)
CONST ERRLOC_NET                     = 3;   (* Network                        *)
CONST ERRLOC_SERDEV                  = 4;   (* Serial Device                  *)
CONST ERRLOC_MEM                     = 5;   (* Memory                         *)

(* Abnormal termination codes *)
CONST TC_NORMAL                      = 0;
CONST TC_HARDERR                     = 1;
CONST TC_GP_TRAP                     = 2;
CONST TC_SIGNAL                      = 3;
CONST TC_XCPT                        = 4;

<* END *>

<* IF DEFINED (INCL_DOSERRORS) OR DEFINED (INCL_ERROR2_H)  THEN *>

CONST ERROR_INVALID_PROCID   = 303;     (* MSG%none *)
CONST ERROR_INVALID_PDELTA   = 304;     (* MSG%none *)
CONST ERROR_NOT_DESCENDANT   = 305;     (* MSG%none *)
CONST ERROR_NOT_SESSION_MANAGER      = 306;     (* MSG%none *)
CONST ERROR_INVALID_PCLASS   = 307;     (* MSG%none *)
CONST ERROR_INVALID_SCOPE    = 308;     (* MSG%none *)
CONST ERROR_INVALID_THREADID = 309;     (* MSG%none *)
CONST ERROR_DOSSUB_SHRINK    = 310;     (* MSG%none *)
CONST ERROR_DOSSUB_NOMEM     = 311;     (* MSG%none *)
CONST ERROR_DOSSUB_OVERLAP   = 312;     (* MSG%none *)
CONST ERROR_DOSSUB_BADSIZE   = 313;     (* MSG%none *)
CONST ERROR_DOSSUB_BADFLAG   = 314;     (* MSG%none *)
CONST ERROR_DOSSUB_BADSELECTOR       = 315;     (* MSG%none *)
CONST ERROR_MR_MSG_TOO_LONG  = 316;     (* MSG%MR_MSG_TOO_LONG *)
CONST MGS_MR_MSG_TOO_LONG    = 316;
CONST ERROR_MR_MID_NOT_FOUND = 317;     (* MSG%MR_CANT_FORMAT *)
CONST ERROR_MR_UN_ACC_MSGF   = 318;     (* MSG%MR_NOT_FOUND *)
CONST ERROR_MR_INV_MSGF_FORMAT       = 319;     (* MSG%MR_READ_ERROR *)
CONST ERROR_MR_INV_IVCOUNT   = 320;     (* MSG%MR_IVCOUNT_ERROR *)
CONST ERROR_MR_UN_PERFORM    = 321;     (* MSG%MR_UN_PERFORM *)
CONST ERROR_TS_WAKEUP= 322;     (* MSG%none *)
CONST ERROR_TS_SEMHANDLE     = 323;     (* MSG%none *)
CONST ERROR_TS_NOTIMER       = 324;     (* MSG%none *)
CONST ERROR_TS_HANDLE= 326;     (* MSG%none *)
CONST ERROR_TS_DATETIME      = 327;     (* MSG%none *)
CONST ERROR_SYS_INTERNAL     = 328;     (* MSG%none *)
CONST ERROR_QUE_CURRENT_NAME = 329;     (* MSG%none *)
CONST ERROR_QUE_PROC_NOT_OWNED       = 330;     (* MSG%QUE_PROC_NOT_OWNED *)
CONST ERROR_QUE_PROC_OWNED   = 331;     (* MSG%none *)
CONST ERROR_QUE_DUPLICATE    = 332;     (* MSG%QUE_DUPLICATE *)
CONST ERROR_QUE_ELEMENT_NOT_EXIST    = 333;     (* MSG%QUE_ELEMENT_NOT_EXIST *)
CONST ERROR_QUE_NO_MEMORY    = 334;     (* MSG%QUE_NO_MEMORY *)
CONST ERROR_QUE_INVALID_NAME = 335;     (* MSG%none *)
CONST ERROR_QUE_INVALID_PRIORITY     = 336;     (* MSG%none *)
CONST ERROR_QUE_INVALID_HANDLE       = 337;     (* MSG%none *)
CONST ERROR_QUE_LINK_NOT_FOUND       = 338;     (* MSG%none *)
CONST ERROR_QUE_MEMORY_ERROR = 339;     (* MSG%none *)
CONST ERROR_QUE_PREV_AT_END  = 340;     (* MSG%none *)
CONST ERROR_QUE_PROC_NO_ACCESS       = 341;     (* MSG%none *)
CONST ERROR_QUE_EMPTY= 342;     (* MSG%none *)
CONST ERROR_QUE_NAME_NOT_EXIST       = 343;     (* MSG%none *)
CONST ERROR_QUE_NOT_INITIALIZED      = 344;     (* MSG%none *)
CONST ERROR_QUE_UNABLE_TO_ACCESS     = 345;     (* MSG%none *)
CONST ERROR_QUE_UNABLE_TO_ADD= 346;     (* MSG%none *)
CONST ERROR_QUE_UNABLE_TO_INIT       = 347;     (* MSG%none *)
CONST ERROR_VIO_INVALID_MASK = 349;     (* MSG%VIO_INVALID_MASK *)
CONST ERROR_VIO_PTR  = 350;     (* MSG%VIO_PTR *)
CONST ERROR_VIO_APTR = 351;     (* MSG%none *)
CONST ERROR_VIO_RPTR = 352;     (* MSG%none *)
CONST ERROR_VIO_CPTR = 353;     (* MSG%none *)
CONST ERROR_VIO_LPTR = 354;     (* MSG%none *)
CONST ERROR_VIO_MODE = 355;     (* MSG%DIS_ERROR *)
CONST ERROR_VIO_WIDTH= 356;     (* MSG%VIO_WIDTH *)
CONST ERROR_VIO_ATTR = 357;     (* MSG%none *)
CONST ERROR_VIO_ROW  = 358;     (* MSG%VIO_ROW *)
CONST ERROR_VIO_COL  = 359;     (* MSG%VIO_COL *)
CONST ERROR_VIO_TOPROW       = 360;     (* MSG%none *)
CONST ERROR_VIO_BOTROW       = 361;     (* MSG%none *)
CONST ERROR_VIO_RIGHTCOL     = 362;     (* MSG%none *)
CONST ERROR_VIO_LEFTCOL      = 363;     (* MSG%none *)
CONST ERROR_SCS_CALL = 364;     (* MSG%none *)
CONST ERROR_SCS_VALUE= 365;     (* MSG%none *)
CONST ERROR_VIO_WAIT_FLAG    = 366;     (* MSG%VIO_WAIT_FLAG *)
CONST ERROR_VIO_UNLOCK       = 367;     (* MSG%VIO_UNLOCK *)
CONST ERROR_SGS_NOT_SESSION_MGR      = 368;     (* MSG%none *)
CONST ERROR_SMG_INVALID_SGID = 369;     (* MSG%SMG_INVALID_SESSION_ID *)
CONST ERROR_SMG_INVALID_SESSION_ID   = ERROR_SMG_INVALID_SGID;
CONST ERROR_SMG_NOSG = 370;     (* MSG%none *)
CONST ERROR_SMG_NO_SESSIONS  = 370;     (* MSG%none *)
CONST ERROR_SMG_GRP_NOT_FOUND= 371;     (* MSG%SMG_GRP_NOT_FOUND *)
CONST ERROR_SMG_SESSION_NOT_FOUND    = ERROR_SMG_GRP_NOT_FOUND;
(*                                      371%msg%SMG_SESSION_NOT_FOUND *)
CONST ERROR_SMG_SET_TITLE    = 372;     (* MSG%SMG_SET_TITLE *)
CONST ERROR_KBD_PARAMETER    = 373;     (* MSG%KBD_PARAMETER *)
CONST ERROR_KBD_NO_DEVICE    = 374;     (* MSG%none *)
CONST ERROR_KBD_INVALID_IOWAIT       = 375;     (* MSG%KBD_INVALID_IOWAIT *)
CONST ERROR_KBD_INVALID_LENGTH       = 376;     (* MSG%KBD_INVALID_LENGTH *)
CONST ERROR_KBD_INVALID_ECHO_MASK    = 377;     (* MSG%KBD_INVALID_ECHO_MASK *)
(*                                      377%msg%KBD_INVALID_INPUT_MASK *)
CONST ERROR_KBD_INVALID_INPUT_MASK   = 378;     (* MSG%none *)
CONST ERROR_MON_INVALID_PARMS= 379;     (* MSG%MON_INVALID_PARMS *)
CONST ERROR_MON_INVALID_DEVNAME      = 380;     (* MSG%MON_INVALID_DEVNAME *)
CONST ERROR_MON_INVALID_HANDLE       = 381;     (* MSG%MON_INVALID_HANDLE *)
CONST ERROR_MON_BUFFER_TOO_SMALL     = 382;     (* MSG%MON_BUFFER_TOO_SMALL *)
CONST ERROR_MON_BUFFER_EMPTY = 383;     (* MSG%MON_BUFFER_EMPTY *)
CONST ERROR_MON_DATA_TOO_LARGE       = 384;     (* MSG%MON_DATA_TOO_LARGE *)
CONST ERROR_MOUSE_NO_DEVICE  = 385;     (* MSG%MOUSE_NO_DEVICE *)
CONST ERROR_MOUSE_INV_HANDLE = 386;     (* MSG%MOUSE_INV_HANDLE *)
CONST ERROR_MOUSE_INV_PARMS  = 387;     (* MSG%MOUSE_CALLER_NOT_SYBSYS *)
CONST ERROR_MOUSE_CANT_RESET = 388;     (* MSG%none *)
CONST ERROR_MOUSE_DISPLAY_PARMS      = 389;     (* MSG%none *)
CONST ERROR_MOUSE_INV_MODULE = 390;     (* MSG%none *)
CONST ERROR_MOUSE_INV_ENTRY_PT       = 391;     (* MSG%none *)
CONST ERROR_MOUSE_INV_MASK   = 392;     (* MSG%none *)
CONST NO_ERROR_MOUSE_NO_DATA = 393;     (* MSG%none *)
CONST NO_ERROR_MOUSE_PTR_DRAWN       = 394;     (* MSG%none *)
CONST ERROR_INVALID_FREQUENCY= 395;     (* MSG%none *)
CONST ERROR_NLS_NO_COUNTRY_FILE      = 396;     (* MSG%NLS_NO_COUNTRY_FILE *)
(*                                      396%msg%NO_COUNTRY_SYS *)
CONST ERROR_NLS_OPEN_FAILED  = 397;     (* MSG%NLS_OPEN_FAILED *)
(*                                      397%msg%OPEN_COUNTRY_SYS *)
CONST ERROR_NLS_NO_CTRY_CODE = 398;     (* MSG%NLS_NO_CTRY_CODE *)
CONST ERROR_NO_COUNTRY_OR_CODEPAGE   = 398;     (* MSG%NO_COUNTRY_OR_CODEPAGE *)
CONST ERROR_NLS_TABLE_TRUNCATED      = 399;     (* MSG%NLS_TABLE_TRUNCATED *)
CONST ERROR_NLS_BAD_TYPE     = 400;     (* MSG%NLS_BAD_TYPE *)
CONST ERROR_NLS_TYPE_NOT_FOUND       = 401;     (* MSG%NLS_TYPE_NOT_FOUND *)
(*                                      401%msg%COUNTRY_NO_TYPE *)
CONST ERROR_VIO_SMG_ONLY     = 402;     (* MSG%SWAPIN_FAILED *)
CONST ERROR_VIO_INVALID_ASCIIZ       = 403;     (* MSG%SEGVALIDATE_FAILURE *)
CONST ERROR_VIO_DEREGISTER   = 404;     (* MSG%VIO_DEREGISTER *)
CONST ERROR_VIO_NO_POPUP     = 405;     (* MSG%VIO_NO_POPUP *)
CONST ERROR_VIO_EXISTING_POPUP       = 406;     (* MSG%VIO_EXISTING_POPUP *)
CONST ERROR_KBD_SMG_ONLY     = 407;     (* MSG%KBD_SMG_ONLY *)
CONST ERROR_KBD_INVALID_ASCIIZ       = 408;     (* MSG%KBD_INVALID_ASCIIZ *)
CONST ERROR_KBD_INVALID_MASK = 409;     (* MSG%KBD_INVALID_MASK *)
CONST ERROR_KBD_REGISTER     = 410;     (* MSG%KBD_REGISTER *)
CONST ERROR_KBD_DEREGISTER   = 411;     (* MSG%KBD_DEREGISTER *)
CONST ERROR_MOUSE_SMG_ONLY   = 412;     (* MSG%MOUSE_SMG_ONLY *)
CONST ERROR_MOUSE_INVALID_ASCIIZ     = 413;     (* MSG%MOUSE_INVALID_ASCIIZ *)
CONST ERROR_MOUSE_INVALID_MASK       = 414;     (* MSG%MOUSE_INVALID_MASK *)
CONST ERROR_MOUSE_REGISTER   = 415;     (* MSG%MOUSE_REGISTER *)
CONST ERROR_MOUSE_DEREGISTER = 416;     (* MSG%MOUSE_DEREGISTER *)
CONST ERROR_SMG_BAD_ACTION   = 417;     (* MSG%SMG_BAD_ACTION *)
CONST ERROR_SMG_INVALID_CALL = 418;     (* MSG%SMG_INVALID_CALL *)
CONST ERROR_SCS_SG_NOTFOUND  = 419;     (* MSG%none *)
CONST ERROR_SCS_NOT_SHELL    = 420;     (* MSG%none *)
CONST ERROR_VIO_INVALID_PARMS= 421;     (* MSG%VIO_INVALID_PARMS *)
CONST ERROR_VIO_FUNCTION_OWNED       = 422;     (* MSG%VIO_FUNCTION_OWNED *)
CONST ERROR_VIO_RETURN       = 423;     (* MSG%none *)
CONST ERROR_SCS_INVALID_FUNCTION     = 424;     (* MSG%none *)
CONST ERROR_SCS_NOT_SESSION_MGR      = 425;     (* MSG%none *)
CONST ERROR_VIO_REGISTER     = 426;     (* MSG%VIO_REGISTER *)
CONST ERROR_VIO_NO_MODE_THREAD       = 427;     (* MSG%none *)
CONST ERROR_VIO_NO_SAVE_RESTORE_THD  = 428;     (* MSG%VIO_NO_SAVE_RESTORE_THD *)
CONST ERROR_VIO_IN_BG= 429;     (* MSG%VIO_IN_BG *)
CONST ERROR_VIO_ILLEGAL_DURING_POPUP = 430;     (* MSG%VIO_ILLEGAL_DURING_POPUP *)
CONST ERROR_SMG_NOT_BASESHELL= 431;     (* MSG%SMG_NOT_BASESHELL *)
CONST ERROR_SMG_BAD_STATUSREQ= 432;     (* MSG%SMG_BAD_STATUSREQ *)
CONST ERROR_QUE_INVALID_WAIT = 433;     (* MSG%none *)
CONST ERROR_VIO_LOCK = 434;     (* MSG%VIO_LOCK *)
CONST ERROR_MOUSE_INVALID_IOWAIT     = 435;     (* MSG%MOUSE_INVALID_IOWAIT *)
CONST ERROR_VIO_INVALID_HANDLE       = 436;     (* MSG%VIO_INVALID_HANDLE *)
CONST ERROR_VIO_ILLEGAL_DURING_LOCK  = 437;     (* MSG%none *)
CONST ERROR_VIO_INVALID_LENGTH       = 438;     (* MSG%VIO_INVALID_LENGTH *)
CONST ERROR_KBD_INVALID_HANDLE       = 439;     (* MSG%KBD_INVALID_HANDLE *)
CONST ERROR_KBD_NO_MORE_HANDLE       = 440;     (* MSG%KBD_NO_MORE_HANDLE *)
CONST ERROR_KBD_CANNOT_CREATE_KCB    = 441;     (* MSG%KBD_CANNOT_CREATE_KCB *)
CONST ERROR_KBD_CODEPAGE_LOAD_INCOMPL= 442;     (* MSG%KBD_CODEPAGE_LOAD_INCOMPL *)
CONST ERROR_KBD_INVALID_CODEPAGE_ID  = 443;     (* MSG%KBD_INVALID_CODEPAGE_ID *)
CONST ERROR_KBD_NO_CODEPAGE_SUPPORT  = 444;     (* MSG%KBD_NO_CODEPAGE_SUPPORT *)
CONST ERROR_KBD_FOCUS_REQUIRED       = 445;     (* MSG%KBD_FOCUS_REQUIRED *)
CONST ERROR_KBD_FOCUS_ALREADY_ACTIVE = 446;     (* MSG%KBD_FOCUS_ALREADY_ACTIVE *)
CONST ERROR_KBD_KEYBOARD_BUSY= 447;     (* MSG%KBD_KEYBOARD_BUSY *)
CONST ERROR_KBD_INVALID_CODEPAGE     = 448;     (* MSG%KBD_INVALID_CODEPAGE *)
CONST ERROR_KBD_UNABLE_TO_FOCUS      = 449;     (* MSG%KBD_UNABLE_TO_FOCUS *)
CONST ERROR_SMG_SESSION_NON_SELECT   = 450;     (* MSG%SMG_SESSION_NON_SELECT *)
CONST ERROR_SMG_SESSION_NOT_FOREGRND = 451;     (* MSG%SMG_SESSION_NOT_FOREGRND *)
CONST ERROR_SMG_SESSION_NOT_PARENT   = 452;     (* MSG%SMG_SESSION_NOT_PARENT *)
CONST ERROR_SMG_INVALID_START_MODE   = 453;     (* MSG%SMG_INVALID_START_MODE *)
CONST ERROR_SMG_INVALID_RELATED_OPT  = 454;     (* MSG%SMG_INVALID_RELATED_OPT *)
CONST ERROR_SMG_INVALID_BOND_OPTION  = 455;     (* MSG%SMG_INVALID_BOND_OPTION *)
CONST ERROR_SMG_INVALID_SELECT_OPT   = 456;     (* MSG%SMG_INVALID_SELECT_OPT *)
CONST ERROR_SMG_START_IN_BACKGROUND  = 457;     (* MSG%SMG_START_IN_BACKGROUND *)
CONST ERROR_SMG_INVALID_STOP_OPTION  = 458;     (* MSG%SMG_INVALID_STOP_OPTION *)
CONST ERROR_SMG_BAD_RESERVE  = 459;     (* MSG%SMG_BAD_RESERVE *)
CONST ERROR_SMG_PROCESS_NOT_PARENT   = 460;     (* MSG%SMG_PROCESS_NOT_PARENT *)
CONST ERROR_SMG_INVALID_DATA_LENGTH  = 461;     (* MSG%SMG_INVALID_DATA_LENGTH *)
CONST ERROR_SMG_NOT_BOUND    = 462;     (* MSG%SMG_NOT_BOUND *)
CONST ERROR_SMG_RETRY_SUB_ALLOC      = 463;     (* MSG%SMG_RETRY_SUB_ALLOC *)
CONST ERROR_KBD_DETACHED     = 464;     (* MSG%KBD_DETACHED *)
CONST ERROR_VIO_DETACHED     = 465;     (* MSG%VIO_DETACHED *)
CONST ERROR_MOU_DETACHED     = 466;     (* MSG%MOU_DETACHED *)
CONST ERROR_VIO_FONT = 467;     (* MSG%VIO_FONT *)
CONST ERROR_VIO_USER_FONT    = 468;     (* MSG%VIO_USER_FONT *)
CONST ERROR_VIO_BAD_CP       = 469;     (* MSG%VIO_BAD_CP *)
CONST ERROR_VIO_NO_CP= 470;     (* MSG%none *)
CONST ERROR_VIO_NA_CP= 471;     (* MSG%VIO_NA_CP *)
CONST ERROR_INVALID_CODE_PAGE= 472;     (* MSG%none *)
CONST ERROR_CPLIST_TOO_SMALL = 473;     (* MSG%none *)
CONST ERROR_CP_NOT_MOVED     = 474;     (* MSG%none *)
CONST ERROR_MODE_SWITCH_INIT = 475;     (* MSG%none *)
CONST ERROR_CODE_PAGE_NOT_FOUND      = 476;     (* MSG%none *)
CONST ERROR_UNEXPECTED_SLOT_RETURNED = 477;     (* MSG%none *)
CONST ERROR_SMG_INVALID_TRACE_OPTION = 478;     (* MSG%SMG_INVALID_TRACE_OPTION *)
CONST ERROR_VIO_INTERNAL_RESOURCE    = 479;     (* MSG%none *)
CONST ERROR_VIO_SHELL_INIT   = 480;     (* MSG%VIO_SHELL_INIT *)
CONST ERROR_SMG_NO_HARD_ERRORS       = 481;     (* MSG%SMG_NO_HARD_ERRORS *)
CONST ERROR_CP_SWITCH_INCOMPLETE     = 482;     (* MSG%none *)
CONST ERROR_VIO_TRANSPARENT_POPUP    = 483;     (* MSG%VIO_TRANSPARENT_POPUP *)
CONST ERROR_CRITSEC_OVERFLOW = 484;     (* MSG%none *)
CONST ERROR_CRITSEC_UNDERFLOW= 485;     (* MSG%none *)
CONST ERROR_VIO_BAD_RESERVE  = 486;     (* MSG%VIO_BAD_RESERVE *)
CONST ERROR_INVALID_ADDRESS  = 487;     (* MSG%INVALID_ADDRESS *)
CONST ERROR_ZERO_SELECTORS_REQUESTED = 488;     (* MSG%ZERO_SELECTORS_REQUESTED *)
CONST ERROR_NOT_ENOUGH_SELECTORS_AVA = 489;     (* MSG%NOT_ENOUGH_SELECTORS_AVA *)
CONST ERROR_INVALID_SELECTOR = 490;     (* MSG%INVALID_SELECTOR *)
CONST ERROR_SMG_INVALID_PROGRAM_TYPE = 491;     (* MSG%SMG_INVALID_PROGRAM_TYPE *)
CONST ERROR_SMG_INVALID_PGM_CONTROL  = 492;     (* MSG%SMG_INVALID_PGM_CONTROL *)
CONST ERROR_SMG_INVALID_INHERIT_OPT  = 493;     (* MSG%SMG_INVALID_INHERIT_OPT *)
CONST ERROR_VIO_EXTENDED_SG  = 494;     (* MSG%VIO_EXTENDED_SG *)
CONST ERROR_VIO_NOT_PRES_MGR_SG      = 495;     (* MSG%VIO_NOT_PRES_MGR_SG *)
CONST ERROR_VIO_SHIELD_OWNED = 496;     (* MSG%VIO_SHIELD_OWNED *)
CONST ERROR_VIO_NO_MORE_HANDLES      = 497;     (* MSG%VIO_NO_MORE_HANDLES *)
CONST ERROR_VIO_SEE_ERROR_LOG= 498;     (* MSG%none *)
CONST ERROR_VIO_ASSOCIATED_DC= 499;     (* MSG%none *)
CONST ERROR_KBD_NO_CONSOLE   = 500;     (* MSG%KBD_NO_CONSOLE *)
CONST ERROR_MOUSE_NO_CONSOLE = 501;     (* MSG%DOS_STOPPED *)
CONST ERROR_MOUSE_INVALID_HANDLE     = 502;     (* MSG%MOUSE_INVALID_HANDLE *)
CONST ERROR_SMG_INVALID_DEBUG_PARMS  = 503;     (* MSG%SMG_INVALID_DEBUG_PARMS *)
CONST ERROR_KBD_EXTENDED_SG  = 504;     (* MSG%KBD_EXTENDED_SG *)
CONST ERROR_MOU_EXTENDED_SG  = 505;     (* MSG%MOU_EXTENDED_SG *)
CONST ERROR_SMG_INVALID_ICON_FILE    = 506;     (* MSG%none *)
CONST ERROR_TRC_PID_NON_EXISTENT     = 507;     (* MSG%TRC_PID_NON_EXISTENT *)
CONST ERROR_TRC_COUNT_ACTIVE = 508;     (* MSG%TRC_COUNT_ACTIVE *)
CONST ERROR_TRC_SUSPENDED_BY_COUNT   = 509;     (* MSG%TRC_SUSPENDED_BY_COUNT *)
CONST ERROR_TRC_COUNT_INACTIVE       = 510;     (* MSG%TRC_COUNT_INACTIVE *)
CONST ERROR_TRC_COUNT_REACHED= 511;     (* MSG%TRC_COUNT_REACHED *)
CONST ERROR_NO_MC_TRACE      = 512;     (* MSG%NO_MC_TRACE *)
CONST ERROR_MC_TRACE = 513;     (* MSG%MC_TRACE *)
CONST ERROR_TRC_COUNT_ZERO   = 514;     (* MSG%TRC_COUNT_ZERO *)
CONST ERROR_SMG_TOO_MANY_DDS = 515;     (* MSG%SMG_TOO_MANY_DDS *)
CONST ERROR_SMG_INVALID_NOTIFICATION = 516;     (* MSG%SMG_INVALID_NOTIFICATION *)
CONST ERROR_LF_INVALID_FUNCTION      = 517;     (* MSG%LF_INVALID_FUNCTION *)
CONST ERROR_LF_NOT_AVAIL     = 518;     (* MSG%LF_NOT_AVAIL *)
CONST ERROR_LF_SUSPENDED     = 519;     (* MSG%LF_SUSPENDED *)
CONST ERROR_LF_BUF_TOO_SMALL = 520;     (* MSG%LF_BUF_TOO_SMALL *)
CONST ERROR_LF_BUFFER_CORRUPTED      = 521;     (* MSG%none *)
CONST ERROR_LF_BUFFER_FULL           = 521; (* MSG%LF_BUF_FULL *)
CONST ERROR_LF_INVALID_DAEMON= 522;     (* MSG%none *)
CONST ERROR_LF_INVALID_RECORD        = 522; (* MSG%LF_INVAL_RECORD *)
CONST ERROR_LF_INVALID_TEMPL = 523;     (* MSG%none *)
CONST ERROR_LF_INVALID_SERVICE       = 523; (* MSG%LF_INVAL_SERVICE *)
CONST ERROR_LF_GENERAL_FAILURE       = 524;     (* MSG%LF_GENERAL_FAILURE *)
CONST ERROR_LF_INVALID_ID    = 525;     (* MSG%HPFS_DISK_ALREADY_INUSE *)
CONST ERROR_LF_INVALID_HANDLE= 526;     (* MSG%HPFS_CANNOT_FORMAT_DISK *)
CONST ERROR_LF_NO_ID_AVAIL   = 527;     (* MSG%HPFS_CANNOT_COPY_SYS_DATA *)
CONST ERROR_LF_TEMPLATE_AREA_FULL    = 528;     (* MSG%HPFS_FORMAT_NOT_DONE *)
CONST ERROR_LF_ID_IN_USE     = 529;     (* MSG%HPFS_FMT_NOT_ENOUGH_MEM *)
CONST ERROR_MOU_NOT_INITIALIZED      = 530;     (* MSG%HPFS_SPECIFY_FIXDSK *)
CONST ERROR_MOUINITREAL_DONE = 531;     (* MSG%HPFS_SPECIFY_ONE_DRIVE *)
CONST ERROR_DOSSUB_CORRUPTED = 532;     (* MSG%HPFS_UNKNOWN_ERR_NO_FORMAT *)
CONST ERROR_MOUSE_CALLER_NOT_SUBSYS  = 533;     (* MSG%HPFS_SYNTAX_HELP *)
CONST ERROR_ARITHMETIC_OVERFLOW      = 534;     (* MSG%HPFS_DISK_FORMATING *)
CONST ERROR_TMR_NO_DEVICE    = 535;     (* MSG%HPFS_AVAIL_DISK_SPACE *)
CONST ERROR_TMR_INVALID_TIME = 536;     (* MSG%HPFS_BAD_BLOCKS *)
CONST ERROR_PVW_INVALID_ENTITY       = 537;     (* MSG%HPFS_DISK_SPACE_AVAIL *)
CONST ERROR_PVW_INVALID_ENTITY_TYPE  = 538;     (* MSG%HPFS_SPACE_FORMATTED *)
CONST ERROR_PVW_INVALID_SPEC = 539;     (* MSG%HPFS_TYPE_CUR_VOLUME_LABEL *)
CONST ERROR_PVW_INVALID_RANGE_TYPE   = 540;     (* MSG%HPFS_DRIVER_NOT_LOADED *)
CONST ERROR_PVW_INVALID_COUNTER_BLK  = 541;     (* MSG%HPFS_DRIVER_LOADER *)
CONST ERROR_PVW_INVALID_TEXT_BLK     = 542;     (* MSG%HPFS_CACHE_BUF_SPECIFIED *)
CONST ERROR_PRF_NOT_INITIALIZED      = 543;     (* MSG%HPFS_CHKDSK_PARM_ERROR *)
CONST ERROR_PRF_ALREADY_INITIALIZED  = 544;     (* MSG%HPFS_CHKDSK_NOACCESS_DRIVE *)
CONST ERROR_PRF_NOT_STARTED  = 545;     (* MSG%HPFS_UNKNOWN_ERR_NO_CHKDSK *)
CONST ERROR_PRF_ALREADY_STARTED      = 546;     (* MSG%HPFS_CHKDSK_NOT_ENOUGH_MEM *)
CONST ERROR_PRF_TIMER_OUT_OF_RANGE   = 547;     (* MSG%HPFS_CHKDSK_NOWRITEODATA *)
CONST ERROR_PRF_TIMER_RESET  = 548;     (* MSG%HPFS_CHKDSK_NORECOVER_DATA *)
(*                                      549%msg%HPFS_CHKDSK_NO_PARM_SPACE *)
(*                                      550%msg%HPFS_CHKDSK_NORECOGNIZE *)
(*                                      551%msg%HPFS_CHKDSK_NOROOT_FIND *)
(*                                      552%msg%HPFS_CHKDSK_NOFIX_FS_ERROR *)
(*                                      553%msg%HPFS_CHKDSK_CORRECT_FS_ERR *)
(*                                      554%msg%HPFS_CHKDSK_ORGAN_FIX *)
(*                                      555%msg%HPFS_CHKDSK_RELOC_BBPDATA *)
(*                                      556%msg%HPFS_CHKDSK_REM_CORRU_BLOC *)
(*                                      557%msg%HPFS_CHKDSK_REM_CORRUP_FIL *)
(*                                      558%msg%HPFS_CHKDSK_FIX_SPACE_ALLO *)
(*                                      559%msg%HPFS_NOT_FORMATTED_DISK *)
(*                                      560%msg%HPFS_CHKDSK_COR_ALLOC *)
(*                                      561%msg%HPFS_CHKDSK_SEARC_UNALLOC *)
(*                                      562%msg%HPFS_CHKDSK_DET_LOST_DATA *)
(*                                      563%msg%HPFS_CHKDSK_PERCENT_SEARC *)
(*                                      564%msg%HPFS_CHKDSK_LOST_DATASEARC *)
(*                                      565%msg%HPFS_CHKDSK_CRIT_NOREAD *)
(*                                      566%msg%HPFS_CHKDSK_DISK_INUSE *)
(*                                      567%msg%HPFS_CHKDSK_RECOVTEMP_RELOC *)
(*                                      568%msg%HPFS_TOTAL_DISK_SPACE *)
(*                                      569%msg%HPFS_DIR_KBYTES *)
(*                                      570%msg%HPFS_FILE_KBYTES *)
(*                                      571%msg%HPFS_KBYTES_AVAILABLE *)
(*                                      572%msg%HPFS_CHKDSK_PLACE_REC_FILE *)
(*                                      573%msg%HPFS_CHKDSK_RECO_DIR_AS *)
(*                                      574%msg%HPFS_CHKDSK_PLACEED_DATA *)
(*                                      575%msg%HPFS_CHKDSK_RECOV_EA *)
(*                                      576%msg%HPFS_CHKDSK_FIND_EA_INTEM *)
(*                                      577%msg%HPFS_CHKDSK_RELOC_TEMP_EA *)
(*                                      578%msg%HPFS_CHKDSK_RELOC_AC_LIST *)
(*                                      579%msg%HPFS_CHKDSK_LIST_NORELOC *)
(*                                      580%msg%HPFS_CHKDSK_TRUN_EA_LIST *)
(*                                      581%msg%HPFS_CHKDSK_TRUN_EA_NAME *)
(*                                      582%msg%HPFS_CHKDSK_TRUN_EA_BBLOCK *)
(*                                      583%msg%HPFS_CHKDSK_REM_INVALID_EA *)
(*                                      584%msg%HPFS_CHKDSK_FIX_EA_ALLOC *)
(*                                      585%msg%HPFS_CHKDSK_FIX_ALACCCTRL *)
(*                                      586%msg%HPFS_CHKDSK_ACCTR_LIST_BBL *)
(*                                      587%msg%HPFS_CHKDSK_REM_ACLIST *)
(*                                      588%msg%HPFS_CHKDSK_FOUND_DATANORL *)
(*                                      589%msg%HPFS_WRONG_VERSION *)
(*                                      590%msg%HPFS_CHKDSK_FOUND_DATATEMP *)
(*                                      591%msg%HPFS_CHKDSK_FIX_TEMPSTATUS *)
(*                                      592%msg%HPFS_CHKDSK_FIX_NEEDEADATA *)
(*                                      593%msg%HPFS_RECOVER_PARM_ERROR *)
(*                                      594%msg%HPFS_RECOV_FILE_NOT_FOUND *)
(*                                      595%msg%HPFS_RECOV_UNKNOWN_ERROR *)
(*                                      596%msg%HPFS_RECOV_NOT_ENOUGH_MEM *)
(*                                      597%msg%HPFS_RECOV_NOWRITE_DATA *)
(*                                      598%msg%HPFS_RECOV_NOTEMP_CREATE *)
(*                                      599%msg%HPFS_RECOV_EA_NOREAD *)
(*                                      600%msg%HPFS_RECOV_FILE_BYTES *)
(*                                      601%msg%HPFS_RECOV_BAD_BYTES_RECOV *)
(*                                      602%msg%HPFS_RECOV_FILEBYTES_NOREC *)
(*                                      603%msg%HPFS_RECOV_DISK_INUSE *)
(*                                      604%msg%HPFS_RECOV_FILE_NODELETE *)
(*                                      605%msg%HPFS_RECOV_NOCREATE_NEWFILE *)
(*                                      606%msg%HPFS_RECOV_SYSTEM_ERROR *)
(*                                      607%msg%HPFS_SYS_PARM_ERROR *)
(*                                      608%msg%HPFS_SYS_CANNOT_INSTALL *)
(*                                      609%msg%HPFS_SYS_DRIVE_NOTFORMATED *)
(*                                      610%msg%HPFS_SYS_FILE_NOCREATE *)
(*                                      611%msg%HPFS_SIZE_EXCEED *)
(*                                      612%msg%HPFS_SYNTAX_ERR *)
(*                                      613%msg%HPFS_NOTENOUGH_MEM *)
(*                                      614%msg%HPFS_WANT_MEM *)
(*                                      615%msg%HPFS_GET_RETURNED *)
(*                                      616%msg%HPFS_SET_RETURNED *)
(*                                      617%msg%HPFS_BOTH_RETURNED *)
(*                                      618%msg%HPFS_STOP_RETURNED *)
(*                                      619%msg%HPFS_SETPRTYRETURNED *)
(*                                      620%msg%HPFS_ALCSG_RETURNED *)
(*                                      621%msg%HPFS_MSEC_SET *)
(*                                      622%msg%HPFS_OPTIONS *)
(*                                      623%msg%HPFS_POS_NUM_VALUE *)
(*                                      624%msg%HPFS_VALUE_TOO_LARGE *)
(*                                      625%msg%HPFS_LAZY_NOT_VALID *)
(*                                      626%msg%HPFS_VOLUME_ERROR *)
(*                                      627%msg%HPFS_VOLUME_DIRTY *)
(*                                      628%msg%HPFS_NEW_SECTOR *)
(*                                      629%msg%HPFS_FORMAT_PARM_ERROR *)
(*                                      630%msg%HPFS_CANNOT_ACCESS_CONFIG *)
(*                                      631%msg%HPFS_RECOV_FILE *)
(*                                      632%msg%HPFS_CHKDSK_KBYTES_RESERVE *)
(*                                      633%msg%HPFS_CHKDSK_KBYTES_IN_EA *)
(*                                      634%msg%HPFS_BYTEBUF_SET *)
(*                                      635%msg%HPFS_FORMATTING_COMPLETE *)
(*                                      636%msg%HPFS_WRONG_VOLUME_LABEL *)
(*                                      637%msg%HPFS_FMAT_TOO_MANY_DRS *)
(*                                      638%msg%VDD_UNSUPPORTED_ACCESS *)
CONST ERROR_VDD_LOCK_USEAGE_DENIED   = 639; (* KP.COM not supported in DOS *)
CONST ERROR_TIMEOUT  = 640;     (* MSG%none *)
CONST ERROR_VDM_DOWN = 641;     (* MSG%none *)
CONST ERROR_VDM_LIMIT= 642;     (* MSG%none *)
CONST ERROR_VDD_NOT_FOUND    = 643;     (* MSG%none *)
CONST ERROR_INVALID_CALLER   = 644;     (* MSG%none *)
CONST ERROR_PID_MISMATCH     = 645;     (* MSG%none *)
CONST ERROR_INVALID_VDD_HANDLE       = 646;     (* MSG%none *)
CONST ERROR_VLPT_NO_SPOOLER  = 647;     (* MSG%none *)
CONST ERROR_VCOM_DEVICE_BUSY = 648;     (* MSG%none *)
CONST ERROR_VLPT_DEVICE_BUSY = 649;     (* MSG%none *)
CONST ERROR_NESTING_TOO_DEEP = 650;     (* MSG%none *)
CONST ERROR_VDD_MISSING      = 651;     (* MSG%VDD_MISSING *)

(* INVALID BIDI API PARAMETERS 671 - 684 no msg's required *)

CONST ERROR_BIDI_INVALID_LENGTH      = 671;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_INCREMENT   = 672;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_COMBINATION = 673;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_RESERVED    = 674;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_EFFECT      = 675;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_CSDREC      = 676;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_CSDSTATE    = 677;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_LEVEL       = 678;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_TYPE_SUPPORT= 679;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_ORIENTATION = 680;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_NUM_SHAPE   = 681;    (* MSG%none *)
CONST ERROR_BIDI_INVALID_CSD         = 682;    (* MSG%none *)
CONST ERROR_BIDI_NO_SUPPORT          = 683;    (* MSG%none *)
CONST NO_ERROR_BIDI_RW_INCOMPLETE    = 684;    (* MSG%none *)

(*                                      689%msg%HPFS_LAZY_ON *)
(*                                      690%msg%HPFS_LAZY_OFF *)
CONST ERROR_IMP_INVALID_PARM   = 691;     (* MSG%none *)
CONST ERROR_IMP_INVALID_LENGTH = 692;     (* MSG%none *)
CONST MSG_HPFS_DISK_ERROR_WARN = 693;     (* MSG%HPFS_DISK_ERROR_WARN *)
CONST ERROR_MON_BAD_BUFFER           = 730;     (* MSG%BAD_MON_BUFFER *)

CONST ERROR_MODULE_CORRUPTED = 731;     (* MSG%MODULE_CORRUPTED *)

CONST ERROR_SM_OUTOF_SWAPFILE         = 1477;   (* MSG%SM_OUT_OF_SWAFILE *)

CONST ERROR_LF_TIMEOUT                = 2055;   (* MSG%LF_TIMEOUT *)
CONST ERROR_LF_SUSPEND_SUCCESS        = 2057;   (* MSG%LF_SUSP_SUCCESS *)
CONST ERROR_LF_RESUME_SUCCESS         = 2058;   (* MSG%LF_RESUM_SUCCESS *)
CONST ERROR_LF_REDIRECT_SUCCESS       = 2059;   (* MSG%LF_REDIR_SUCCESS *)
CONST ERROR_LF_REDIRECT_FAILURE       = 2060;   (* MSG%LF_REDIR_FAILURE *)


CONST ERROR_SWAPPER_NOT_ACTIVE       = 32768;
CONST ERROR_INVALID_SWAPID           = 32769;
CONST ERROR_IOERR_SWAP_FILE          = 32770;
CONST ERROR_SWAP_TABLE_FULL          = 32771;
CONST ERROR_SWAP_FILE_FULL           = 32772;
CONST ERROR_CANT_INIT_SWAPPER        = 32773;
CONST ERROR_SWAPPER_ALREADY_INIT     = 32774;
CONST ERROR_PMM_INSUFFICIENT_MEMORY  = 32775;
CONST ERROR_PMM_INVALID_FLAGS        = 32776;
CONST ERROR_PMM_INVALID_ADDRESS      = 32777;
CONST ERROR_PMM_LOCK_FAILED          = 32778;
CONST ERROR_PMM_UNLOCK_FAILED        = 32779;
CONST ERROR_PMM_MOVE_INCOMPLETE      = 32780;
CONST ERROR_UCOM_DRIVE_RENAMED       = 32781;
CONST ERROR_UCOM_FILENAME_TRUNCATED  = 32782;
CONST ERROR_UCOM_BUFFER_LENGTH       = 32783;
CONST ERROR_MON_CHAIN_HANDLE         = 32784;
CONST ERROR_MON_NOT_REGISTERED       = 32785;
CONST ERROR_SMG_ALREADY_TOP          = 32786;
CONST ERROR_PMM_ARENA_MODIFIED       = 32787;
CONST ERROR_SMG_PRINTER_OPEN         = 32788;
CONST ERROR_PMM_SET_FLAGS_FAILED     = 32789;
CONST ERROR_INVALID_DOS_DD           = 32790;
CONST ERROR_BLOCKED                  = 32791;
CONST ERROR_NOBLOCK                  = 32792;
CONST ERROR_INSTANCE_SHARED          = 32793;
CONST ERROR_NO_OBJECT                = 32794;
CONST ERROR_PARTIAL_ATTACH           = 32795;
CONST ERROR_INCACHE                  = 32796;
CONST ERROR_SWAP_IO_PROBLEMS         = 32797;
CONST ERROR_CROSSES_OBJECT_BOUNDARY  = 32798;
CONST ERROR_LONGLOCK                 = 32799;
CONST ERROR_SHORTLOCK                = 32800;
CONST ERROR_UVIRTLOCK                = 32801;
CONST ERROR_ALIASLOCK                = 32802;
CONST ERROR_ALIAS                    = 32803;
CONST ERROR_NO_MORE_HANDLES          = 32804;
CONST ERROR_SCAN_TERMINATED          = 32805;
CONST ERROR_TERMINATOR_NOT_FOUND     = 32806;
CONST ERROR_NOT_DIRECT_CHILD         = 32807;
CONST ERROR_DELAY_FREE               = 32808;
CONST ERROR_GUARDPAGE                = 32809;
CONST ERROR_SWAPERROR                = 32900;
CONST ERROR_LDRERROR                 = 32901;
CONST ERROR_NOMEMORY                 = 32902;
CONST ERROR_NOACCESS                 = 32903;
CONST ERROR_NO_DLL_TERM              = 32904;
CONST ERROR_CPSIO_CODE_PAGE_INVALID  = 65026;
CONST ERROR_CPSIO_NO_SPOOLER         = 65027;
CONST ERROR_CPSIO_FONT_ID_INVALID    = 65028;
CONST ERROR_CPSIO_INTERNAL_ERROR     = 65033;
CONST ERROR_CPSIO_INVALID_PTR_NAME   = 65034;
CONST ERROR_CPSIO_NOT_ACTIVE         = 65037;
CONST ERROR_CPSIO_PID_FULL           = 65039;
CONST ERROR_CPSIO_PID_NOT_FOUND      = 65040;
CONST ERROR_CPSIO_READ_CTL_SEQ       = 65043;
CONST ERROR_CPSIO_READ_FNT_DEF       = 65045;
CONST ERROR_CPSIO_WRITE_ERROR        = 65047;
CONST ERROR_CPSIO_WRITE_FULL_ERROR   = 65048;
CONST ERROR_CPSIO_WRITE_HANDLE_BAD   = 65049;
CONST ERROR_CPSIO_SWIT_LOAD          = 65074;
CONST ERROR_CPSIO_INV_COMMAND        = 65077;
CONST ERROR_CPSIO_NO_FONT_SWIT       = 65078;
CONST ERROR_ENTRY_IS_CALLGATE        = 65079;

<* END *>
(************************** End of file ***************************************)

(* ------------- End of file:  .\hm\bseerr.hm ------------- *)

<* IF DEFINED(INCL_ORDINALS) THEN *>
   
(* ------------- Include file: .\hm\bseord.hm ------------- *)
(*static char *SCCSID = "@(#)bseord.h	6.7 92/03/15";*)
(* bseord.h *)

  (******************************************************************************\
  *                                                                             *
  * Module Name: BSEORD.H                                                       *
  *                                                                             *
  * OS/2 Base MEMory Flags include file                                         *
  *                                                                             *
  * Copyright (c) 1989  - 1992 IBM Corporation                                  *
  *                                                                             *
  *******************************************************************************)

(* ANSICALL *)
CONST ORD_ANSIINJECT= 1;
CONST ORD_ANSIKEYDEF= 2;
CONST ORD_ANSIINTERP= 3;
(* BDCALLS *)
CONST ORD_NLSCONVERTBIDINUMERICS = 1;
CONST ORD_NLSCONVERTBIDISTRING   = 2;
CONST ORD_NLSSETBIDIATT          = 5;
CONST ORD_NLSQUERYBIDIATT        = 6;
CONST ORD_NLSINVERSESTRING       = 7;
CONST ORD_NLSSETBIDIPRINT        = 8;
CONST ORD_NLSEDITSHAPE           = 9;
CONST ORD_NLSSHAPEBIDISTRING     = 10;(* 16:Nls%ShapeBidiString *)
CONST ORD_NLSINTSETBIDIATT       = 3;
CONST ORD_NLSINTQUERYBIDIATT     = 4;
CONST ORD_NLPOPUP               = 11;
(* BKSCALLS *)
CONST ORD_BKSMAIN    = 1;
(* BMSCALLS *)
--CONST ORD_BKSMAIN    = 1;
(* BVSCALLS *)
--CONST ORD_BKSMAIN    = 1;
(* PMDRAG *)
CONST ORD_DRGACCESSDRAGINFO               = 1;
CONST ORD_DRGADDSTRHANDLE                 = 2;
CONST ORD_DRGALLOCDRAGINFO                = 3;
CONST ORD_DRGALLOCDRAGTRANSFER            = 4;
CONST ORD_DRGDELETEDRAGINFOSTRHANDLES     = 5;
CONST ORD_DRGDELETESTRHANDLE              = 6;
CONST ORD_DRGDRAG                         = 7;
CONST ORD_DRGFREEDRAGINFO                 = 8;
CONST ORD_DRGFREEDRAGTRANSFER             = 9;
CONST ORD_DRGGETPS                       = 10;
CONST ORD_DRGPOSTTRANSFERMSG             = 11;
CONST ORD_DRGPUSHDRAGINFO                = 12;
CONST ORD_DRGQUERYDRAGITEM               = 13;
CONST ORD_DRGQUERYDRAGITEMCOUNT          = 14;
CONST ORD_DRGQUERYDRAGITEMPTR            = 15;
CONST ORD_DRGQUERYNATIVERMF              = 16;
CONST ORD_DRGQUERYNATIVERMFLEN           = 17;
CONST ORD_DRGQUERYSTRNAME                = 18;
CONST ORD_DRGQUERYSTRNAMELEN             = 19;
CONST ORD_DRGQUERYTRUETYPE               = 20;
CONST ORD_DRGQUERYTRUETYPELEN            = 21;
CONST ORD_DRGRELEASEPS                   = 22;
CONST ORD_DRGSENDTRANSFERMSG             = 23;
CONST ORD_DRGSETDRAGPOINTER              = 24;
CONST ORD_DRGSETDRAGIMAGE                = 25;
CONST ORD_DRGSETDRAGITEM                 = 26;
CONST ORD_DRGVERIFYNATIVERMF             = 27;
CONST ORD_DRGVERIFYRMF                   = 28;
CONST ORD_DRGVERIFYTRUETYPE              = 29;
CONST ORD_DRGVERIFYTYPE                  = 30;
CONST ORD_DRGVERIFYTYPESET               = 31;
CONST ORD_DRGDRAGFILES                   = 63;
CONST ORD_DRGACCEPTDROPPEDFILES          = 64;
CONST ORD_DRG32ACCESSDRAGINFO            = 32;
CONST ORD_DRG32ADDSTRHANDLE              = 33;
CONST ORD_DRG32ALLOCDRAGINFO             = 34;
CONST ORD_DRG32ALLOCDRAGTRANSFER         = 35;
CONST ORD_DRG32DELETEDRAGINFOSTRHANDLES  = 36;
CONST ORD_DRG32DELETESTRHANDLE           = 37;
CONST ORD_DRG32DRAG                      = 38;
CONST ORD_DRG32FREEDRAGINFO              = 39;
CONST ORD_DRG32FREEDRAGTRANSFER          = 40;
CONST ORD_DRG32GETPS                     = 41;
CONST ORD_DRG32POSTTRANSFERMSG           = 42;
CONST ORD_DRG32PUSHDRAGINFO              = 43;
CONST ORD_DRG32QUERYDRAGITEM             = 44;
CONST ORD_DRG32QUERYDRAGITEMCOUNT        = 45;
CONST ORD_DRG32QUERYDRAGITEMPTR          = 46;
CONST ORD_DRG32QUERYNATIVERMF            = 47;
CONST ORD_DRG32QUERYNATIVERMFLEN         = 48;
CONST ORD_DRG32QUERYSTRNAME              = 49;
CONST ORD_DRG32QUERYSTRNAMELEN           = 50;
CONST ORD_DRG32QUERYTRUETYPE             = 51;
CONST ORD_DRG32QUERYTRUETYPELEN          = 52;
CONST ORD_DRG32RELEASEPS                 = 53;
CONST ORD_DRG32SENDTRANSFERMSG           = 54;
CONST ORD_DRG32SETDRAGPOINTER            = 55;
CONST ORD_DRG32SETDRAGIMAGE              = 56;
CONST ORD_DRG32SETDRAGITEM               = 57;
CONST ORD_DRG32VERIFYNATIVERMF           = 58;
CONST ORD_DRG32VERIFYRMF                 = 59;
CONST ORD_DRG32VERIFYTRUETYPE            = 60;
CONST ORD_DRG32VERIFYTYPE                = 61;
CONST ORD_DRG32VERIFYTYPESET             = 62;
CONST ORD_DRG32DRAGFILES                 = 65;
CONST ORD_DRG32ACCEPTDROPPEDFILES        = 66;
(* FKA *)
CONST ORD_FKAINIT                = 64;
CONST ORD_QUERYFKADISPLAYDETAILS = 65;
CONST ORD_WINFKAWNDPROC          = 66;
CONST ORD_WINLOADFKA             = 67;
CONST ORD_WINCREATEFKA           = 68;
CONST ORD_WINSETFKAFORM          = 69;
CONST ORD_WINQUERYFKAFORM        = 70;
CONST ORD_WINGOTOFKA             = 71;
CONST ORD_WINGOFROMFKA           = 72;
(* HELPMGR *)
CONST ORD_WINCREATEHELPINSTANCE       = 1;
CONST ORD_WINDESTROYHELPINSTANCE      = 2;
CONST ORD_WINQUERYHELPINSTANCE        = 3;
CONST ORD_WINASSOCIATEHELPINSTANCE    = 4;
CONST ORD_WINLOADHELPTABLE            = 5;
CONST ORD_WINCREATEHELPTABLE          = 6;
CONST ORD_WIN32CREATEHELPINSTANCE    = 51;
CONST ORD_WIN32DESTROYHELPINSTANCE   = 52;
CONST ORD_WIN32QUERYHELPINSTANCE     = 53;
CONST ORD_WIN32ASSOCIATEHELPINSTANCE = 54;
CONST ORD_WIN32LOADHELPTABLE         = 55;
CONST ORD_WIN32CREATEHELPTABLE       = 56;
CONST ORD_DDFINITIALIZE              = 74;
CONST ORD_DDFPARA                    = 75;
CONST ORD_DDFSETFORMAT               = 76;
CONST ORD_DDFSETTEXTALIGN            = 77;
CONST ORD_DDFSETCOLOR                = 78;
CONST ORD_DDFINFORM                  = 79;
CONST ORD_DDFSETFONTSTYLE            = 80;
CONST ORD_DDFHYPERTEXT               = 81;
CONST ORD_DDFBEGINLIST               = 82;
CONST ORD_DDFLISTITEM                = 83;
CONST ORD_DDFENDLIST                 = 84;
CONST ORD_DDFTEXT                    = 85;
CONST ORD_DDFMETAFILE                = 86;
CONST ORD_DDFSETFONT                 = 87;
CONST ORD_DDFBITMAP                  = 88;
(* KBDCALLS *)
CONST ORD_KBDSETCUSTXT   = 1;
CONST ORD_KBDGETCP       = 3;
CONST ORD_KBDCHARIN      = 4;
CONST ORD_KBDSETCP       = 5;
CONST ORD_KBDSYNCH       = 7;
CONST ORD_KBDREGISTER    = 8;
CONST ORD_KBDSTRINGIN    = 9;
CONST ORD_KBDGETSTATUS   = 10;
CONST ORD_KBDSETSTATUS   = 11;
CONST ORD_KBDGETFOCUS    = 12;
CONST ORD_KBDFLUSHBUFFER = 13;
CONST ORD_KBDXLATE       = 14;
CONST ORD_KBDCLOSE       = 17;
CONST ORD_KBDFREEFOCUS   = 18;
CONST ORD_KBDDEREGISTER  = 20;
CONST ORD_KBDSETFGND     = 21;
CONST ORD_KBDPEEK        = 22;
CONST ORD_KBDOPEN        = 23;
CONST ORD_KBDGETHWID     = 24;
CONST ORD_KBDSETHWID     = 25;
(* MONCALLS *)
CONST ORD_DOSMONOPEN = 4;
CONST ORD_DOSMONCLOSE= 3;
CONST ORD_DOSMONREAD = 2;
CONST ORD_DOSMONWRITE= 1;
CONST ORD_DOSMONREG  = 5;
(* MOUCALLS *)
CONST ORD_MOUGETPTRSHAPE  = 1;
CONST ORD_MOUSETPTRSHAPE  = 2;
CONST ORD_MOUGETNUMMICKEYS= 3;
CONST ORD_MOUGETHOTKEY    = 4;
CONST ORD_MOUGETSCALEFACT = 6;
CONST ORD_MOUFLUSHQUE     = 7;
CONST ORD_MOUGETNUMBUTTONS= 8;
CONST ORD_MOUCLOSE        = 9;
CONST ORD_MOUSETHOTKEY    = 10;
CONST ORD_MOUSETSCALEFACT = 11;
CONST ORD_MOUGETNUMQUEEL  = 13;
CONST ORD_MOUDEREGISTER   = 14;
CONST ORD_MOUGETEVENTMASK = 15;
CONST ORD_MOUSETEVENTMASK = 16;
CONST ORD_MOUOPEN         = 17;
CONST ORD_MOUREMOVEPTR    = 18;
CONST ORD_MOUGETPTRPOS    = 19;
CONST ORD_MOUREADEVENTQUE = 20;
CONST ORD_MOUSETPTRPOS    = 21;
CONST ORD_MOUGETDEVSTATUS = 22;
CONST ORD_MOUSYNCH        = 23;
CONST ORD_MOUREGISTER     = 24;
CONST ORD_MOUSETDEVSTATUS = 25;
CONST ORD_MOUDRAWPTR      = 26;
CONST ORD_MOUINITREAL     = 27;
CONST ORD_MOUGETTHRESHOLD = 29;
CONST ORD_MOUSETTHRESHOLD = 30;
(* MSG *)
CONST ORD_DOSPUTMESSAGE       = 1;
CONST ORD_DOSTRUEGETMESSAGE   = 2;
CONST ORD_DOSINSMESSAGE       = 3;
CONST ORD_DOS32INSERTMESSAGE  = 4;
CONST ORD_DOS32PUTMESSAGE     = 5;
CONST ORD_DOS32TRUEGETMESSAGE = 6;
CONST ORD_DOSIQUERYMESSAGECP  = 7;
CONST ORD_DOS32IQUERYMESSAGECP= 8;
(* NLS *)
CONST ORD_DOSCASEMAP         = 1;
CONST ORD_DOSGETCOLLATE      = 2;
CONST ORD_DOSGETCTRYINFO     = 3;
CONST ORD_DOSGETDBCSEV       = 4;
CONST ORD_DOS32QUERYCTRYINFO = 5;
CONST ORD_DOS32QUERYDBCSENV  = 6;
CONST ORD_DOS32MAPCASE       = 7;
CONST ORD_DOS32QUERYCOLLATE  = 8;
(* NAMPIPES *)
CONST ORD_DOSMAKENMPIPE      = 1;
CONST ORD_DOSQNMPIPEINFO     = 2;
CONST ORD_DOSCONNECTNMPIPE   = 3;
CONST ORD_DOSDISCONNECTNMPIPE= 4;
CONST ORD_DOSQNMPHANDSTATE   = 5;
CONST ORD_DOSSETNMPHANDSTATE = 6;
CONST ORD_DOSPEEKNMPIPE      = 7;
CONST ORD_DOSWAITNMPIPE      = 8;
CONST ORD_DOSTRANSACTNMPIPE  = 9;
CONST ORD_DOSCALLNMPIPE     = 10;
CONST ORD_DOSRAWREADNMPIPE  = 11;
CONST ORD_DOSRAWWRITENMPIPE = 12;
CONST ORD_DOSSETNMPIPESEM   = 13;
CONST ORD_DOSQNMPIPESEMSTATE= 14;
(* DOSCALLS *)
CONST ORD_DOSCWAIT                   = 2;
CONST ORD_DOSENTERCRITSEC            = 3;
CONST ORD_DOSEXIT                    = 5;
CONST ORD_DOSEXITCRITSEC             = 6;
CONST ORD_DOSEXITLIST                = 7;
CONST ORD_DOSGETINFOSEG              = 8;
CONST ORD_DOSGETPRTY                 = 9;
CONST ORD_DOSKILLPROCESS             = 10;
CONST ORD_DOSSETPRTY                 = 11;
CONST ORD_DOSPTRACE                  = 12;
CONST ORD_DOSHOLDSIGNAL              = 13;
CONST ORD_DOSSETSIGHANDLER           = 14;
CONST ORD_DOSFLAGPROCESS             = 15;
CONST ORD_DOSMAKEPIPE                = 16;
CONST ORD_DOSSEMSETWAIT              = 20;
CONST ORD_DOSMUXSEMWAIT              = 22;
CONST ORD_DOSCLOSESEM                = 23;
CONST ORD_DOSCREATESEM               = 24;
CONST ORD_DOSOPENSEM                 = 25;
CONST ORD_DOSRESUMETHREAD            = 26;
CONST ORD_DOSSUSPENDTHREAD           = 27;
CONST ORD_DOSSETDATETIME             = 28;
CONST ORD_DOSTIMERASYNC              = 29;
CONST ORD_DOSTIMERSTART              = 30;
CONST ORD_DOSTIMERSTOP               = 31;
CONST ORD_DOSSLEEP                   = 32;
CONST ORD_DOSGETDATETIME             = 33;
CONST ORD_DOSALLOCSEG                = 34;
CONST ORD_DOSALLOCSHRSEG             = 35;
CONST ORD_DOSGETSHRSEG               = 36;
CONST ORD_DOSGIVESEG                 = 37;
CONST ORD_DOSREALLOCSEG              = 38;
CONST ORD_DOSFREESEG                 = 39;
CONST ORD_DOSALLOCHUGE               = 40;
CONST ORD_DOSGETHUGESHIFT            = 41;
CONST ORD_DOSREALLOCHUGE             = 42;
CONST ORD_DOSCREATECSALIAS           = 43;
CONST ORD_DOSLOADMODULE              = 44;
CONST ORD_DOSGETPROCADDR             = 45;
CONST ORD_DOSFREEMODULE              = 46;
CONST ORD_DOSGETMODHANDLE            = 47;
CONST ORD_DOSGETMODNAME              = 48;
CONST ORD_DOSGETMACHINEMODE          = 49;
CONST ORD_DOSBEEP                    = 50;
CONST ORD_DOSCLIACCESS               = 51;
CONST ORD_DOSDEVCONFIG               = 52;
CONST ORD_DOSDEVIOCTL                = 53;
CONST ORD_DOSBUFRESET                = 56;
CONST ORD_DOSCHDIR                   = 57;
CONST ORD_DOSCHGFILEPTR              = 58;
CONST ORD_DOSCLOSE                   = 59;
CONST ORD_DOSDELETE                  = 60;
CONST ORD_DOSDUPHANDLE               = 61;
CONST ORD_DOSFILELOCKS               = 62;
CONST ORD_DOSFINDCLOSE               = 63;
CONST ORD_DOSFINDFIRST               = 64;
CONST ORD_DOSFINDNEXT                = 65;
CONST ORD_DOSMKDIR                   = 66;
CONST ORD_DOSMOVE                    = 67;
CONST ORD_DOSNEWSIZE                 = 68;
CONST ORD_DOSPORTACCESS              = 69;
CONST ORD_DOSOPEN                    = 70;
CONST ORD_DOSQCURDIR                 = 71;
CONST ORD_DOSQCURDISK                = 72;
CONST ORD_DOSQFHANDSTATE             = 73;
CONST ORD_DOSQFILEINFO               = 74;
CONST ORD_DOSQFILEMODE               = 75;
CONST ORD_DOSQFSINFO                 = 76;
CONST ORD_DOSQHANDTYPE               = 77;
CONST ORD_DOSQVERIFY                 = 78;
CONST ORD_DOSRMDIR                   = 80;
CONST ORD_DOSSELECTDISK              = 81;
CONST ORD_DOSSETFHANDSTATE           = 82;
CONST ORD_DOSSETFILEINFO             = 83;
CONST ORD_DOSSETFILEMODE             = 84;
CONST ORD_DOSSETMAXFH                = 85;
CONST ORD_DOSSETVERIFY               = 86;
CONST ORD_DOSSYSTEMSERVICE           = 88;
CONST ORD_DOSSETVEC                  = 89;
CONST ORD_DOSSYSTRACE                = 90;
CONST ORD_DOSGETENV                  = 91;
CONST ORD_DOSGETVERSION              = 92;
CONST ORD_DOSGETPID                  = 94;
CONST ORD_DOSOPEN2                   = 95;
CONST ORD_DOSLIBINIT                 = 96;
CONST ORD_DOSSETFSINFO               = 97;
CONST ORD_DOSQPATHINFO               = 98;
CONST ORD_DOSDEVIOCTL2               = 99;
CONST ORD_DOSSETPATHINFO             = 104;
CONST ORD_DOSISETRELMAXFH            = 108;
CONST ORD_DOSIDEVIOCTL               = 109;
CONST ORD_DOS32FORCEDELETE           = 110;
CONST ORD_DOS32KILLTHREAD            = 111;
CONST ORD_DOSQUERYRASINFO            = 112;
CONST ORD_DOSERROR                   = 120;
CONST ORD_DOSGETSEG                  = 121;
CONST ORD_DOSLOCKSEG                 = 122;
CONST ORD_DOSUNLOCKSEG               = 123;
CONST ORD_DOSSIZESEG                 = 126;
CONST ORD_DOSMEMAVAIL                = 127;
CONST ORD_DOSPHYSICALDISK            = 129;
CONST ORD_DOSGETCP                   = 130;
CONST ORD_DOSSENDSIGNAL              = 134;
CONST ORD_DOSHUGESHIFT               = 135;
CONST ORD_DOSHUGEINCR                = 136;
CONST ORD_DOSREAD                    = 137;
CONST ORD_DOSWRITE                   = 138;
CONST ORD_DOSERRCLASS                = 139;
CONST ORD_DOSSEMREQUEST              = 140;
CONST ORD_DOSSEMCLEAR                = 141;
CONST ORD_DOSSEMWAIT                 = 142;
CONST ORD_DOSSEMSET                  = 143;
CONST ORD_DOSEXECPGM                 = 144;
CONST ORD_DOSCREATETHREAD            = 145;
CONST ORD_DOSSUBSET                  = 146;
CONST ORD_DOSSUBALLOC                = 147;
CONST ORD_DOSSUBFREE                 = 148;
CONST ORD_DOSREADASYNC               = 149;
CONST ORD_DOSWRITEASYNC              = 150;
CONST ORD_DOSSEARCHPATH              = 151;
CONST ORD_DOSSCANENV                 = 152;
CONST ORD_DOSSETCP                   = 153;
CONST ORD_DOSGETRESOURCE             = 155;
CONST ORD_DOSGETPPID                 = 156;
CONST ORD_DOSCALLBACK                = 157;
CONST ORD_DOSR2STACKREALLOC          = 160;
CONST ORD_DOSFSRAMSEMREQUEST         = 161;
CONST ORD_DOSFSRAMSEMCLEAR           = 162;
CONST ORD_DOSQAPPTYPE                = 163;
CONST ORD_DOSSETPROCCP               = 164;
CONST ORD_DOSDYNAMICTRACE            = 165;
CONST ORD_DOSQSYSINFO                = 166;
CONST ORD_DOSFSATTACH                = 181;
CONST ORD_DOSQFSATTACH               = 182;
CONST ORD_DOSFSCTL                   = 183;
CONST ORD_DOSFINDFIRST2              = 184;
CONST ORD_DOSMKDIR2                  = 185;
CONST ORD_DOSFILEIO                  = 186;
CONST ORD_DOSFINDNOTIFYCLOSE         = 187;
CONST ORD_DOSFINDNOTIFYFIRST         = 188;
CONST ORD_DOSFINDNOTIFYNEXT          = 189;
CONST ORD_DOSEDITNAME                = 191;
CONST ORD_DOSCOPY                    = 201;
CONST ORD_DOSFORCEDELETE             = 203;
CONST ORD_DOSENUMATTRIBUTE           = 204;
CONST ORD_DOSSHUTDOWN                = 206;
CONST ORD_DOSGETRESOURCE2            = 207;
CONST ORD_DOSFREERESOURCE            = 208;
CONST ORD_DOS32SETMAXFH              = 209;
CONST ORD_DOS32SETVERIFY             = 210;
CONST ORD_DOS32ERRCLASS              = 211;
CONST ORD_DOS32ERROR                 = 212;
CONST ORD_DOSMAXPATHLEN              = 214;
CONST ORD_DOSPAGESIZE                = 215;
CONST ORD_DOSLOCALINFO               = 216;
CONST ORD_DOSGLOBALINFO              = 217;
CONST ORD_DOS32SETFILEINFO           = 218;
CONST ORD_DOS32SETPATHINFO           = 219;
CONST ORD_DOS32SETDEFAULTDISK        = 220;
CONST ORD_DOS32SETFHSTATE            = 221;
CONST ORD_DOS32SETFSINFO             = 222;
CONST ORD_DOS32QUERYPATHINFO         = 223;
CONST ORD_DOS32QUERYHTYPE            = 224;
CONST ORD_DOS32QUERYVERIFY           = 225;
CONST ORD_DOS32DELETEDIR             = 226;
CONST ORD_DOS32SCANENV               = 227;
CONST ORD_DOS32SEARCHPATH            = 228;
CONST ORD_DOS32SLEEP                 = 229;
CONST ORD_DOS32GETDATETIME           = 230;
CONST ORD_DOS32DEVCONFIG             = 231;
CONST ORD_DOS32ENTERCRITSEC          = 232;
CONST ORD_DOS32EXITCRITSEC           = 233;
CONST ORD_DOS32EXIT                  = 234;
CONST ORD_DOS32KILLPROCESS           = 235;
CONST ORD_DOS32SETPRIORITY           = 236;
CONST ORD_DOS32RESUMETHREAD          = 237;
CONST ORD_DOS32SUSPENDTHREAD         = 238;
CONST ORD_DOS32CREATEPIPE            = 239;
CONST ORD_DOS32CALLNPIPE             = 240;
CONST ORD_DOS32CONNECTNPIPE          = 241;
CONST ORD_DOS32DISCONNECTNPIPE       = 242;
CONST ORD_DOS32CREATENPIPE           = 243;
CONST ORD_DOS32PEEKNPIPE             = 244;
CONST ORD_DOS32QUERYNPHSTATE         = 245;
CONST ORD_DOS32RAWREADNPIPE          = 246;
CONST ORD_DOS32RAWWRITENPIPE         = 247;
CONST ORD_DOS32QUERYNPIPEINFO        = 248;
CONST ORD_DOS32QUERYNPIPESEMSTATE    = 249;
CONST ORD_DOS32SETNPHSTATE           = 250;
CONST ORD_DOS32SETNPIPESEM           = 251;
CONST ORD_DOS32TRANSACTNPIPE         = 252;
CONST ORD_DOS32WAITNPIPE             = 253;
CONST ORD_DOS32RESETBUFFER           = 254;
CONST ORD_DOS32SETCURRENTDIR         = 255;
CONST ORD_DOS32SETFILEPTR            = 256;
CONST ORD_DOS32CLOSE                 = 257;
CONST ORD_DOS32COPY                  = 258;
CONST ORD_DOS32DELETE                = 259;
CONST ORD_DOS32DUPHANDLE             = 260;
CONST ORD_DOS32EDITNAME              = 261;
CONST ORD_DOS32FINDCLOSE             = 263;
CONST ORD_DOS32FINDFIRST             = 264;
CONST ORD_DOS32FINDNEXT              = 265;
CONST ORD_DOSOPENVDD                 = 266;
CONST ORD_DOSREQUESTVDD              = 267;
CONST ORD_DOSCLOSEVDD                = 268;
CONST ORD_DOS32FSATTACH              = 269;
CONST ORD_DOS32CREATEDIR             = 270;
CONST ORD_DOS32MOVE                  = 271;
CONST ORD_DOS32SETFILESIZE           = 272;
CONST ORD_DOS32OPEN                  = 273;
CONST ORD_DOS32QUERYCURRENTDIR       = 274;
CONST ORD_DOS32QUERYCURRENTDISK      = 275;
CONST ORD_DOS32QUERYFHSTATE          = 276;
CONST ORD_DOS32QUERYFSATTACH         = 277;
CONST ORD_DOS32QUERYFSINFO           = 278;
CONST ORD_DOS32QUERYFILEINFO         = 279;
CONST ORD_DOS32WAITCHILD             = 280;
CONST ORD_DOS32READ                  = 281;
CONST ORD_DOS32WRITE                 = 282;
CONST ORD_DOS32EXECPGM               = 283;
CONST ORD_DOS32DEVIOCTL              = 284;
CONST ORD_DOS32FSCTL                 = 285;
CONST ORD_DOS32BEEP                  = 286;
CONST ORD_DOS32PHYSICALDISK          = 287;
CONST ORD_DOS32SETCP                 = 288;
CONST ORD_DOS32SETPROCESSCP          = 289;
CONST ORD_DOS32STOPTIMER             = 290;
CONST ORD_DOS32QUERYCP               = 291;
CONST ORD_DOS32SETDATETIME           = 292;
CONST ORD_DOS32EXITLIST              = 296;
CONST ORD_DOS32ALLOCMEM              = 299;
CONST ORD_DOS32ALLOCSHAREDMEM        = 300;
CONST ORD_DOS32GETNAMEDSHAREDMEM     = 301;
CONST ORD_DOS32GETSHAREDMEM          = 302;
CONST ORD_DOS32GIVESHAREDMEM         = 303;
CONST ORD_DOS32FREEMEM               = 304;
CONST ORD_DOS32SETMEM                = 305;
CONST ORD_DOS32QUERYMEM              = 306;
CONST ORD_DOS32OPENVDD               = 308;
CONST ORD_DOS32REQUESTVDD            = 309;
CONST ORD_DOS32CLOSEVDD              = 310;
CONST ORD_DOS32CREATETHREAD          = 311;
CONST ORD_DOS32GETINFOBLOCKS         = 312;
CONST ORD_DOS32DYNAMICTRACE          = 316;
CONST ORD_DOS32DEBUG                 = 317;
CONST ORD_DOS32LOADMODULE            = 318;
CONST ORD_DOS32QUERYMODULEHANDLE     = 319;
CONST ORD_DOS32QUERYMODULENAME       = 320;
CONST ORD_DOS32QUERYPROCADDR         = 321;
CONST ORD_DOS32FREEMODULE            = 322;
CONST ORD_DOS32QUERYAPPTYPE          = 323;
CONST ORD_DOS32CREATEEVENTSEM        = 324;
CONST ORD_DOS32OPENEVENTSEM          = 325;
CONST ORD_DOS32CLOSEEVENTSEM         = 326;
CONST ORD_DOS32RESETEVENTSEM         = 327;
CONST ORD_DOS32POSTEVENTSEM          = 328;
CONST ORD_DOS32WAITEVENTSEM          = 329;
CONST ORD_DOS32QUERYEVENTSEM         = 330;
CONST ORD_DOS32CREATEMUTEXSEM        = 331;
CONST ORD_DOS32OPENMUTEXSEM          = 332;
CONST ORD_DOS32CLOSEMUTEXSEM         = 333;
CONST ORD_DOS32REQUESTMUTEXSEM       = 334;
CONST ORD_DOS32RELEASEMUTEXSEM       = 335;
CONST ORD_DOS32QUERYMUTEXSEM         = 336;
CONST ORD_DOS32CREATEMUXWAITSEM      = 337;
CONST ORD_DOS32OPENMUXWAITSEM        = 338;
CONST ORD_DOS32CLOSEMUXWAITSEM       = 339;
CONST ORD_DOS32WAITMUXWAITSEM        = 340;
CONST ORD_DOS32ADDMUXWAITSEM         = 341;
CONST ORD_DOS32DELETEMUXWAITSEM      = 342;
CONST ORD_DOS32QUERYMUXWAITSEM       = 343;
CONST ORD_DOS32SUBSETMEM             = 344;
CONST ORD_DOS32SUBALLOCMEM           = 345;
CONST ORD_DOS32SUBFREEMEM            = 346;
CONST ORD_DOS32SUBUNSETMEM           = 347;
CONST ORD_DOS32QUERYSYSINFO          = 348;
CONST ORD_DOS32WAITTHREAD            = 349;
CONST ORD_DOS32ASYNCTIMER            = 350;
CONST ORD_DOS32STARTTIMER            = 351;
CONST ORD_DOS32GETRESOURCE           = 352;
CONST ORD_DOS32FREERESOURCE          = 353;
CONST ORD_DOS32SETEXCEPTIONHANDLER   = 354;
CONST ORD_DOS32UNSETEXCEPTIONHANDLER = 355;
CONST ORD_DOS32RAISEEXCEPTION        = 356;
CONST ORD_DOS32UNWINDEXCEPTION       = 357;
CONST ORD_DOS32TMRQUERYFREQ          = 362;
CONST ORD_DOS32TMRQUERYTIME          = 363;
CONST ORD_DOS32REGISTERPERFCTRS      = 367;
CONST ORD_DOS32ENUMATTRIBUTE         = 372;
CONST ORD_DOS32QUERYDOSPROPERTY      = 373;
CONST ORD_DOS32SETDOSPROPERTY        = 374;
CONST ORD_DOSQUERYDOSPROPERTY        = 375;
CONST ORD_DOSSETDOSPROPERTY          = 376;
CONST ORD_DOS32PROFILE               = 377;
CONST ORD_DOS32SETSIGNALEXCEPTIONFOC = 378;
CONST ORD_DOS32SENDSIGNALEXCEPTION   = 379;
CONST ORD_DOS32ENTERMUSTCOMPLETE     = 380;
CONST ORD_DOS32EXITMUSTCOMPLETE      = 381;
CONST ORD_DOS32SETRELMAXFH           = 382;
CONST ORD_DOS32SHUTDOWN              = 415;
CONST ORD_DOS32REPLACEMODULE         = 417;
CONST ORD_DOS32ACKNOWLEDGESIGNALEXC  = 418;
CONST ORD_DOS32TIB                   = 419;
CONST ORD_DOSTMRQUERYFREQ            = 420;
CONST ORD_DOSTMRQUERYTIME            = 421;
CONST ORD_DOSREGISTERPERFCTRS        = 422;
CONST ORD_DOSFLATTOSEL               = 423;
CONST ORD_DOSSELTOFLAT               = 424;
CONST ORD_DOS32FLATTOSEL             = 425;
CONST ORD_DOS32SELTOFLAT             = 426;
CONST ORD_DOS32SETFILELOCKS            = 428;
CONST ORD_DOS32CANCELLOCKREQUEST       = 429;
CONST ORD_DOSOPENCHANGENOTIFY        = 437;
CONST ORD_DOSRESETCHANGENOTIFY       = 438;
CONST ORD_DOSCLOSECHANGENOTIFY       = 439;
CONST ORD_DOS32OPENCHANGENOTIFY      = 440;
CONST ORD_DOS32RESETCHANGENOTIFY     = 441;
CONST ORD_DOS32CLOSECHANGENOTIFY     = 442;
CONST ORD_DOS32QUERYRESOURCESIZE     = 572;
CONST ORD_DOSQUERYRESOURCESIZE       = 573;
CONST ORD_DOS32INITIALIZEPORTHOLE    = 580;
CONST ORD_DOS32QUERYHEADERINFO       = 582;
CONST ORD_DOSINITIALIZEPORTHOLE      = 583;
CONST ORD_DOSQUERYHEADERINFO         = 584;
CONST ORD_DOS32QUERYPROCTYPE         = 586;
CONST ORD_DOSQUERYPROCTYPE           = 587;
CONST ORD_DOS32PROTECTSETFILEPTR     = 621;
CONST ORD_DOSPROTECTCLOSE            = 622;
CONST ORD_DOSPROTECTFILEIO           = 623;
CONST ORD_DOSPROTECTFILELOCKS        = 624;
CONST ORD_DOSPROTECTNEWSIZE          = 627;
CONST ORD_DOSPROTECTOPEN             = 628;
CONST ORD_DOSPROTECTQFHANDSTATE      = 629;
CONST ORD_DOSPROTECTSETFHANDSTATE    = 630;
CONST ORD_DOSPROTECTQFILEINFO        = 631;
CONST ORD_DOSPROTECTSETFILEINFO      = 632;
CONST ORD_DOSPROTECTCHGFILEPTR       = 634;
CONST ORD_DOSPROTECTENUMATTRIBUTE    = 635;
CONST ORD_DOS32PROTECTENUMATTRIBUTE  = 636;
CONST ORD_DOS32PROTECTOPEN           = 637;
CONST ORD_DOS32PROTECTCLOSE          = 638;
CONST ORD_DOS32PROTECTSETFILELOCKS   = 639;
CONST ORD_DOS32PROTECTSETFILESIZE    = 640;
CONST ORD_DOS32PROTECTREAD           = 641;
CONST ORD_DOS32PROTECTWRITE          = 642;
CONST ORD_DOS32PROTECTSETFILEINFO    = 643;
CONST ORD_DOS32PROTECTSETFHSTATE     = 644;
CONST ORD_DOS32PROTECTQUERYFHSTATE   = 645;
CONST ORD_DOS32PROTECTQUERYFILEINFO  = 646;
(* PMGPI *)
CONST ORD_DEVOPENDC                     = 1;
CONST ORD_DEVCLOSEDC                    = 2;
CONST ORD_DEVPOSTDEVICEMODES            = 3;
CONST ORD_DEVESCAPE                     = 4;
CONST ORD_DEVQUERYHARDCOPYCAPS          = 5;
CONST ORD_DEVQUERYCAPS                  = 6;
CONST ORD_GPICREATEPS                   = 7;
CONST ORD_GPIQUERYPS                    = 9;
CONST ORD_GPIDESTROYPS                  = 10;
CONST ORD_GPIRESETPS                    = 11;
CONST ORD_GPISAVEPS                     = 12;
CONST ORD_GPIRESTOREPS                  = 13;
CONST ORD_GPIASSOCIATE                  = 14;
CONST ORD_GPIERRORSEGMENTDATA           = 15;
CONST ORD_GPIERASE                      = 16;
CONST ORD_GPISETDRAWCONTROL             = 17;
CONST ORD_GPIQUERYDRAWCONTROL           = 18;
CONST ORD_GPIDRAWCHAIN                  = 19;
CONST ORD_GPIDRAWFROM                   = 20;
CONST ORD_GPIDRAWSEGMENT                = 21;
CONST ORD_GPISETSTOPDRAW                = 22;
CONST ORD_GPIQUERYSTOPDRAW              = 23;
CONST ORD_GPIREMOVEDYNAMICS             = 24;
CONST ORD_GPIDRAWDYNAMICS               = 25;
CONST ORD_GPISETDRAWINGMODE             = 26;
CONST ORD_GPIQUERYDRAWINGMODE           = 27;
CONST ORD_GPIGETDATA                    = 28;
CONST ORD_GPIPUTDATA                    = 29;
CONST ORD_GPISETPICKAPERTURESIZE        = 30;
CONST ORD_GPIQUERYPICKAPERTURESIZE      = 31;
CONST ORD_GPISETPICKAPERTUREPOSITION    = 32;
CONST ORD_GPIQUERYPICKAPERTUREPOSITION  = 33;
CONST ORD_GPISETTAG                     = 34;
CONST ORD_GPIQUERYTAG                   = 35;
CONST ORD_GPICORRELATECHAIN             = 36;
CONST ORD_GPICORRELATEFROM              = 37;
CONST ORD_GPICORRELATESEGMENT           = 38;
CONST ORD_GPIRESETBOUNDARYDATA          = 42;
CONST ORD_GPIQUERYBOUNDARYDATA          = 43;
CONST ORD_GPIOPENSEGMENT                = 44;
CONST ORD_GPICLOSESEGMENT               = 46;
CONST ORD_GPIDELETESEGMENT              = 47;
CONST ORD_GPIDELETESEGMENTS             = 48;
CONST ORD_GPIQUERYSEGMENTNAMES          = 49;
CONST ORD_GPISETINITIALSEGMENTATTRS     = 51;
CONST ORD_GPIQUERYINITIALSEGMENTATTRS   = 52;
CONST ORD_GPISETSEGMENTATTRS            = 53;
CONST ORD_GPIQUERYSEGMENTATTRS          = 54;
CONST ORD_GPISETSEGMENTPRIORITY         = 55;
CONST ORD_GPIQUERYSEGMENTPRIORITY       = 56;
CONST ORD_GPISETEDITMODE                = 57;
CONST ORD_GPIQUERYEDITMODE              = 58;
CONST ORD_GPISETELEMENTPOINTER          = 59;
CONST ORD_GPIQUERYELEMENTPOINTER        = 60;
CONST ORD_GPIOFFSETELEMENTPOINTER       = 61;
CONST ORD_GPIDELETEELEMENT              = 62;
CONST ORD_GPIDELETEELEMENTRANGE         = 63;
CONST ORD_GPILABEL                      = 64;
CONST ORD_GPISETELEMENTPOINTERATLABEL   = 65;
CONST ORD_GPIDELETEELEMENTSBETWEENLABELS= 66;
CONST ORD_GPIQUERYELEMENTTYPE           = 67;
CONST ORD_GPIQUERYELEMENT               = 68;
CONST ORD_GPIELEMENT                    = 69;
CONST ORD_GPIBEGINELEMENT               = 70;
CONST ORD_GPIENDELEMENT                 = 71;
CONST ORD_GPISETSEGMENTTRANSFORMMATRIX  = 78;
CONST ORD_GPIQUERYSEGMENTTRANSFORMMATRIX= 79;
CONST ORD_GPISETMODELTRANSFORMMATRIX    = 80;
CONST ORD_GPIQUERYMODELTRANSFORMMATRIX  = 81;
CONST ORD_GPICALLSEGMENTMATRIX          = 82;
CONST ORD_GPISETDEFAULTVIEWMATRIX       = 83;
CONST ORD_GPIQUERYDEFAULTVIEWMATRIX     = 84;
CONST ORD_GPISETPAGEVIEWPORT            = 85;
CONST ORD_GPIQUERYPAGEVIEWPORT          = 86;
CONST ORD_GPISETVIEWINGTRANSFORMMATRIX  = 87;
CONST ORD_GPIQUERYVIEWINGTRANSFORMMATRIX= 88;
CONST ORD_GPISETGRAPHICSFIELD           = 89;
CONST ORD_GPIQUERYGRAPHICSFIELD         = 90;
CONST ORD_GPISETVIEWINGLIMITS           = 91;
CONST ORD_GPIQUERYVIEWINGLIMITS         = 92;
CONST ORD_GPICONVERT                    = 93;
CONST ORD_GPISETATTRMODE                = 94;
CONST ORD_GPIQUERYATTRMODE              = 95;
CONST ORD_GPIPOP                        = 96;
CONST ORD_GPISETATTRS                   = 97;
CONST ORD_GPIQUERYATTRS                 = 98;
CONST ORD_GPICREATELOGCOLORTABLE        = 99;
CONST ORD_GPIREALIZECOLORTABLE          = 100;
CONST ORD_GPIUNREALIZECOLORTABLE        = 101;
CONST ORD_GPIQUERYCOLORDATA             = 102;
CONST ORD_GPIQUERYLOGCOLORTABLE         = 103;
CONST ORD_GPIQUERYREALCOLORS            = 104;
CONST ORD_GPIQUERYNEARESTCOLOR          = 105;
CONST ORD_GPIQUERYCOLORINDEX            = 106;
CONST ORD_GPIQUERYRGBCOLOR              = 107;
CONST ORD_GPISETCOLOR                   = 108;
CONST ORD_GPIQUERYCOLOR                 = 109;
CONST ORD_GPISETBACKCOLOR               = 110;
CONST ORD_GPIQUERYBACKCOLOR             = 111;
CONST ORD_GPISETMIX                     = 112;
CONST ORD_GPIQUERYMIX                   = 113;
CONST ORD_GPISETBACKMIX                 = 114;
CONST ORD_GPIQUERYBACKMIX               = 115;
CONST ORD_GPISETLINETYPE                = 116;
CONST ORD_GPIQUERYLINETYPE              = 117;
CONST ORD_GPISETLINEWIDTH               = 118;
CONST ORD_GPIQUERYLINEWIDTH             = 119;
CONST ORD_GPISETLINEWIDTHGEOM           = 120;
CONST ORD_GPIQUERYLINEWIDTHGEOM         = 121;
CONST ORD_GPISETLINEEND                 = 122;
CONST ORD_GPIQUERYLINEEND               = 123;
CONST ORD_GPISETLINEJOIN                = 124;
CONST ORD_GPIQUERYLINEJOIN              = 125;
CONST ORD_GPISETCURRENTPOSITION         = 126;
CONST ORD_GPIQUERYCURRENTPOSITION       = 127;
CONST ORD_GPIMOVE                       = 128;
CONST ORD_GPILINE                       = 129;
CONST ORD_GPIPOLYLINE                   = 130;
CONST ORD_GPIBOX                        = 131;
CONST ORD_GPIPTVISIBLE                  = 132;
CONST ORD_GPIRECTVISIBLE                = 133;
CONST ORD_GPISETARCPARAMS               = 134;
CONST ORD_GPIQUERYARCPARAMS             = 135;
CONST ORD_GPIPOINTARC                   = 136;
CONST ORD_GPIFULLARC                    = 137;
CONST ORD_GPIPARTIALARC                 = 138;
CONST ORD_GPIPOLYFILLET                 = 139;
CONST ORD_GPIPOLYFILLETSHARP            = 140;
CONST ORD_GPIPOLYSPLINE                 = 141;
CONST ORD_GPISETBITMAPID                = 142;
CONST ORD_GPIQUERYBITMAPHANDLE          = 143;
CONST ORD_GPISETPATTERNSET              = 144;
CONST ORD_GPIQUERYPATTERNSET            = 145;
CONST ORD_GPISETPATTERN                 = 146;
CONST ORD_GPIQUERYPATTERN               = 147;
CONST ORD_GPISETPATTERNREFPOINT         = 148;
CONST ORD_GPIQUERYPATTERNREFPOINT       = 149;
CONST ORD_GPIBEGINAREA                  = 150;
CONST ORD_GPIENDAREA                    = 151;
CONST ORD_GPILOADFONTS                  = 152;
CONST ORD_GPIUNLOADFONTS                = 153;
CONST ORD_GPICREATELOGFONT              = 154;
CONST ORD_GPIDELETESETID                = 155;
CONST ORD_GPIQUERYNUMBERSETIDS          = 156;
CONST ORD_GPIQUERYSETIDS                = 157;
CONST ORD_GPIQUERYFONTS                 = 158;
CONST ORD_GPIQUERYFONTMETRICS           = 159;
CONST ORD_GPIQUERYKERNINGPAIRS          = 160;
CONST ORD_GPIQUERYWIDTHTABLE            = 161;
CONST ORD_GPISETCP                      = 162;
CONST ORD_GPIQUERYCP                    = 163;
CONST ORD_GPIQUERYTEXTBOX               = 164;
CONST ORD_DEVQUERYDEVICENAMES           = 165;
CONST ORD_GPIQUERYDEFCHARBOX            = 166;
CONST ORD_GPIQUERYFONTFILEDESCRIPTIONS  = 167;
CONST ORD_GPISETCHARSET                 = 168;
CONST ORD_GPIQUERYCHARSET               = 169;
CONST ORD_GPISETCHARBOX                 = 170;
CONST ORD_GPIQUERYCHARBOX               = 171;
CONST ORD_GPISETCHARANGLE               = 172;
CONST ORD_GPIQUERYCHARANGLE             = 173;
CONST ORD_GPISETCHARSHEAR               = 174;
CONST ORD_GPIQUERYCHARSHEAR             = 175;
CONST ORD_GPISETCHARDIRECTION           = 176;
CONST ORD_GPIQUERYCHARDIRECTION         = 177;
CONST ORD_GPISETCHARMODE                = 178;
CONST ORD_GPIQUERYCHARMODE              = 179;
CONST ORD_GPICHARSTRING                 = 180;
CONST ORD_GPICHARSTRINGAT               = 181;
CONST ORD_GPICHARSTRINGPOS              = 182;
CONST ORD_GPICHARSTRINGPOSAT            = 183;
CONST ORD_GPISETMARKERSET               = 184;
CONST ORD_GPIQUERYMARKERSET             = 185;
CONST ORD_GPISETMARKER                  = 186;
CONST ORD_GPIQUERYMARKER                = 187;
CONST ORD_GPISETMARKERBOX               = 188;
CONST ORD_GPIQUERYMARKERBOX             = 189;
CONST ORD_GPIMARKER                     = 190;
CONST ORD_GPIPOLYMARKER                 = 191;
CONST ORD_GPIIMAGE                      = 192;
CONST ORD_GPICREATEBITMAP               = 196;
CONST ORD_GPIDELETEBITMAP               = 197;
CONST ORD_GPISETBITMAP                  = 198;
CONST ORD_GPISETBITMAPDIMENSION         = 199;
CONST ORD_GPIQUERYBITMAPDIMENSION       = 200;
CONST ORD_GPIQUERYDEVICEBITMAPFORMATS   = 201;
CONST ORD_GPIQUERYBITMAPPARAMETERS      = 202;
CONST ORD_GPISETBITMAPBITS              = 203;
CONST ORD_GPIQUERYBITMAPBITS            = 204;
CONST ORD_GPIBITBLT                     = 205;
CONST ORD_GPISETPEL                     = 206;
CONST ORD_GPIQUERYPEL                   = 207;
CONST ORD_GPICREATEREGION               = 208;
CONST ORD_GPISETREGION                  = 209;
CONST ORD_GPIDESTROYREGION              = 210;
CONST ORD_GPICOMBINEREGION              = 211;
CONST ORD_GPIEQUALREGION                = 212;
CONST ORD_GPIOFFSETREGION               = 213;
CONST ORD_GPIPTINREGION                 = 214;
CONST ORD_GPIRECTINREGION               = 215;
CONST ORD_GPIQUERYREGIONBOX             = 216;
CONST ORD_GPIQUERYREGIONRECTS           = 217;
CONST ORD_GPISETCLIPREGION              = 218;
CONST ORD_GPIQUERYCLIPREGION            = 219;
CONST ORD_GPIQUERYCLIPBOX               = 220;
CONST ORD_GPIINTERSECTCLIPRECTANGLE     = 221;
CONST ORD_GPIEXCLUDECLIPRECTANGLE       = 222;
CONST ORD_GPIOFFSETCLIPREGION           = 223;
CONST ORD_GPIPAINTREGION                = 224;
CONST ORD_GPILOADMETAFILE               = 225;
CONST ORD_GPICOPYMETAFILE               = 226;
CONST ORD_GPIPLAYMETAFILE               = 227;
CONST ORD_GPISAVEMETAFILE               = 228;
CONST ORD_GPIDELETEMETAFILE             = 229;
CONST ORD_GPIQUERYMETAFILEBITS          = 230;
CONST ORD_GPISETMETAFILEBITS            = 231;
CONST ORD_GPIQUERYMETAFILELENGTH        = 232;
CONST ORD_GPISETCLIPPATH                = 233;
CONST ORD_GPIBEGINPATH                  = 234;
CONST ORD_GPIENDPATH                    = 235;
CONST ORD_GPICLOSEFIGURE                = 236;
CONST ORD_GPIMODIFYPATH                 = 237;
CONST ORD_GPIFILLPATH                   = 238;
CONST ORD_GPISTARTREQUEST               = 239;
CONST ORD_GPIQUERYDEVICE                = 240;
CONST ORD_DEVSTDOPEN                    = 244;
CONST ORD_GPIQUERYCHARSTRINGPOS         = 245;
CONST ORD_GPIQUERYCHARSTRINGPOSAT       = 246;
CONST ORD_GPISETPS                      = 248;
CONST ORD_SEGSGWOPENSEGMENTWINDOW       = 249;
CONST ORD_MTENDREADREQUEST              = 250;
CONST ORD_MTGETDESCRIPTION              = 251;
CONST ORD_FMTORDERTABLE                 = 252;
CONST ORD_MTGETCODEPAGE                 = 253;
CONST ORD_MTGETLCT                      = 254;
CONST ORD_MTGETGDDINFO                  = 255;
CONST ORD_FMTCONVERTGOCAPOLY            = 256;
CONST ORD_MTGETFIRSTFONT                = 257;
CONST ORD_SEGSGWNEWPARTDATA             = 258;
CONST ORD_MTSTARTREADREQUEST            = 259;
CONST ORD_MTGETFIRSTGRAPHICSDATA        = 260;
CONST ORD_MTGETNEXTFONT                 = 261;
CONST ORD_MTGETNEXTGRAPHICSDATA         = 262;
CONST ORD_GPILOADPUBLICFONTS            = 263;
CONST ORD_GPIUNLOADPUBLICFONTS          = 264;
CONST ORD_GPICOMMENT                    = 268;
CONST ORD_GPIWCBITBLT                   = 269;
CONST ORD_GPISTROKEPATH                 = 270;
CONST ORD_SEGSGWNEXTORDERF              = 271;
CONST ORD_GPIOUTLINEPATH                = 274;
CONST ORD_GPISETDEFTAG                  = 275;
CONST ORD_GPIQUERYDEFTAG                = 276;
CONST ORD_GPISETDEFATTRS                = 277;
CONST ORD_GPIQUERYDEFATTRS              = 278;
CONST ORD_GPISETDEFVIEWINGLIMITS        = 279;
CONST ORD_GPIQUERYDEFVIEWINGLIMITS      = 280;
CONST ORD_GPISETDEFARCPARAMS            = 281;
CONST ORD_GPIQUERYDEFARCPARAMS          = 282;
CONST ORD_GPITRANSLATE                  = 283;
CONST ORD_GPISCALE                      = 284;
CONST ORD_GPIROTATE                     = 285;
CONST ORD_GPIPOLYLINEDISJOINT           = 286;
CONST ORD_GPIPATHTOREGION               = 287;
CONST ORD_GPIFLOODFILL                  = 289;
CONST ORD_GPIDRAWBITS                   = 290;
CONST ORD_GPIQUERYBITMAPINFOHEADER      = 291;
CONST ORD_GPIQUERYLOGICALFONT           = 292;
CONST ORD_GPIQUERYFACESTRING            = 293;
CONST ORD_GPIQUERYFONTACTION            = 294;
CONST ORD_GPICREATEPALETTE              = 295;
CONST ORD_GPIDELETEPALETTE              = 296;
CONST ORD_GPISELECTPALETTE              = 297;
CONST ORD_GPIANIMATEPALETTE             = 298;
CONST ORD_GPISETPALETTEENTRIES          = 299;
CONST ORD_GPIQUERYPALETTE               = 300;
CONST ORD_GPIQUERYPALETTEINFO           = 301;
CONST ORD_GPIQUERYCHAREXTRA             = 302;
CONST ORD_GPISETCHAREXTRA               = 303;
CONST ORD_GPIQUERYCHARBREAKEXTRA        = 304;
CONST ORD_GPISETCHARBREAKEXTRA          = 305;
CONST ORD_GPIFRAMEREGION                = 306;
CONST ORD_GPICONVERTWITHMATRIX          = 307;
CONST ORD_GPI32ASSOCIATE                = 351;
CONST ORD_GPI32BEGINAREA                = 352;
CONST ORD_GPI32BEGINELEMENT             = 353;
CONST ORD_GPI32BEGINPATH                = 354;
CONST ORD_GPI32BITBLT                   = 355;
CONST ORD_GPI32BOX                      = 356;
CONST ORD_GPI32CALLSEGMENTMATRIX        = 357;
CONST ORD_GPI32CHARSTRING               = 358;
CONST ORD_GPI32CHARSTRINGAT             = 359;
CONST ORD_GPI32CLOSEFIGURE              = 360;
CONST ORD_GPI32CLOSESEGMENT             = 361;
CONST ORD_GPI32COMBINEREGION            = 362;
CONST ORD_GPI32COMMENT                  = 363;
CONST ORD_GPI32CONVERT                  = 364;
CONST ORD_GPI32COPYMETAFILE             = 365;
CONST ORD_GPI32CORRELATECHAIN           = 366;
CONST ORD_GPI32CORRELATEFROM            = 367;
CONST ORD_GPI32CREATELOGFONT            = 368;
CONST ORD_GPI32CREATEPS                 = 369;
CONST ORD_GPI32CREATEREGION             = 370;
CONST ORD_GPI32DELETEBITMAP             = 371;
CONST ORD_GPI32DELETEELEMENT            = 372;
CONST ORD_GPI32DELETEELEMENTRANGE       = 373;
CONST ORD_GPI32DELETEELEMENTSBETWEENLABE= 374;
CONST ORD_GPI32DELETEMETAFILE           = 375;
CONST ORD_GPI32DELETESEGMENT            = 376;
CONST ORD_GPI32DELETESEGMENTS           = 377;
CONST ORD_GPI32DELETESETID              = 378;
CONST ORD_GPI32DESTROYPS                = 379;
CONST ORD_GPI32DRAWCHAIN                = 380;
CONST ORD_GPI32DRAWDYNAMICS             = 381;
CONST ORD_GPI32DRAWFROM                 = 382;
CONST ORD_GPI32DRAWSEGMENT              = 383;
CONST ORD_GPI32ELEMENT                  = 384;
CONST ORD_GPI32ENDAREA                  = 385;
CONST ORD_GPI32ENDELEMENT               = 386;
CONST ORD_GPI32ENDPATH                  = 387;
CONST ORD_GPI32EQUALREGION              = 388;
CONST ORD_GPI32ERASE                    = 389;
CONST ORD_GPI32ERRORSEGMENTDATA         = 390;
CONST ORD_GPI32EXCLUDECLIPRECTANGLE     = 391;
CONST ORD_GPI32FILLPATH                 = 392;
CONST ORD_GPI32FULLARC                  = 393;
CONST ORD_GPI32GETDATA                  = 394;
CONST ORD_GPI32IMAGE                    = 395;
CONST ORD_GPI32INTERSECTCLIPRECTANGLE   = 396;
CONST ORD_GPI32LABEL                    = 397;
CONST ORD_GPI32LINE                     = 398;
CONST ORD_GPI32LOADBITMAP               = 399;
CONST ORD_GPI32LOADFONTS                = 400;
CONST ORD_GPI32LOADMETAFILE             = 401;
CONST ORD_GPI32MARKER                   = 402;
CONST ORD_GPI32MODIFYPATH               = 403;
CONST ORD_GPI32MOVE                     = 404;
CONST ORD_GPI32OFFSETCLIPREGION         = 405;
CONST ORD_GPI32OFFSETELEMENTPOINTER     = 406;
CONST ORD_GPI32OFFSETREGION             = 407;
CONST ORD_GPI32OPENSEGMENT              = 408;
CONST ORD_GPI32PAINTREGION              = 409;
CONST ORD_GPI32PLAYMETAFILE             = 411;
CONST ORD_GPI32POINTARC                 = 412;
CONST ORD_GPI32POLYFILLET               = 413;
CONST ORD_GPI32POLYFILLETSHARP          = 414;
CONST ORD_GPI32POLYLINE                 = 415;
CONST ORD_GPI32POLYMARKER               = 416;
CONST ORD_GPI32POLYSPLINE               = 417;
CONST ORD_GPI32POP                      = 418;
CONST ORD_GPI32PTINREGION               = 419;
CONST ORD_GPI32PTVISIBLE                = 420;
CONST ORD_GPI32PUTDATA                  = 421;
CONST ORD_GPI32QUERYARCPARAMS           = 422;
CONST ORD_GPI32QUERYATTRMODE            = 423;
CONST ORD_GPI32QUERYBACKCOLOR           = 424;
CONST ORD_GPI32QUERYBACKMIX             = 425;
CONST ORD_GPI32QUERYBITMAPDIMENSION     = 426;
CONST ORD_GPI32QUERYBITMAPHANDLE        = 427;
CONST ORD_GPI32QUERYBOUNDARYDATA        = 428;
CONST ORD_GPI32QUERYCHARANGLE           = 429;
CONST ORD_GPI32QUERYCHARBOX             = 430;
CONST ORD_GPI32QUERYCHARDIRECTION       = 431;
CONST ORD_GPI32QUERYCHARMODE            = 432;
CONST ORD_GPI32QUERYCHARSET             = 433;
CONST ORD_GPI32QUERYCHARSHEAR           = 434;
CONST ORD_GPI32QUERYCLIPBOX             = 435;
CONST ORD_GPI32QUERYCLIPREGION          = 436;
CONST ORD_GPI32QUERYCOLOR               = 437;
CONST ORD_GPI32QUERYCOLORDATA           = 438;
CONST ORD_GPI32QUERYCOLORINDEX          = 439;
CONST ORD_GPI32QUERYCP                  = 440;
CONST ORD_GPI32QUERYCURRENTPOSITION     = 441;
CONST ORD_GPI32QUERYDEFCHARBOX          = 442;
CONST ORD_GPI32QUERYDEFAULTVIEWMATRIX   = 443;
CONST ORD_GPI32QUERYDEVICE              = 444;
CONST ORD_GPI32QUERYDEVICEBITMAPFORMATS = 445;
CONST ORD_GPI32QUERYDRAWCONTROL         = 446;
CONST ORD_GPI32QUERYDRAWINGMODE         = 447;
CONST ORD_GPI32QUERYEDITMODE            = 448;
CONST ORD_GPI32QUERYELEMENT             = 449;
CONST ORD_GPI32QUERYELEMENTPOINTER      = 450;
CONST ORD_GPI32QUERYELEMENTTYPE         = 451;
CONST ORD_GPI32QUERYFONTFILEDESCRIPTIONS= 452;
CONST ORD_GPI32QUERYFONTMETRICS         = 453;
CONST ORD_GPI32QUERYGRAPHICSFIELD       = 454;
CONST ORD_GPI32QUERYINITIALSEGMENTATTRS = 455;
CONST ORD_GPI32QUERYKERNINGPAIRS        = 456;
CONST ORD_GPI32QUERYLINEEND             = 457;
CONST ORD_GPI32QUERYLINEJOIN            = 458;
CONST ORD_GPI32QUERYLINETYPE            = 459;
CONST ORD_GPI32QUERYLINEWIDTH           = 460;
CONST ORD_GPI32QUERYLINEWIDTHGEOM       = 461;
CONST ORD_GPI32QUERYMARKER              = 462;
CONST ORD_GPI32QUERYMARKERBOX           = 463;
CONST ORD_GPI32QUERYMARKERSET           = 464;
CONST ORD_GPI32QUERYMETAFILEBITS        = 465;
CONST ORD_GPI32QUERYMETAFILELENGTH      = 466;
CONST ORD_GPI32QUERYMIX                 = 467;
CONST ORD_GPI32QUERYMODELTRANSFORMMATRIX= 468;
CONST ORD_GPI32QUERYNEARESTCOLOR        = 469;
CONST ORD_GPI32QUERYNUMBERSETIDS        = 470;
CONST ORD_GPI32QUERYPS                  = 471;
CONST ORD_GPI32QUERYPAGEVIEWPORT        = 472;
CONST ORD_GPI32QUERYPATTERN             = 473;
CONST ORD_GPI32QUERYPATTERNREFPOINT     = 474;
CONST ORD_GPI32QUERYPATTERNSET          = 475;
CONST ORD_GPI32QUERYPEL                 = 476;
CONST ORD_GPI32QUERYPICKAPERTUREPOSITION= 477;
CONST ORD_GPI32QUERYPICKAPERTURESIZE    = 478;
CONST ORD_GPI32QUERYRGBCOLOR            = 479;
CONST ORD_GPI32QUERYREALCOLORS          = 480;
CONST ORD_GPI32QUERYREGIONBOX           = 481;
CONST ORD_GPI32QUERYSEGMENTATTRS        = 482;
CONST ORD_GPI32QUERYSEGMENTNAMES        = 483;
CONST ORD_GPI32QUERYSEGMENTPRIORITY     = 484;
CONST ORD_GPI32QUERYSEGMENTTRANSFORMMATR= 485;
CONST ORD_GPI32QUERYSETIDS              = 486;
CONST ORD_GPI32QUERYSTOPDRAW            = 487;
CONST ORD_GPI32QUERYTAG                 = 488;
CONST ORD_GPI32QUERYTEXTBOX             = 489;
CONST ORD_GPI32QUERYVIEWINGLIMITS       = 490;
CONST ORD_GPI32QUERYVIEWINGTRANSFORMMATR= 491;
CONST ORD_GPI32QUERYWIDTHTABLE          = 492;
CONST ORD_GPI32RECTINREGION             = 494;
CONST ORD_GPI32RECTVISIBLE              = 495;
CONST ORD_GPI32REMOVEDYNAMICS           = 496;
CONST ORD_GPI32RESETBOUNDARYDATA        = 497;
CONST ORD_GPI32RESETPS                  = 498;
CONST ORD_GPI32RESTOREPS                = 499;
CONST ORD_GPI32SAVEMETAFILE             = 500;
CONST ORD_GPI32SAVEPS                   = 501;
CONST ORD_GPI32SETARCPARAMS             = 502;
CONST ORD_GPI32SETATTRMODE              = 503;
CONST ORD_GPI32SETBACKCOLOR             = 504;
CONST ORD_GPI32SETBACKMIX               = 505;
CONST ORD_GPI32SETBITMAP                = 506;
CONST ORD_GPI32SETBITMAPDIMENSION       = 507;
CONST ORD_GPI32SETBITMAPID              = 508;
CONST ORD_GPI32SETCHARANGLE             = 509;
CONST ORD_GPI32SETCHARBOX               = 510;
CONST ORD_GPI32SETCHARDIRECTION         = 511;
CONST ORD_GPI32SETCHARMODE              = 512;
CONST ORD_GPI32SETCHARSET               = 513;
CONST ORD_GPI32SETCHARSHEAR             = 514;
CONST ORD_GPI32SETCLIPPATH              = 515;
CONST ORD_GPI32SETCLIPREGION            = 516;
CONST ORD_GPI32SETCOLOR                 = 517;
CONST ORD_GPI32SETCP                    = 518;
CONST ORD_GPI32SETCURRENTPOSITION       = 519;
CONST ORD_GPI32SETDEFAULTVIEWMATRIX     = 520;
CONST ORD_GPI32SETDRAWCONTROL           = 521;
CONST ORD_GPI32SETDRAWINGMODE           = 522;
CONST ORD_GPI32SETEDITMODE              = 523;
CONST ORD_GPI32SETELEMENTPOINTER        = 524;
CONST ORD_GPI32SETELEMENTPOINTERATLABEL = 525;
CONST ORD_GPI32SETGRAPHICSFIELD         = 526;
CONST ORD_GPI32SETINITIALSEGMENTATTRS   = 527;
CONST ORD_GPI32SETLINEEND               = 528;
CONST ORD_GPI32SETLINEJOIN              = 529;
CONST ORD_GPI32SETLINETYPE              = 530;
CONST ORD_GPI32SETLINEWIDTH             = 531;
CONST ORD_GPI32SETLINEWIDTHGEOM         = 532;
CONST ORD_GPI32SETMARKER                = 533;
CONST ORD_GPI32SETMARKERBOX             = 534;
CONST ORD_GPI32SETMARKERSET             = 535;
CONST ORD_GPI32SETMETAFILEBITS          = 536;
CONST ORD_GPI32SETMIX                   = 537;
CONST ORD_GPI32SETMODELTRANSFORMMATRIX  = 538;
CONST ORD_GPI32SETPS                    = 539;
CONST ORD_GPI32SETPAGEVIEWPORT          = 540;
CONST ORD_GPI32SETPATTERN               = 541;
CONST ORD_GPI32SETPATTERNREFPOINT       = 542;
CONST ORD_GPI32SETPATTERNSET            = 543;
CONST ORD_GPI32SETPEL                   = 544;
CONST ORD_GPI32SETPICKAPERTUREPOSITION  = 545;
CONST ORD_GPI32SETREGION                = 546;
CONST ORD_GPI32SETSEGMENTATTRS          = 547;
CONST ORD_GPI32SETSEGMENTPRIORITY       = 548;
CONST ORD_GPI32SETSEGMENTTRANSFORMMATRIX= 549;
CONST ORD_GPI32SETSTOPDRAW              = 550;
CONST ORD_GPI32SETTAG                   = 551;
CONST ORD_GPI32SETVIEWINGLIMITS         = 552;
CONST ORD_GPI32SETVIEWINGTRANSFORMMATRIX= 553;
CONST ORD_GPI32STROKEPATH               = 554;
CONST ORD_GPI32UNLOADFONTS              = 555;
CONST ORD_GPI32WCBITBLT                 = 557;
CONST ORD_GPI32POLYLINEDISJOINT         = 558;
CONST ORD_GPI32PATHTOREGION             = 559;
CONST ORD_GPI32FLOODFILL                = 560;
CONST ORD_GPI32SUSPENDPLAY              = 561;
CONST ORD_GPI32RESUMEPLAY               = 562;
CONST ORD_GPI32OUTLINEPATH              = 563;
CONST ORD_GPI32TRANSLATE                = 564;
CONST ORD_GPI32SCALE                    = 565;
CONST ORD_GPI32ROTATE                   = 566;
CONST ORD_GPI32QUERYDEFARCPARAMS        = 567;
CONST ORD_GPI32QUERYDEFTAG              = 568;
CONST ORD_GPI32QUERYDEFVIEWINGLIMITS    = 569;
CONST ORD_GPI32SETDEFARCPARAMS          = 570;
CONST ORD_GPI32SETDEFTAG                = 571;
CONST ORD_GPI32SETDEFVIEWINGLIMITS      = 572;
CONST ORD_GPI32QUERYBITMAPPARAMETERS    = 573;
CONST ORD_GPI32QUERYLOGICALFONT         = 574;
CONST ORD_GPI32QUERYFACESTRING          = 575;
CONST ORD_GPI32QUERYFONTACTION          = 576;
CONST ORD_GPI32DELETEPALETTE            = 577;
CONST ORD_GPI32SELECTPALETTE            = 578;
CONST ORD_GPI32QUERYPALETTE             = 579;
CONST ORD_GPI32CHARSTRINGPOS            = 580;
CONST ORD_GPI32CHARSTRINGPOSAT          = 581;
CONST ORD_GPI32CORRELATESEGMENT         = 582;
CONST ORD_GPI32QUERYATTRS               = 583;
CONST ORD_GPI32QUERYCHARSTRINGPOS       = 584;
CONST ORD_GPI32QUERYCHARSTRINGPOSAT     = 585;
CONST ORD_GPI32QUERYFONTS               = 586;
CONST ORD_GPI32QUERYREGIONRECTS         = 587;
CONST ORD_GPI32SETATTRS                 = 588;
CONST ORD_GPI32SETPICKAPERTURESIZE      = 589;
CONST ORD_GPI32QUERYDEFATTRS            = 590;
CONST ORD_GPI32SETDEFATTRS              = 591;
CONST ORD_GPI32CREATELOGCOLORTABLE      = 592;
CONST ORD_GPI32QUERYLOGCOLORTABLE       = 593;
CONST ORD_GPI32CREATEPALETTE            = 594;
CONST ORD_GPI32ANIMATEPALETTE           = 595;
CONST ORD_GPI32SETPALETTEENTRIES        = 596;
CONST ORD_GPI32QUERYPALETTEINFO         = 597;
CONST ORD_GPI32CREATEBITMAP             = 598;
CONST ORD_GPI32QUERYBITMAPBITS          = 599;
CONST ORD_GPI32QUERYBITMAPINFOHEADER    = 601;
CONST ORD_GPI32SETBITMAPBITS            = 602;
CONST ORD_GPI32DRAWBITS                 = 603;
CONST ORD_DEV32CLOSEDC                  = 604;
CONST ORD_DEV32ESCAPE                   = 605;
CONST ORD_DEV32QUERYCAPS                = 606;
CONST ORD_DEV32QUERYDEVICENAMES         = 607;
CONST ORD_DEV32QUERYHARDCOPYCAPS        = 608;
CONST ORD_DEV32POSTDEVICEMODES          = 609;
CONST ORD_DEV32OPENDC                   = 610;
CONST ORD_GPI32DESTROYREGION            = 611;
CONST ORD_GPI32PARTIALARC               = 612;
CONST ORD_GPI32QUERYCHAREXTRA           = 613;
CONST ORD_GPI32SETCHAREXTRA             = 614;
CONST ORD_GPI32QUERYCHARBREAKEXTRA      = 615;
CONST ORD_GPI32SETCHARBREAKEXTRA        = 616;
CONST ORD_GPI32FRAMEREGION              = 617;
CONST ORD_GPI32CONVERTWITHMATRIX        = 618;
CONST ORD_GPI32LOADPUBLICFONTS          = 622;
CONST ORD_GPI32UNLOADPUBLICFONTS        = 623;
(* PMWIN *)
CONST ORD_WINQUERYDESKTOPWINDOW       = 1;
CONST ORD_WINQUERYOBJECTWINDOW        = 2;
CONST ORD_WINREGISTERCLASS            = 3;
CONST ORD_WINQUERYCLASSNAME           = 4;
CONST ORD_WINQUERYCLASSINFO           = 5;
CONST ORD_WINCREATEWINDOW             = 6;
CONST ORD_WINDESTROYWINDOW            = 7;
CONST ORD_WINSETWINDOWPOS             = 8;
CONST ORD_WINSETMULTWINDOWPOS         = 9;
CONST ORD_WINQUERYWINDOWPOS           = 10;
CONST ORD_WINENABLEWINDOW             = 11;
CONST ORD_WINISWINDOWENABLED          = 12;
CONST ORD_WINSHOWWINDOW               = 13;
CONST ORD_WINENABLEWINDOWUPDATE       = 14;
CONST ORD_WINISWINDOWVISIBLE          = 15;
CONST ORD_WINSETWINDOWTEXT            = 16;
CONST ORD_WINQUERYWINDOWTEXT          = 17;
CONST ORD_WINQUERYWINDOWTEXTLENGTH    = 18;
CONST ORD_WINWINDOWFROMID             = 19;
CONST ORD_WINMULTWINDOWFROMIDS        = 20;
CONST ORD_WINISWINDOW                 = 21;
CONST ORD_WINISCHILD                  = 22;
CONST ORD_WINSETPARENT                = 23;
CONST ORD_WINSETOWNER                 = 24;
CONST ORD_WINQUERYWINDOW              = 25;
CONST ORD_WINQUERYWINDOWRECT          = 26;
CONST ORD_WINQUERYWINDOWPROCESS       = 27;
CONST ORD_WINSETWINDOWUSHORT          = 28;
CONST ORD_WINQUERYWINDOWUSHORT        = 29;
CONST ORD_WINSETWINDOWULONG           = 30;
CONST ORD_WINQUERYWINDOWULONG         = 31;
CONST ORD_WINBEGINENUMWINDOWS         = 32;
CONST ORD_WINGETNEXTWINDOW            = 33;
CONST ORD_WINENDENUMWINDOWS           = 34;
CONST ORD_WINWINDOWFROMPOINT          = 35;
CONST ORD_WINMAPWINDOWPOINTS          = 36;
CONST ORD_WINSUBCLASSWINDOW           = 37;
CONST ORD_WINLOCKWINDOW               = 38;
CONST ORD_WINQUERYWINDOWLOCKCOUNT     = 39;
CONST ORD_WINREGISTERWINDOWDESTROY    = 40;
CONST ORD_WINOPENWINDOWDC             = 41;
CONST ORD_WINGETSCREENPS              = 42;
CONST ORD_WINGETPS                    = 43;
CONST ORD_WINRELEASEPS                = 44;
CONST ORD_WINBEGINPAINT               = 45;
CONST ORD_WINENDPAINT                 = 46;
CONST ORD_WININVALIDATERECT           = 47;
CONST ORD_WININVALIDATEREGION         = 48;
CONST ORD_WINVALIDATERECT             = 49;
CONST ORD_WINVALIDATEREGION           = 50;
CONST ORD_WINQUERYUPDATERECT          = 51;
CONST ORD_WINQUERYUPDATEREGION        = 52;
CONST ORD_WINUPDATEWINDOW             = 53;
CONST ORD_WINEXCLUDEUPDATEREGION      = 54;
CONST ORD_WINLOCKWINDOWUPDATE         = 55;
CONST ORD_WINLOCKVISREGIONS           = 56;
CONST ORD_WINWINDOWFROMDC             = 57;
CONST ORD_WINCREATEMSGQUEUE           = 58;
CONST ORD_WINDESTROYMSGQUEUE          = 59;
CONST ORD_WINQUERYQUEUESTATUS         = 60;
CONST ORD_WINSENDMSG                  = 61;
CONST ORD_WINBROADCASTMSG             = 63;
CONST ORD_WININSENDMSG                = 64;
CONST ORD_WINGETMSG                   = 65;
CONST ORD_WINPEEKMSG                  = 66;
CONST ORD_WINWAITMSG                  = 67;
CONST ORD_WINDISPATCHMSG              = 68;
CONST ORD_WINPOSTMSG                  = 69;
CONST ORD_WINPOSTQUEUEMSG             = 70;
CONST ORD_WINQUERYMSGPOS              = 71;
CONST ORD_WINQUERYMSGTIME             = 72;
CONST ORD_WINCALLMSGFILTER            = 73;
CONST ORD_WINSETMSGINTEREST           = 74;
CONST ORD_WINSETCAPTURE               = 75;
CONST ORD_WINQUERYCAPTURE             = 76;
CONST ORD_WINSETFOCUS                 = 77;
CONST ORD_WINQUERYFOCUS               = 78;
CONST ORD_WINSETACTIVEWINDOW          = 79;
CONST ORD_WINQUERYACTIVEWINDOW        = 80;
CONST ORD_WINSETSYSMODALWINDOW        = 81;
CONST ORD_WINQUERYSYSMODALWINDOW      = 82;
CONST ORD_WINISTHREADACTIVE           = 83;
CONST ORD_WINSTARTTIMER               = 84;
CONST ORD_WINSTOPTIMER                = 85;
CONST ORD_WINGETCURRENTTIME           = 86;
CONST ORD_WINLOADPOINTER              = 87;
CONST ORD_WINCREATEPOINTER            = 88;
CONST ORD_WINDESTROYPOINTER           = 89;
CONST ORD_OLDWINQUERYPOINTERINFO      = 90;
CONST ORD_WINQUERYSYSPOINTER          = 91;
CONST ORD_WINSETPOINTER               = 92;
CONST ORD_WINQUERYPOINTER             = 93;
CONST ORD_WINSHOWPOINTER              = 94;
CONST ORD_WINSETPOINTERPOS            = 95;
CONST ORD_WINQUERYPOINTERPOS          = 96;
CONST ORD_WINGETSYSBITMAP             = 97;
CONST ORD_WINCREATECURSOR             = 98;
CONST ORD_WINDESTROYCURSOR            = 99;
CONST ORD_WINSHOWCURSOR               = 100;
CONST ORD_WINQUERYCURSORINFO          = 101;
CONST ORD_WINLOADACCELTABLE           = 102;
CONST ORD_WINCREATEACCELTABLE         = 103;
CONST ORD_WINDESTROYACCELTABLE        = 104;
CONST ORD_WINTRANSLATEACCEL           = 105;
CONST ORD_WINSETACCELTABLE            = 106;
CONST ORD_WINQUERYACCELTABLE          = 107;
CONST ORD_WINCOPYACCELTABLE           = 108;
CONST ORD_WINSETHOOK                  = 109;
CONST ORD_WINRELEASEHOOK              = 110;
CONST ORD_WINOPENCLIPBRD              = 111;
CONST ORD_WINCLOSECLIPBRD             = 112;
CONST ORD_WINEMPTYCLIPBRD             = 113;
CONST ORD_WINSETCLIPBRDOWNER          = 114;
CONST ORD_WINQUERYCLIPBRDOWNER        = 115;
CONST ORD_WINSETCLIPBRDDATA           = 116;
CONST ORD_WINQUERYCLIPBRDDATA         = 117;
CONST ORD_WINENUMCLIPBRDFMTS          = 118;
CONST ORD_WINQUERYCLIPBRDFMTINFO      = 119;
CONST ORD_WINSETCLIPBRDVIEWER         = 120;
CONST ORD_WINQUERYCLIPBRDVIEWER       = 121;
CONST ORD_WINLOADDLG                  = 122;
CONST ORD_WINCREATEDLG                = 123;
CONST ORD_WINPROCESSDLG               = 124;
CONST ORD_WINDLGBOX                   = 125;
CONST ORD_WINDISMISSDLG               = 126;
CONST ORD_WINSENDDLGITEMMSG           = 127;
CONST ORD_WINSETDLGITEMSHORT          = 128;
CONST ORD_WINQUERYDLGITEMSHORT        = 129;
CONST ORD_WINMAPDLGPOINTS             = 130;
CONST ORD_WINSUBSTITUTESTRINGS        = 132;
CONST ORD_WINENUMDLGITEM              = 133;
CONST ORD_WINSETDLGITEMTEXT           = 134;
CONST ORD_WINQUERYDLGITEMTEXT         = 135;
CONST ORD_WINLOADMENU                 = 136;
CONST ORD_WINCREATEMENU               = 137;
CONST ORD_WINALARM                    = 138;
CONST ORD_WINMESSAGEBOX               = 139;
CONST ORD_WINCREATESTDWINDOW          = 140;
CONST ORD_WINCREATEFRAMECONTROLS      = 141;
CONST ORD_WINCALCFRAMERECT            = 143;
CONST ORD_WINFLASHWINDOW              = 144;
CONST ORD_WINGETMINPOSITION           = 146;
CONST ORD_WINGETMAXPOSITION           = 147;
CONST ORD_WINQUERYSYSVALUE            = 149;
CONST ORD_WINSETSYSVALUE              = 150;
CONST ORD_WINSETSYSCOLORS             = 151;
CONST ORD_WINQUERYSYSCOLOR            = 152;
CONST ORD_WINSCROLLWINDOW             = 153;
CONST ORD_WINTRACKRECT                = 154;
CONST ORD_WINSHOWTRACKRECT            = 155;
CONST ORD_GPILOADBITMAP               = 156;
CONST ORD_WINLOADSTRING               = 157;
CONST ORD_WINLOADMESSAGE              = 158;
CONST ORD_WINSETRECTEMPTY             = 159;
CONST ORD_WINSETRECT                  = 160;
CONST ORD_WINCOPYRECT                 = 161;
CONST ORD_WINISRECTEMPTY              = 162;
CONST ORD_WINEQUALRECT                = 163;
CONST ORD_WINPTINRECT                 = 164;
CONST ORD_WINOFFSETRECT               = 165;
CONST ORD_WININFLATERECT              = 166;
CONST ORD_WININTERSECTRECT            = 167;
CONST ORD_WINUNIONRECT                = 168;
CONST ORD_WINSUBTRACTRECT             = 169;
CONST ORD_WINMAKERECT                 = 170;
CONST ORD_WINMAKEPOINTS               = 171;
CONST ORD_WININVERTRECT               = 172;
CONST ORD_WINFILLRECT                 = 173;
CONST ORD_KBDPACKET                   = 174;
CONST ORD_WINDRAWPOINTER              = 177;
CONST ORD_WINDEFWINDOWPROC            = 178;
CONST ORD_WINDEFDLGPROC               = 179;
CONST ORD_WINGETKEYSTATE              = 211;
CONST ORD_WINGETPHYSKEYSTATE          = 212;
CONST ORD_WINSETKEYBOARDSTATETABLE    = 213;
CONST ORD_WINENABLEPHYSINPUT          = 214;
CONST ORD_WINSETCP                    = 215;
CONST ORD_WINQUERYCP                  = 216;
CONST ORD_WINQUERYCPLIST              = 217;
CONST ORD_WINCPTRANSLATESTRING        = 218;
CONST ORD_WINCPTRANSLATECHAR          = 219;
CONST ORD_WINCOMPARESTRINGS           = 220;
CONST ORD_WINUPPER                    = 221;
CONST ORD_WINUPPERCHAR                = 222;
CONST ORD_WINNEXTCHAR                 = 223;
CONST ORD_WINPREVCHAR                 = 224;
CONST ORD_WINCREATEHEAP               = 225;
CONST ORD_WINDESTROYHEAP              = 226;
CONST ORD_WINAVAILMEM                 = 227;
CONST ORD_WINALLOCMEM                 = 228;
CONST ORD_WINREALLOCMEM               = 229;
CONST ORD_WINFREEMEM                  = 230;
CONST ORD_WINLOCKHEAP                 = 231;
CONST ORD_WINCREATEATOMTABLE          = 233;
CONST ORD_WINDESTROYATOMTABLE         = 234;
CONST ORD_WINADDATOM                  = 235;
CONST ORD_WINFINDATOM                 = 236;
CONST ORD_WINDELETEATOM               = 237;
CONST ORD_WINQUERYATOMUSAGE           = 238;
CONST ORD_WINQUERYATOMLENGTH          = 239;
CONST ORD_WINQUERYATOMNAME            = 240;
CONST ORD_WINQUERYSYSTEMATOMTABLE     = 241;
CONST ORD_WINGETLASTERROR             = 243;
CONST ORD_WINGETERRORINFO             = 244;
CONST ORD_WINFREEERRORINFO            = 245;
CONST ORD_WININITIALIZE               = 246;
CONST ORD_WINTERMINATE                = 247;
CONST ORD_WINCATCH                    = 248;
CONST ORD_WINTHROW                    = 249;
CONST ORD_WINQUERYVERSION             = 250;
CONST ORD__WINSETERRORINFO            = 263;
CONST ORD_WINISPHYSINPUTENABLED       = 264;
CONST ORD_WINQUERYWINDOWDC            = 265;
CONST ORD_WINDRAWBORDER               = 266;
CONST ORD_WINDRAWTEXT                 = 267;
CONST ORD_WINDRAWBITMAP               = 268;
CONST ORD_WINQUERYWINDOWPTR           = 269;
CONST ORD_WINSETWINDOWPTR             = 270;
CONST ORD_WINMSGSEMWAIT               = 274;
CONST ORD_WINMSGMUXSEMWAIT            = 275;
CONST ORD_WINCANCELSHUTDOWN           = 277;
CONST ORD_WINSETWINDOWBITS            = 278;
CONST ORD_WINGETCLIPPS                = 279;
CONST ORD_WINSAVEWINDOWPOS            = 285;
CONST ORD_WINFOCUSCHANGE              = 286;
CONST ORD_WINQUERYQUEUEINFO           = 287;
CONST ORD_WINSETCLASSMSGINTEREST      = 292;
CONST ORD_WINQUERYDLGITEMTEXTLENGTH   = 294;
CONST ORD_WINDDEINITIATE              = 297;
CONST ORD_WINDDERESPOND               = 298;
CONST ORD_WINDDEPOSTMSG               = 299;
CONST ORD_WINSETPRESPARAM             = 301;
CONST ORD_WINQUERYPRESPARAM           = 302;
CONST ORD_WINREMOVEPRESPARAM          = 303;
CONST  ORD_DUMWINCREATEHELPINSTANCE   = 311;
CONST  ORD_DUMWINDESTROYHELPINSTANCE  = 312;
CONST  ORD_DUMWINASSOCIATEHELPINSTANCE= 313;
CONST  ORD_DUMWINCREATEHELPTABLE      = 314;
CONST  ORD_DUMWINLOADHELPTABLE        = 315;
CONST  ORD_DUMWINQUERYHELPINSTANCE    = 316;
CONST  ORD_DUMMYHELPENTRY             = 322;
CONST  ORD_WINSETCLASSTHUNKPROC       = 959;
CONST  ORD_WINQUERYCLASSTHUNKPROC     = 960;
CONST  ORD_WINSETWINDOWTHUNKPROC      = 961;
CONST  ORD_WINQUERYWINDOWTHUNKPROC    = 962;
CONST ORD_WINQUERYWINDOWMODEL         = 317;
CONST ORD_WINSETDESKTOPBKGND          = 318;
CONST ORD_WINQUERYDESKTOPBKGND        = 319;
CONST ORD_WINPOPUPMENU                = 320;
CONST ORD_WINREALIZEPALETTE           = 321;
CONST ORD_WINDELETELIBRARY            = 602;
CONST ORD_WINLOADPROCEDURE            = 603;
CONST ORD_WINDELETEPROCEDURE          = 604;
CONST ORD_WINSETMSGMODE               = 605;
CONST ORD_WINSETSYNCHROMODE           = 606;
CONST ORD_WINGETDLGMSG                = 607;
CONST ORD_WINREGISTERUSERMSG          = 608;
CONST ORD_WINQUERYANCHORBLOCK         = 609;
CONST ORD_WINREGISTERUSERDATATYPE     = 612;
CONST ORD_WINISWINDOWSHOWING          = 614;
CONST ORD_WINLOADLIBRARY              = 615;
CONST ORD_WINCREATEPOINTERINDIRECT    = 616;
CONST ORD_WINQUERYPOINTERINFO         = 617;
CONST ORD_WINGETERASEPS               = 624;
CONST ORD_WINRELEASEERASEPS           = 625;
CONST ORD_WINSTRETCHPOINTER           = 632;
CONST ORD_WINSETPOINTEROWNER          = 633;
CONST ORD_WIN32ADDATOM                = 700;
CONST ORD_WIN32ALARM                  = 701;
CONST ORD_WIN32BEGINENUMWINDOWS       = 702;
CONST ORD_WIN32BEGINPAINT             = 703;
CONST ORD_WIN32CALCFRAMERECT          = 704;
CONST ORD_WIN32CANCELSHUTDOWN         = 705;
CONST ORD_WIN32CLOSECLIPBRD           = 707;
CONST ORD_WIN32COMPARESTRINGS         = 708;
CONST ORD_WIN32COPYACCELTABLE         = 709;
CONST ORD_WIN32COPYRECT               = 710;
CONST ORD_WIN32CPTRANSLATECHAR        = 711;
CONST ORD_WIN32CPTRANSLATESTRING      = 712;
CONST ORD_WIN32CREATEACCELTABLE       = 713;
CONST ORD_WIN32CREATEATOMTABLE        = 714;
CONST ORD_WIN32CREATECURSOR           = 715;
CONST ORD_WIN32CREATEMSGQUEUE         = 716;
CONST ORD_WIN32CREATEPOINTER          = 717;
CONST ORD_WIN32DDEINITIATE            = 718;
CONST ORD_WIN32DDEPOSTMSG             = 719;
CONST ORD_WIN32DDERESPOND             = 720;
CONST ORD_WIN32DELETEATOM             = 721;
CONST ORD_WIN32DELETELIBRARY          = 722;
CONST ORD_WIN32DESTROYACCELTABLE      = 723;
CONST ORD_WIN32DESTROYATOMTABLE       = 724;
CONST ORD_WIN32DESTROYCURSOR          = 725;
CONST ORD_WIN32DESTROYMSGQUEUE        = 726;
CONST ORD_WIN32DESTROYPOINTER         = 727;
CONST ORD_WIN32DESTROYWINDOW          = 728;
CONST ORD_WIN32DISMISSDLG             = 729;
CONST ORD_WIN32DRAWBITMAP             = 730;
CONST ORD_WIN32DRAWBORDER             = 731;
CONST ORD_WIN32DRAWPOINTER            = 732;
CONST ORD_WIN32EMPTYCLIPBRD           = 733;
CONST ORD_WIN32ENABLEPHYSINPUT        = 734;
CONST ORD_WIN32ENABLEWINDOW           = 735;
CONST ORD_WIN32ENABLEWINDOWUPDATE     = 736;
CONST ORD_WIN32ENDENUMWINDOWS         = 737;
CONST ORD_WIN32ENDPAINT               = 738;
CONST ORD_WIN32ENUMCLIPBRDFMTS        = 739;
CONST ORD_WIN32ENUMDLGITEM            = 740;
CONST ORD_WIN32EQUALRECT              = 741;
CONST ORD_WIN32EXCLUDEUPDATEREGION    = 742;
CONST ORD_WIN32FILLRECT               = 743;
CONST ORD_WIN32FINDATOM               = 744;
CONST ORD_WIN32FLASHWINDOW            = 745;
CONST ORD_WIN32FOCUSCHANGE            = 746;
CONST ORD_WIN32FREEERRORINFO          = 748;
CONST ORD_WIN32GETCLIPPS              = 749;
CONST ORD_WIN32GETCURRENTTIME         = 750;
CONST ORD_WIN32GETERRORINFO           = 751;
CONST ORD_WIN32GETKEYSTATE            = 752;
CONST ORD_WIN32GETLASTERROR           = 753;
CONST ORD_WIN32GETMAXPOSITION         = 754;
CONST ORD_WIN32GETMINPOSITION         = 755;
CONST ORD_WIN32GETNEXTWINDOW          = 756;
CONST ORD_WIN32GETPS                  = 757;
CONST ORD_WIN32GETPHYSKEYSTATE        = 758;
CONST ORD_WIN32GETSCREENPS            = 759;
CONST ORD_WIN32GETSYSBITMAP           = 760;
CONST ORD_WIN32INSENDMSG              = 761;
CONST ORD_WIN32INFLATERECT            = 762;
CONST ORD_WIN32INITIALIZE             = 763;
CONST ORD_WIN32INTERSECTRECT          = 764;
CONST ORD_WIN32INVALIDATERECT         = 765;
CONST ORD_WIN32INVALIDATEREGION       = 766;
CONST ORD_WIN32INVERTRECT             = 767;
CONST ORD_WIN32ISCHILD                = 768;
CONST ORD_WIN32ISPHYSINPUTENABLED     = 769;
CONST ORD_WIN32ISRECTEMPTY            = 770;
CONST ORD_WIN32ISTHREADACTIVE         = 771;
CONST ORD_WIN32ISWINDOW               = 772;
CONST ORD_WIN32ISWINDOWENABLED        = 773;
CONST ORD_WIN32ISWINDOWSHOWING        = 774;
CONST ORD_WIN32ISWINDOWVISIBLE        = 775;
CONST ORD_WIN32LOADACCELTABLE         = 776;
CONST ORD_WIN32LOADLIBRARY            = 777;
CONST ORD_WIN32LOADMENU               = 778;
CONST ORD_WIN32LOADMESSAGE            = 779;
CONST ORD_WIN32LOADPOINTER            = 780;
CONST ORD_WIN32LOADSTRING             = 781;
CONST ORD_WIN32LOCKVISREGIONS         = 782;
CONST ORD_WIN32LOCKWINDOWUPDATE       = 784;
CONST ORD_WIN32MAKEPOINTS             = 785;
CONST ORD_WIN32MAKERECT               = 786;
CONST ORD_WIN32MAPDLGPOINTS           = 787;
CONST ORD_WIN32MAPWINDOWPOINTS        = 788;
CONST ORD_WIN32MESSAGEBOX             = 789;
CONST ORD_WIN32MSGSEMWAIT             = 790;
CONST ORD_WIN32NEXTCHAR               = 791;
CONST ORD_WIN32OFFSETRECT             = 792;
CONST ORD_WIN32OPENCLIPBRD            = 793;
CONST ORD_WIN32OPENWINDOWDC           = 794;
CONST ORD_WIN32PREVCHAR               = 795;
CONST ORD_WIN32PROCESSDLG             = 796;
CONST ORD_WIN32PTINRECT               = 797;
CONST ORD_WIN32QUERYACCELTABLE        = 798;
CONST ORD_WIN32QUERYACTIVEWINDOW      = 799;
CONST ORD_WIN32QUERYANCHORBLOCK       = 800;
CONST ORD_WIN32QUERYATOMLENGTH        = 801;
CONST ORD_WIN32QUERYATOMNAME          = 802;
CONST ORD_WIN32QUERYATOMUSAGE         = 803;
CONST ORD_WIN32QUERYCAPTURE           = 804;
CONST ORD_WIN32QUERYCLASSNAME         = 805;
CONST ORD_WIN32QUERYCLIPBRDDATA       = 806;
CONST ORD_WIN32QUERYCLIPBRDFMTINFO    = 807;
CONST ORD_WIN32QUERYCLIPBRDOWNER      = 808;
CONST ORD_WIN32QUERYCLIPBRDVIEWER     = 809;
CONST ORD_WIN32QUERYCP                = 810;
CONST ORD_WIN32QUERYCPLIST            = 811;
CONST ORD_WIN32QUERYCURSORINFO        = 812;
CONST ORD_WIN32QUERYDESKTOPWINDOW     = 813;
CONST ORD_WIN32QUERYDLGITEMSHORT      = 814;
CONST ORD_WIN32QUERYDLGITEMTEXT       = 815;
CONST ORD_WIN32QUERYDLGITEMTEXTLENGTH = 816;
CONST ORD_WIN32QUERYFOCUS             = 817;
CONST ORD_WIN32QUERYMSGPOS            = 818;
CONST ORD_WIN32QUERYMSGTIME           = 819;
CONST ORD_WIN32QUERYOBJECTWINDOW      = 820;
CONST ORD_WIN32QUERYPOINTER           = 821;
CONST ORD_WIN32QUERYPOINTERINFO       = 822;
CONST ORD_WIN32QUERYPOINTERPOS        = 823;
CONST ORD_WIN32QUERYQUEUEINFO         = 824;
CONST ORD_WIN32QUERYQUEUESTATUS       = 825;
CONST ORD_WIN32QUERYSYSCOLOR          = 826;
CONST ORD_WIN32QUERYSYSMODALWINDOW    = 827;
CONST ORD_WIN32QUERYSYSPOINTER        = 828;
CONST ORD_WIN32QUERYSYSVALUE          = 829;
CONST ORD_WIN32QUERYSYSTEMATOMTABLE   = 830;
CONST ORD_WIN32QUERYUPDATERECT        = 831;
CONST ORD_WIN32QUERYUPDATEREGION      = 832;
CONST ORD_WIN32QUERYVERSION           = 833;
CONST ORD_WIN32QUERYWINDOW            = 834;
CONST ORD_WIN32QUERYWINDOWDC          = 835;
CONST ORD_WIN32QUERYWINDOWPOS         = 837;
CONST ORD_WIN32QUERYWINDOWPROCESS     = 838;
CONST ORD_WIN32QUERYWINDOWPTR         = 839;
CONST ORD_WIN32QUERYWINDOWRECT        = 840;
CONST ORD_WIN32QUERYWINDOWTEXT        = 841;
CONST ORD_WIN32QUERYWINDOWTEXTLENGTH  = 842;
CONST ORD_WIN32QUERYWINDOWULONG       = 843;
CONST ORD_WIN32QUERYWINDOWUSHORT      = 844;
CONST ORD_WIN32REGISTERUSERDATATYPE   = 845;
CONST ORD_WIN32REGISTERUSERMSG        = 846;
CONST ORD_WIN32RELEASEPS              = 848;
CONST ORD_WIN32SCROLLWINDOW           = 849;
CONST ORD_WIN32SETACCELTABLE          = 850;
CONST ORD_WIN32SETACTIVEWINDOW        = 851;
CONST ORD_WIN32SETCAPTURE             = 852;
CONST ORD_WIN32SETCLASSMSGINTEREST    = 853;
CONST ORD_WIN32SETCLIPBRDDATA         = 854;
CONST ORD_WIN32SETCLIPBRDOWNER        = 855;
CONST ORD_WIN32SETCLIPBRDVIEWER       = 856;
CONST ORD_WIN32SETCP                  = 857;
CONST ORD_WIN32SETDLGITEMSHORT        = 858;
CONST ORD_WIN32SETDLGITEMTEXT         = 859;
CONST ORD_WIN32SETFOCUS               = 860;
CONST ORD_WIN32SETMSGINTEREST         = 861;
CONST ORD_WIN32SETMSGMODE             = 862;
CONST ORD_WIN32SETMULTWINDOWPOS       = 863;
CONST ORD_WIN32SETOWNER               = 864;
CONST ORD_WIN32SETPARENT              = 865;
CONST ORD_WIN32SETPOINTER             = 866;
CONST ORD_WIN32SETPOINTERPOS          = 867;
CONST ORD_WIN32SETRECT                = 868;
CONST ORD_WIN32SETRECTEMPTY           = 869;
CONST ORD_WIN32SETSYNCHROMODE         = 870;
CONST ORD_WIN32SETSYSCOLORS           = 871;
CONST ORD_WIN32SETSYSMODALWINDOW      = 872;
CONST ORD_WIN32SETSYSVALUE            = 873;
CONST ORD_WIN32SETWINDOWBITS          = 874;
CONST ORD_WIN32SETWINDOWPOS           = 875;
CONST ORD_WIN32SETWINDOWPTR           = 876;
CONST ORD_WIN32SETWINDOWTEXT          = 877;
CONST ORD_WIN32SETWINDOWULONG         = 878;
CONST ORD_WIN32SETWINDOWUSHORT        = 879;
CONST ORD_WIN32SHOWCURSOR             = 880;
CONST ORD_WIN32SHOWPOINTER            = 881;
CONST ORD_WIN32SHOWTRACKRECT          = 882;
CONST ORD_WIN32SHOWWINDOW             = 883;
CONST ORD_WIN32STARTTIMER             = 884;
CONST ORD_WIN32STOPTIMER              = 885;
CONST ORD_WIN32SUBSTITUTESTRINGS      = 886;
CONST ORD_WIN32SUBTRACTRECT           = 887;
CONST ORD_WIN32TERMINATE              = 888;
CONST ORD_WIN32TRACKRECT              = 890;
CONST ORD_WIN32UNIONRECT              = 891;
CONST ORD_WIN32UPDATEWINDOW           = 892;
CONST ORD_WIN32UPPER                  = 893;
CONST ORD_WIN32UPPERCHAR              = 894;
CONST ORD_WIN32VALIDATERECT           = 895;
CONST ORD_WIN32VALIDATEREGION         = 896;
CONST ORD_WIN32WAITMSG                = 897;
CONST ORD_WIN32WINDOWFROMDC           = 898;
CONST ORD_WIN32WINDOWFROMID           = 899;
CONST ORD_WIN32WINDOWFROMPOINT        = 900;
CONST ORD_WIN32BROADCASTMSG           = 901;
CONST ORD_WIN32POSTQUEUEMSG           = 902;
CONST ORD_WIN32SENDDLGITEMMSG         = 903;
CONST ORD_WIN32TRANSLATEACCEL         = 904;
CONST ORD_WIN32CALLMSGFILTER          = 905;
CONST ORD_WIN32CREATEFRAMECONTROLS    = 906;
CONST ORD_WIN32CREATEMENU             = 907;
CONST ORD_WIN32CREATESTDWINDOW        = 908;
CONST ORD_WIN32CREATEWINDOW           = 909;
CONST ORD_WIN32DEFDLGPROC             = 910;
CONST ORD_WIN32DEFWINDOWPROC          = 911;
CONST ORD_WIN32DISPATCHMSG            = 912;
CONST ORD_WIN32DRAWTEXT               = 913;
CONST ORD_WIN32GETDLGMSG              = 914;
CONST ORD_WIN32GETMSG                 = 915;
CONST ORD_WIN32MSGMUXSEMWAIT          = 916;
CONST ORD_WIN32MULTWINDOWFROMIDS      = 917;
CONST ORD_WIN32PEEKMSG                = 918;
CONST ORD_WIN32POSTMSG                = 919;
CONST ORD_WIN32SENDMSG                = 920;
CONST ORD_WIN32SETKEYBOARDSTATETABLE  = 921;
CONST ORD_WIN32CREATEDLG              = 922;
CONST ORD_WIN32DLGBOX                 = 923;
CONST ORD_WIN32LOADDLG                = 924;
CONST ORD_WIN32QUERYCLASSINFO         = 925;
CONST ORD_WIN32REGISTERCLASS          = 926;
CONST ORD_WIN32RELEASEHOOK            = 927;
CONST ORD_WIN32SETHOOK                = 928;
CONST ORD_WIN32SUBCLASSWINDOW         = 929;
CONST ORD_WIN32SETCLASSTHUNKPROC      = 930;
CONST ORD_WIN32QUERYCLASSTHUNKPROC    = 931;
CONST ORD_WIN32SETWINDOWTHUNKPROC     = 932;
CONST ORD_WIN32QUERYWINDOWTHUNKPROC   = 933;
CONST ORD_WIN32QUERYWINDOWMODEL       = 934;
CONST ORD_WIN32SETDESKTOPBKGND        = 935;
CONST ORD_WIN32QUERYDESKTOPBKGND      = 936;
CONST ORD_WIN32POPUPMENU              = 937;
CONST ORD_WIN32SETPRESPARAM           = 938;
CONST ORD_WIN32QUERYPRESPARAM         = 939;
CONST ORD_WIN32REMOVEPRESPARAM        = 940;
CONST ORD_WIN32REALIZEPALETTE         = 941;
CONST ORD_WIN32CREATEPOINTERINDIRECT  = 942;
CONST ORD_WIN32SAVEWINDOWPOS          = 943;
CONST ORD_WIN32GETERASEPS             = 952;
CONST ORD_WIN32RELEASEERASEPS         = 953;
CONST ORD_WIN32SETPOINTEROWNER        = 971;
CONST ORD_WIN32STRETCHPOINTER         = 968;
CONST ORD_WIN32SETERRORINFO           = 977;
CONST ORD_WIN32WAITEVENTSEM           = 978;
CONST ORD_WIN32REQUESTMUTEXSEM        = 979;
CONST ORD_WIN32WAITMUXWAITSEM         = 980;
(* PMPIC *)
CONST ORD_PICPRINT           = 1;
CONST ORD_PICICHG            = 2;
CONST ORD_PIC32PRINT         = 11;
CONST ORD_PIC32ICHG          = 12;
CONST ORD_PRF32PIF2MET       = 13;
(* PMSHAPI *)
CONST ORD_WINQUERYPROFILEINT           = 2;
CONST ORD_WINQUERYPROFILESTRING        = 3;
CONST ORD_WINWRITEPROFILESTRING        = 4;
CONST ORD_WINQUERYPROFILESIZE          = 5;
CONST ORD_WINQUERYPROFILEDATA          = 6;
CONST ORD_WINWRITEPROFILEDATA          = 7;
CONST ORD_WININITSESSIONMGR            = 8;
CONST ORD_WINSETFGNDWINDOW             = 9;
CONST ORD_WINADDPROGRAM                = 12;
CONST ORD_WINREMOVEPROGRAM             = 13;
CONST ORD_WINCHANGEPROGRAM             = 14;
CONST ORD_WINQUERYDEFINITION           = 15;
CONST ORD_WINQUERYPROGRAMTITLES        = 16;
CONST ORD_WINCREATEGROUP               = 17;
CONST ORD_WINADDTOGROUP                = 19;
CONST ORD_WINQUERYPROGRAMUSE           = 20;
CONST ORD_WINREMOVEFROMGROUP           = 21;
CONST ORD_WINDESTROYGROUP              = 23;
CONST ORD_WINQUERYFILEEXTOPTS          = 24;
CONST ORD_WINSETFILEEXTOPTS            = 25;
CONST ORD_WINQUERYPROGRAMTYPE          = 26;
CONST ORD_PRFQUERYPROFILEINT           = 32;
CONST ORD_PRFQUERYPROFILESTRING        = 33;
CONST ORD_PRFWRITEPROFILESTRING        = 34;
CONST ORD_PRFQUERYPROFILESIZE          = 35;
CONST ORD_PRFQUERYPROFILEDATA          = 36;
CONST ORD_PRFWRITEPROFILEDATA          = 37;
CONST ORD_PRFOPENPROFILE               = 38;
CONST ORD_PRFCLOSEPROFILE              = 39;
CONST ORD_PRFRESET                     = 42;
CONST ORD_PRFQUERYPROFILE              = 43;
CONST ORD_WININSTSTARTAPP              = 44;
CONST ORD_WINTERMINATEAPP              = 45;
CONST ORD_WINCREATESWITCHENTRY         = 46;
CONST ORD_WINQUERYSESSIONTITLE         = 47;
CONST ORD_WINADDSWITCHENTRY            = 48;
CONST ORD_WINCHANGESWITCHENTRY         = 49;
CONST ORD_PRFADDPROGRAM                = 50;
CONST ORD_PRFREMOVEPROGRAM             = 51;
CONST ORD_PRFCHANGEPROGRAM             = 52;
CONST ORD_PRFQUERYDEFINITION           = 53;
CONST ORD_PRFQUERYPROGRAMTITLES        = 54;
CONST ORD_PRFCREATEGROUP               = 55;
CONST ORD_WINQUERYSWITCHENTRY          = 56;
CONST ORD_WINQUERYSWITCHHANDLE         = 57;
CONST ORD_PRFQUERYPROGRAMHANDLE        = 58;
CONST ORD_PRFQUERYPROGRAMCATEGORY      = 59;
CONST ORD_PRFDESTROYGROUP              = 60;
CONST ORD_WINQUERYTASKTITLE            = 65;
CONST ORD_WINQUERYTASKSIZEPOS          = 66;
CONST ORD_WINQUERYSWITCHLIST           = 67;
CONST ORD_WINREMOVESWITCHENTRY         = 68;
CONST ORD_WINSWITCHTOPROGRAM           = 69;
CONST ORD_WINSWITCHPROGRAMREGISTER     = 70;
CONST ORD_WINENDPROGRAM                = 73;
CONST ORD_WINSTOPPROGRAM               = 74;
CONST ORD_WINENDWINDOWSESSION          = 75;
CONST ORD_WINSWITCHTOTASKMANAGER       = 78;
CONST ORD_WINSWITCHTOPROGRAM2          = 80;
CONST ORD_WINPROCESSHOTKEY             = 81;
CONST ORD_WININITSESSION               = 82;
CONST ORD_WINENDSESSION                = 83;
CONST ORD_WININITSWENTRY               = 84;
CONST ORD_WINSETSWENTRY                = 85;
CONST ORD_WINQUERYEXTIDFOCUS           = 86;
CONST ORD_WINSETEXTIDFOCUS             = 87;
CONST ORD_WINNOSHUTDOWN                = 91;
CONST ORD_WINSETTITLE                  = 93;
CONST ORD_WINSETTITLEANDICON           = 97;
CONST ORD_PRF32QUERYPROFILESIZE        = 101;
CONST ORD_PRF32OPENPROFILE             = 102;
CONST ORD_PRF32CLOSEPROFILE            = 103;
CONST ORD_PRF32REMOVEPROGRAM           = 104;
CONST ORD_PRF32DESTROYGROUP            = 106;
CONST ORD_PRF32QUERYPROFILE            = 107;
CONST ORD_PRF32RESET                   = 108;
CONST ORD_PRF32ADDPROGRAM              = 109;
CONST ORD_PRF32CHANGEPROGRAM           = 110;
CONST ORD_PRF32QUERYDEFINITION         = 111;
CONST ORD_PRF32QUERYPROGRAMTITLES      = 113;
CONST ORD_PRF32QUERYPROFILEINT         = 114;
CONST ORD_PRF32QUERYPROFILESTRING      = 115;
CONST ORD_PRF32WRITEPROFILESTRING      = 116;
CONST ORD_PRF32QUERYPROFILEDATA        = 117;
CONST ORD_PRF32WRITEPROFILEDATA        = 118;
CONST ORD_WIN32STARTAPP                = 119;
CONST ORD_WIN32ADDSWITCHENTRY          = 120;
CONST ORD_WIN32CREATESWITCHENTRY       = 121;
CONST ORD_WIN32QUERYSESSIONTITLE       = 122;
CONST ORD_WIN32CHANGESWITCHENTRY       = 123;
CONST ORD_WIN32QUERYSWITCHENTRY        = 124;
CONST ORD_WIN32QUERYSWITCHHANDLE       = 125;
CONST ORD_WIN32QUERYSWITCHLIST         = 126;
CONST ORD_WIN32QUERYTASKSIZEPOS        = 127;
CONST ORD_WIN32QUERYTASKTITLE          = 128;
CONST ORD_WIN32REMOVESWITCHENTRY       = 129;
CONST ORD_WIN32TERMINATEAPP            = 130;
CONST ORD_WIN32SWITCHTOPROGRAM         = 131;
CONST ORD_WIN32SWITCHPROGRAMREGISTER   = 156;
CONST ORD_WINSTARTAPP                  = 201;
CONST ORD_WINHAPPFROMPID               = 208;
CONST ORD_WINHSWITCHFROMHAPP           = 209;
(* QUECALLS *)
CONST ORD_DOSREADQUEUE     = 1;
CONST ORD_DOSPURGEQUEUE    = 2;
CONST ORD_DOSCLOSEQUEUE    = 3;
CONST ORD_DOSQUERYQUEUE    = 4;
CONST ORD_DOSPEEKQUEUE     = 5;
CONST ORD_DOSWRITEQUEUE    = 6;
CONST ORD_DOSOPENQUEUE     = 7;
CONST ORD_DOSCREATEQUEUE   = 8;
CONST ORD_DOS32READQUEUE   = 9;
CONST ORD_DOS32PURGEQUEUE = 10;
CONST ORD_DOS32CLOSEQUEUE = 11;
CONST ORD_DOS32QUERYQUEUE = 12;
CONST ORD_DOS32PEEKQUEUE  = 13;
CONST ORD_DOS32WRITEQUEUE = 14;
CONST ORD_DOS32OPENQUEUE  = 15;
CONST ORD_DOS32CREATEQUEUE= 16;
(* SESMGR *)
CONST ORD_DOSSTOPSESSION          = 8;
CONST ORD_DOSSELECTSESSION        = 9;
CONST ORD_DOSSETSESSION          = 14;
CONST ORD_DOSSTARTSESSION        = 17;
CONST ORD_DOSSMREGISTERDD        = 29;
CONST ORD_DOS32STARTSESSION      = 37;
CONST ORD_DOS32SELECTSESSION     = 38;
CONST ORD_DOS32SETSESSION        = 39;
CONST ORD_DOS32STOPSESSION       = 40;
(* PMSTDDLG *)
CONST ORD_WINFONTDLG             = 2;
CONST ORD_WINDEFFONTDLGPROC      = 3;
CONST ORD_WINFILEDLG             = 4;
CONST ORD_WINDEFFILEDLGPROC      = 5;
CONST ORD_WINFREEFILEDLGLIST     = 6;
(* VIOCALLS *)
CONST ORD_VIOENDPOPUP         = 1;
CONST ORD_VIOGETPHYSBUF       = 2;
CONST ORD_VIOGETANSI          = 3;
CONST ORD_VIOSETANSI          = 5;
CONST ORD_VIODEREGISTER       = 6;
CONST ORD_VIOSCROLLUP         = 7;
CONST ORD_VIOPRTSC            = 8;
CONST ORD_VIOGETCURPOS        = 9;
CONST ORD_VIOWRTCELLSTR       = 10;
CONST ORD_VIOPOPUP            = 11;
CONST ORD_VIOSCROLLRT         = 12;
CONST ORD_VIOWRTCHARSTR       = 13;
CONST ORD_VIOSETCURPOS        = 15;
CONST ORD_VIOSCRUNLOCK        = 18;
CONST ORD_VIOWRTTTY           = 19;
CONST ORD_VIOGETMODE          = 21;
CONST ORD_VIOSETMODE          = 22;
CONST ORD_VIOSCRLOCK          = 23;
CONST ORD_VIOREADCELLSTR      = 24;
CONST ORD_VIOSAVREDRAWWAIT    = 25;
CONST ORD_VIOWRTNATTR         = 26;
CONST ORD_VIOGETCURTYPE       = 27;
CONST ORD_VIOSAVREDRAWUNDO    = 28;
CONST ORD_VIOGETFONT          = 29;
CONST ORD_VIOREADCHARSTR      = 30;
CONST ORD_VIOGETBUF           = 31;
CONST ORD_VIOSETCURTYPE       = 32;
CONST ORD_VIOSETFONT          = 33;
CONST ORD_VIOMODEUNDO         = 35;
CONST ORD_VIOMODEWAIT         = 37;
CONST ORD_VIOGETCP            = 40;
CONST ORD_VIOSETCP            = 42;
CONST ORD_VIOSHOWBUF          = 43;
CONST ORD_VIOSCROLLLF         = 44;
CONST ORD_VIOREGISTER         = 45;
CONST ORD_VIOGETCONFIG        = 46;
CONST ORD_VIOSCROLLDN         = 47;
CONST ORD_VIOWRTCHARSTRATT    = 48;
CONST ORD_VIOGETSTATE         = 49;
CONST ORD_VIOPRTSCTOGGLE      = 50;
CONST ORD_VIOSETSTATE         = 51;
CONST ORD_VIOWRTNCELL         = 52;
CONST ORD_VIOWRTNCHAR         = 53;
CONST ORD_VIOASSOCIATE        = 55;
CONST ORD_VIOCREATEPS         = 56;
CONST ORD_VIODELETESETID      = 57;
CONST ORD_VIOGETDEVICECELLSIZE= 58;
CONST ORD_VIOGETORG           = 59;
CONST ORD_VIOCREATELOGFONT    = 60;
CONST ORD_VIODESTROYPS        = 61;
CONST ORD_VIOQUERYSETIDS      = 62;
CONST ORD_VIOSETORG           = 63;
CONST ORD_VIOQUERYFONTS       = 64;
CONST ORD_VIOSETDEVICECELLSIZE= 65;
CONST ORD_VIOSHOWPS           = 66;
CONST ORD_VIOGETPSADDRESS     = 67;
CONST ORD_VIOGLOBALREG        = 70;
CONST ORD_XVIOSETCASTATE      = 71;
CONST ORD_XVIOCHECKCHARTYPE   = 72;
CONST ORD_XVIODESTROYCA       = 73;
CONST ORD_XVIOCREATECA        = 74;
CONST ORD_VIOCHECKCHARTYPE    = 75;
CONST ORD_XVIOGETCASTATE      = 76;
(* PMVIOP *)
CONST ORD_WINDEFAVIOWINDOWPROC       = 30;

(************************** End of file ***************************************)

(* ------------- End of file:  .\hm\bseord.hm ------------- *)
<* END *>


(************************** End of file ***************************************)

(* ------------- End of file:  .\hm\bse.hm ------------- *)
<* END *>

(* OS/2 Presentation Manager Include File *)
<* IF NOT DEFINED (INCL_NOPMAPI)  THEN *>
   
(* ------------- Include file: .\hm\pm.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PM.H
*
* OS/2 Presentation Manager top level include file.
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* The following symbols are used in this file for conditional sections.
*
*   CONST:                To include:
*
*   INCL_PM                  ALL of OS/2 Presentation Manager
*   INCL_AVIO                OS/2 Advanced VIO (16-Bit only)
*   INCL_BITMAPFILEFORMAT    OS/2 Bitmap File Format
*   INCL_DEV                 OS/2 Device Support
*   INCL_ERRORS              OS/2 Errors
*   INCL_FONTFILEFORMAT      OS/2 Font File Format
*   INCL_GPI                 OS/2 GPI
*   INCL_ORDERS              OS/2 Graphical Order Formats
*   INCL_PIC                 OS/2 Picture utilities
*   INCL_SPL                 OS/2 Spooler
*   INCL_WINSTDDLGS          CUA controls and dialogs
*   INCL_WIN                 OS/2 Window Manager
*   INCL_WINWORKPLACE        OS/2 Workplace Shell
*
* ===========================================================================
*
* Comments at the end of each typedef line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)

<* NEW PM_INCLUDED + *>


(*** if INCL_PM defined then define all the symbols ************************)
<* IF DEFINED (INCL_PM)  THEN *>
   <* NEW INCL_AVIO + *>
   <* NEW INCL_BITMAPFILEFORMAT + *>
   <* NEW INCL_DEV + *>
   <* NEW INCL_ERRORS + *>
   <* NEW INCL_FONTFILEFORMAT + *>
   <* NEW INCL_GPI + *>
   <* NEW INCL_ORDERS + *>
   <* NEW INCL_PIC + *>
   <* NEW INCL_SPL + *>
   <* NEW INCL_WIN + *>
   <* NEW INCL_WINSTDDLGS + *>
   <* NEW INCL_WINWORKPLACE + *>
<* END *>



(* ------------- Include file: .\hm\pmwin.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMWIN.H
*
* OS/2 Presentation Manager Window Manager include file.
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1993
*
* ===========================================================================
*
* The folowing symbols are used in this file for conditional sections.
*
* If INCL_WIN is defined; all subcomponents are included.
*
* Subcomponents marked with "+" are partially included by default:
*
*   CONST:                To include:
*
* + INCL_WINWINDOWMGR       General window management
* + INCL_WINMESSAGEMGR      Message management
* + INCL_WININPUT           Mouse and keyboard input
* + INCL_WINDIALOGS         Dialog boxes
* + INCL_WINSTATICS         Static controls
* + INCL_WINBUTTONS         Button controls
* + INCL_WINENTRYFIELDS     Entry Fields
*   INCL_WINMLE             Multiple Line Entry Fields
* + INCL_WINLISTBOXES       List box controls
* + INCL_WINMENUS           Menu controls
* + INCL_WINSCROLLBARS      Scroll bar controls
* + INCL_WINFRAMEMGR        Frame manager
*   INCL_WINFRAMECTLS       Frame controls (title bars & size border)
*   INCL_WINRECTANGLES      Rectangle routines
*   INCL_WINSYS             System values (and colors)
*   INCL_WINTIMER           Timer routines
* + INCL_WINACCELERATORS    Keyboard accelerators
*   INCL_WINTRACKRECT       WinTrackRect() function
*   INCL_WINCLIPBOARD       Clipboard manager
* + INCL_WINCURSORS         Text cursors
* + INCL_WINPOINTERS        Mouse pointers
*   INCL_WINHOOKS           Hook manager
* + INCL_WINSWITCHLIST      Shell Switch List API
*   INCL_WINPROGRAMLIST     Shell Program List API
*   INCL_WINSHELLDATA       Shell Data (?)
*   INCL_WINCOUNTRY         Country support
*   INCL_WINHEAP            Heap Manager
*   INCL_WINATOM            Atom Manager
*   INCL_WINERRORS          Error code definitions
*   INCL_NLS                DBCS window manager definition
* + INCL_WINHELP            Help Manager definitions
*   INCL_WINSEI             Set Error Info API
*   INCL_WINLOAD            Load/Delete Library/Procedure
*   INCL_WINTYPES           Definitions for Datatypes
*   INCL_WINTHUNKAPI        Thunk Procedure API
*   INCL_WINDESKTOP         Desktop API
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)

<* NEW WIN_INCLUDED + *>

(*** include everything if requested ***************************************)
<* IF DEFINED (INCL_WIN)  THEN *>
   <* NEW INCL_WINWINDOWMGR + *>
   <* NEW INCL_WINMESSAGEMGR + *>
   <* NEW INCL_WININPUT + *>
   <* NEW INCL_WINDIALOGS + *>
   <* NEW INCL_WINSTATICS + *>
   <* NEW INCL_WINBUTTONS + *>
   <* NEW INCL_WINENTRYFIELDS + *>
   <* NEW INCL_WINMLE + *>
   <* NEW INCL_WINLISTBOXES + *>
   <* NEW INCL_WINMENUS + *>
   <* NEW INCL_WINSCROLLBARS + *>
   <* NEW INCL_WINFRAMEMGR + *>
   <* NEW INCL_WINFRAMECTLS + *>
   <* NEW INCL_WINRECTANGLES + *>
   <* NEW INCL_WINSYS + *>
   <* NEW INCL_WINTIMER + *>
   <* NEW INCL_WINACCELERATORS + *>
   <* NEW INCL_WINTRACKRECT + *>
   <* NEW INCL_WINCLIPBOARD + *>
   <* NEW INCL_WINCURSORS + *>
   <* NEW INCL_WINPOINTERS + *>
   <* NEW INCL_WINHOOKS + *>
   <* NEW INCL_WINSWITCHLIST + *>
   <* NEW INCL_WINPROGRAMLIST + *>
   <* NEW INCL_WINSHELLDATA + *>
   <* NEW INCL_WINCOUNTRY + *>
   <* NEW INCL_WINHEAP + *>
   <* NEW INCL_WINATOM + *>
   <* NEW INCL_WINERRORS + *>
   <* NEW INCL_WINDDE + *>
   <* NEW INCL_WINHELP + *>
   <* NEW INCL_WINSEI + *>
   <* NEW INCL_WINLOAD + *>
   <* NEW INCL_WINTYPES + *>
   <* NEW INCL_WINDESKTOP + *>
   <* NEW INCL_WINPALETTE + *>
   <* NEW INCL_WINTHUNKAPI + *>
   <* NEW INCL_WINSTDDLGS + *>
<* ELSE *>
      (*** include resource compiler required sections ************************)
   <* IF DEFINED (RC_INVOKED)  THEN *>
      <* NEW INCL_WININPUT + *>
      <* NEW INCL_WINDIALOGS + *>
      <* NEW INCL_WINSTATICS + *>
      <* NEW INCL_WINBUTTONS + *>
      <* NEW INCL_WINENTRYFIELDS + *>
      <* NEW INCL_WINLISTBOXES + *>
      <* NEW INCL_WINMENUS + *>
      <* NEW INCL_WINSCROLLBARS + *>
      <* NEW INCL_WINFRAMEMGR + *>
      <* NEW INCL_WINFRAMECTLS + *>
      <* NEW INCL_WINACCELERATORS + *>
      <* NEW INCL_WINPOINTERS + *>
      <* NEW INCL_WINMESSAGEMGR + *>
      <* NEW INCL_WINMLE + *>
      <* NEW INCL_WINHELP + *>
      <* NEW INCL_WINSTDDLGS + *>
      <* NEW INCL_WINSYS + *>
   <* END *>
<* END *>

(*** ensure standard entry field defintions if MLE is defined **************)
<* IF DEFINED (INCL_WINMLE)  THEN *>
   <* IF NOT DEFINED (INCL_WINENTRYFIELDS)  THEN *>
      <* NEW INCL_WINENTRYFIELDS + *>
   <* END *>
<* END *>

(*** INCL_WINCOMMON compatability ******************************************)
<* IF DEFINED (INCL_WINCOMMON)  THEN *>
   <* NEW INCL_WINWINDOWMGR + *>
<* END *>

(*** include PMWIN errors if all errors requested **************************)
<* IF DEFINED (INCL_ERRORS)  THEN *>
   <* NEW INCL_WINERRORS + *>
<* END *>

(***************************************************************************)
(***        General Window Management types; constants and macros        ***)
(***************************************************************************)

TYPE MPARAM   = POINTER TO VOID;    (* mp    *)
TYPE PMPARAM  = POINTER TO MPARAM;   (* pmp   *)
TYPE MRESULT  = POINTER TO VOID;   (* mres  *)
TYPE PMRESULT = POINTER TO MRESULT;  (* pmres *)

(*** Macros to make an MPARAM from standard types. *************************)

CONST MPVOID                       = MPARAM(0);
--CONST MPFROMP(p)                 = MPARAM(((ULONG)(p)))
--CONST MPFROMHWND(hwnd)           = MPARAM((HWND)(hwnd))
--CONST MPFROMCHAR(ch)             = MPARAM((USHORT)(ch))
--CONST MPFROMSHORT(s)             = MPARAM((USHORT)(s))
--CONST MPFROM2SHORT(s1; s2)       = MPARAM(MAKELONG(s1; s2))
--CONST MPFROMSH2CH(s; uch1; uch2) = MPARAM(MAKELONG(s; MAKESHORT(uch1; uch2)))
--CONST MPFROMLONG(l)              = MPARAM((ULONG)(l))

(*** Macros to extract standard types from an MPARAM ***********************)

--CONST PVOIDFROMMP(mp)            ((VOID *)(mp))
--CONST HWNDFROMMP(mp)             ((HWND)(mp))
--CONST CHAR1FROMMP(mp)            ((UCHAR)(mp))
--CONST CHAR2FROMMP(mp)            ((UCHAR)((ULONG)mp >> 8))
--CONST CHAR3FROMMP(mp)            ((UCHAR)((ULONG)mp >> 16))
--CONST CHAR4FROMMP(mp)            ((UCHAR)((ULONG)mp >> 24))
--CONST SHORT1FROMMP(mp)           ((USHORT)(ULONG)(mp))
--CONST SHORT2FROMMP(mp)           ((USHORT)((ULONG)mp >> 16))
--CONST LONGFROMMP(mp)             ((ULONG)(mp))

(*** Macros to make an MRESULT from standard types. ************************)

--CONST MRFROMP(p)                 ((MRESULT)(VOID *)(p))
--CONST MRFROMSHORT(s)             ((MRESULT)(USHORT)(s))
--CONST MRFROM2SHORT(s1; s2)       ((MRESULT)MAKELONG(s1; s2))
--CONST MRFROMLONG(l)              ((MRESULT)(ULONG)(l))

(*** Macros to extract standard types from an MRESULT **********************)

--CONST PVOIDFROMMR(mr)            ((VOID *)(mr))
--CONST SHORT1FROMMR(mr)           ((USHORT)((ULONG)mr))
--CONST SHORT2FROMMR(mr)           ((USHORT)((ULONG)mr >> 16))
--CONST LONGFROMMR(mr)             ((ULONG)(mr))


(****************************************************************************
* This is the standard function definition for window procedures.
* Typically they are names like "XxxxxxxxWndProc"; where the prefix
* "Xxxxxxxxx" is replaced by some name descriptive of the window procedure
* being declared.  Window procedures must be EXPORTED in the definitions
* file used by the linker.
*
* MRESULT PROCEDURE [EXPENTRY] MyclassWndProc(HWND hwnd;   * window handle        *
*                                 ULONG msg;   * message number       *
*                                 MPARAM mp1;  * 1st (packed) parms   *
*                                 MPARAM mp2); * 2nd (packed) parms   *
*
****************************************************************************)

(*** Pointer to a window procedure function ********************************)
TYPE PFNWP = PROCEDURE [EXPENTRY] (HWND, ULONG, MPARAM, MPARAM): MRESULT;

(*** Predefined window handles *********************************************)
<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      CONST HWND_DESKTOP             =  HWND(1);
      CONST HWND_OBJECT              =  HWND(2);
<* END *>

CONST HWND_TOP                    =  HWND(3);
CONST HWND_BOTTOM                 =  HWND(4);

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      CONST HWND_THREADCAPTURE       =  HWND(5);
<* END *>


(*** Standard Window Classes ***********************************************)

CONST WC_FRAME            = PSZ(0ffff0001H);
CONST WC_COMBOBOX         = PSZ(0ffff0002H);
CONST WC_BUTTON           = PSZ(0ffff0003H);
CONST WC_MENU             = PSZ(0ffff0004H);
CONST WC_STATIC           = PSZ(0ffff0005H);
CONST WC_ENTRYFIELD       = PSZ(0ffff0006H);
CONST WC_LISTBOX          = PSZ(0ffff0007H);
CONST WC_SCROLLBAR        = PSZ(0ffff0008H);
CONST WC_TITLEBAR         = PSZ(0ffff0009H);
CONST WC_MLE              = PSZ(0ffff000AH);
(* 000B to 000F reserved *)
CONST WC_APPSTAT          = PSZ(0ffff0010H);
CONST WC_KBDSTAT          = PSZ(0ffff0011H);
CONST WC_PECIC            = PSZ(0ffff0012H);
CONST WC_DBE_KKPOPUP      = PSZ(0ffff0013H);
(* 0014 to 001F reserved *)
CONST WC_SPINBUTTON       = PSZ(0ffff0020H);
(* 0021 to 0024 reserved *)
CONST WC_CONTAINER        = PSZ(0ffff0025H);
CONST WC_SLIDER           = PSZ(0ffff0026H);
CONST WC_VALUESET         = PSZ(0ffff0027H);
CONST WC_NOTEBOOK         = PSZ(0ffff0028H);
(* 0029 to 002C used by PEN *)
CONST WC_PENFIRST         = PSZ(0ffff0029H);
CONST WC_PENLAST          = PSZ(0ffff002CH);
(* 002D to 0030 reserved *)
(* 0030 to 003F reserved *)
CONST WC_MMPMFIRST        = PSZ(0ffff0040H);
CONST WC_MMPMLAST         = PSZ(0ffff004fH);

(*** Standard Window Styles ************************************************)

CONST WS_VISIBLE                 = 080000000H;
CONST WS_DISABLED                = 040000000H;
CONST WS_CLIPCHILDREN            = 020000000H;
CONST WS_CLIPSIBLINGS            = 010000000H;
CONST WS_PARENTCLIP              = 008000000H;
CONST WS_SAVEBITS                = 004000000H;
CONST WS_SYNCPAINT               = 002000000H;
CONST WS_MINIMIZED               = 001000000H;
CONST WS_MAXIMIZED               = 000800000H;
CONST WS_ANIMATE                 = 000400000H;

(*** Dialog manager styles *************************************************)

CONST WS_GROUP                   = 000010000H;
CONST WS_TABSTOP                 = 000020000H;
CONST WS_MULTISELECT             = 000040000H;

(*** Class styles *********************************************************)

CONST CS_MOVENOTIFY              = 000000001H;
CONST CS_SIZEREDRAW              = 000000004H;
CONST CS_HITTEST                 = 000000008H;
CONST CS_PUBLIC                  = 000000010H;
CONST CS_FRAME                   = 000000020H;
CONST CS_CLIPCHILDREN            = 020000000H;
CONST CS_CLIPSIBLINGS            = 010000000H;
CONST CS_PARENTCLIP              = 008000000H;
CONST CS_SAVEBITS                = 004000000H;
CONST CS_SYNCPAINT               = 002000000H;

(***************************************************************************)
(*** Window Manager Subsection part 1 **************************************)
(***************************************************************************)

<* IF (DEFINED (INCL_WINWINDOWMGR) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>

      PROCEDURE [APIENTRY] WinRegisterClass(hab:   HAB;
                                                                          pszClassName: PCSZ;
                                                                          pfnWndProc:   PFNWP;
                                                                          flStyle:      ULONG;
                                                                          cbWindowData: ULONG): BOOL;

      PROCEDURE [APIENTRY] WinDefWindowProc(hwnd: HWND;
                                                                          msg:  ULONG;
                                                                          mp1:  MPARAM;
                                                                          mp2:  MPARAM): MRESULT;

      PROCEDURE [APIENTRY] WinDestroyWindow(hwnd: HWND): BOOL;

      PROCEDURE [APIENTRY] WinShowWindow(hwnd:    HWND;
                                                                    fShow:   BOOL): BOOL;

      PROCEDURE [APIENTRY] WinQueryWindowRect(hwnd:       HWND;
                                                                              prclDest:   PRECTL): BOOL;

      PROCEDURE [APIENTRY] WinGetPS(hwnd: HWND): HPS;

      PROCEDURE [APIENTRY] WinReleasePS(hps: HPS): BOOL;

      PROCEDURE [APIENTRY] WinEndPaint(hps: HPS): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

          PROCEDURE [APIENTRY] WinGetClipPS(hwnd:    HWND;
                                                                    hwndClip: HWND;
                                                                    fl:       ULONG): HPS;

          PROCEDURE [APIENTRY] WinIsWindowShowing(hwnd: HWND): BOOL;

   <* END *>

      PROCEDURE [APIENTRY] WinBeginPaint(hwnd:    HWND;
                                                                hps:       HPS;
                                                                prclPaint: PRECTL): HPS;
      PROCEDURE [APIENTRY] WinOpenWindowDC(hwnd: HWND): HDC;

      PROCEDURE [APIENTRY] WinScrollWindow(hwnd:        HWND;
                                                                  dx:             LONG;
                                                                  dy:             LONG;
                                                                  prclScroll:     PRECTL;
                                                                  prclClip:       PRECTL;
                                                                  hrgnUpdate:     HRGN;
                                                                  prclUpdate:     PRECTL;
                                                                  rgfsw:          ULONG): LONG;

      (*** WinGetClipPS() flags ***********************************************)

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST PSF_LOCKWINDOWUPDATE       = 00001H;
            CONST PSF_CLIPUPWARDS            = 00002H;
            CONST PSF_CLIPDOWNWARDS          = 00004H;
            CONST PSF_CLIPSIBLINGS           = 00008H;
            CONST PSF_CLIPCHILDREN           = 00010H;
            CONST PSF_PARENTCLIP             = 00020H;
   <* END *>

      (*** WinScrollWindow() flags ********************************************)

      CONST SW_SCROLLCHILDREN          = 00001H;
      CONST SW_INVALIDATERGN           = 00002H;

      PROCEDURE [APIENTRY] WinFillRect(hps:  HPS;
                                                            prcl:   PRECTL;
                                                            lColor: LONG): BOOL;

      (*** WinInitialize/WinTerminate Interface declarations ******************)

      TYPE QVERSDATA = RECORD   (* qver *)
            environment:  USHORT;
            version:      USHORT;
      END;
      TYPE PQVERSDATA = POINTER TO QVERSDATA;

      CONST QV_OS2                     = 00000H;
      CONST QV_CMS                     = 00001H;
      CONST QV_TSO                     = 00002H;
      CONST QV_TSOBATCH                = 00003H;
      CONST QV_OS400                   = 00004H;


      PROCEDURE [APIENTRY] WinQueryVersion(hab: HAB): ULONG;

      PROCEDURE [APIENTRY] WinInitialize(flOptions: ULONG): HAB;

      PROCEDURE [APIENTRY] WinTerminate(hab: HAB): BOOL;

      PROCEDURE [APIENTRY] WinQueryAnchorBlock(hwnd: HWND): HAB;

<* END *>

(***************************************************************************)
(***  End of Window Manager COMMON section *********************************)
(***************************************************************************)


PROCEDURE [APIENTRY] WinCreateWindow(hwndParent:  HWND;
                                                                  pszClass:    PCSZ;
                                                                  pszName:     PCSZ;
                                                                  flStyle:     ULONG;
                                                                  x:           LONG;
                                                                  y:           LONG;
                                                                  cx:          LONG;
                                                                  cy:          LONG;
                                                                  hwndOwner:   HWND;
                                                                  hwndInsertBehind: HWND;
                                                                  id:          ULONG;
                                                                  pCtlData:    PVOID;
                                                                  pPresParams: PVOID): HWND;

PROCEDURE [APIENTRY] WinEnableWindow(hwnd:     HWND;
                                                                  fEnable:  BOOL): BOOL;

PROCEDURE [APIENTRY] WinIsWindowEnabled(hwnd: HWND): BOOL;

PROCEDURE [APIENTRY] WinEnableWindowUpdate(hwnd:       HWND;
                                                                              fEnable:    BOOL): BOOL;

PROCEDURE [APIENTRY] WinIsWindowVisible(hwnd: HWND): BOOL;

PROCEDURE [APIENTRY] WinQueryWindowText(hwnd:          HWND;
                                                                        cchBufferMax:  LONG;
                                                                        pchBuffer:     PCH): LONG;

PROCEDURE [APIENTRY] WinSetWindowText(hwnd:    HWND;
                                                                    pszText: PCSZ): BOOL;

PROCEDURE [APIENTRY] WinQueryWindowTextLength(hwnd: HWND): LONG;

PROCEDURE [APIENTRY] WinWindowFromID(hwndParent: HWND;
                                                                  id:         ULONG): HWND;

PROCEDURE [APIENTRY] WinIsWindow(hab:   HAB;
                                                          hwnd:  HWND): BOOL;

PROCEDURE [APIENTRY] WinQueryWindow(hwnd:  HWND;
                                                                cmd:   LONG): HWND;

PROCEDURE [APIENTRY] WinMultWindowFromIDs(hwndParent: HWND;
                                                                            prghwnd:    PHWND;
                                                                            idFirst:    ULONG;
                                                                            idLast:     ULONG): LONG;

(*** WinQueryWindow() codes ************************************************)

CONST QW_NEXT        = 0;
CONST QW_PREV        = 1;
CONST QW_TOP         = 2;
CONST QW_BOTTOM      = 3;
CONST QW_OWNER       = 4;
CONST QW_PARENT      = 5;
CONST QW_NEXTTOP     = 6;
CONST QW_PREVTOP     = 7;
CONST QW_FRAMEOWNER  = 8;

PROCEDURE [APIENTRY] WinSetParent(hwnd:         HWND;
                                                          hwndNewParent: HWND;
                                                          fRedraw:       BOOL): BOOL;

PROCEDURE [APIENTRY] WinIsChild(hwnd:      HWND;
                                                      hwndParent: HWND): BOOL;
PROCEDURE [APIENTRY] WinSetOwner(hwnd:        HWND;
                                                        hwndNewOwner: HWND): BOOL;
<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      PROCEDURE [APIENTRY] WinQueryWindowProcess(hwnd:    HWND;
                                                                                  ppid:     PPID;
                                                                                  ptid:     PTID): BOOL;
<* END *>

PROCEDURE [APIENTRY] WinQueryObjectWindow(hwndDesktop: HWND): HWND;
PROCEDURE [APIENTRY] WinQueryDesktopWindow(hab: HAB;
                                                                            hdc:  HDC): HWND;

(*** Window positioning functions *)

(* WinSetMultWindowPos() structure *)

TYPE SWP = RECORD   (* swp *)
      fl:          ULONG;
      cy:          LONG;
      cx:          LONG;
      y:           LONG;
      x:           LONG;
      hwndInsertBehind:  HWND;
      hwnd:        HWND;
      ulReserved1: ULONG;
      ulReserved2: ULONG;
END;
TYPE PSWP = POINTER TO SWP;

PROCEDURE [APIENTRY] WinSetWindowPos(hwnd:   HWND;
                                                                hwndInsertBehind:  HWND;
                                                                x:       LONG;
                                                                y:       LONG;
                                                                cx:      LONG;
                                                                cy:      LONG;
                                                                fl:      ULONG): BOOL;
PROCEDURE [APIENTRY] WinSetMultWindowPos(hab:  HAB;
                                                                        pswp:  PSWP;
                                                                        cswp:  ULONG): BOOL;
PROCEDURE [APIENTRY] WinQueryWindowPos(hwnd:    HWND;
                                                                    pswp:     PSWP): BOOL;

(* Values returned from WM_ADJUSTWINDOWPOS and passed to WM_WINDOWPOSCHANGED *)

CONST AWP_MINIMIZED              = 000010000H;
CONST AWP_MAXIMIZED              = 000020000H;
CONST AWP_RESTORED               = 000040000H;
CONST AWP_ACTIVATE               = 000080000H;
CONST AWP_DEACTIVATE             = 000100000H;

(* WinSetWindowPos() flags *)

CONST SWP_SIZE                   = 00001H;
CONST SWP_MOVE                   = 00002H;
CONST SWP_ZORDER                 = 00004H;
CONST SWP_SHOW                   = 00008H;
CONST SWP_HIDE                   = 00010H;
CONST SWP_NOREDRAW               = 00020H;
CONST SWP_NOADJUST               = 00040H;
CONST SWP_ACTIVATE               = 00080H;
CONST SWP_DEACTIVATE             = 00100H;
CONST SWP_EXTSTATECHANGE         = 00200H;
CONST SWP_MINIMIZE               = 00400H;
CONST SWP_MAXIMIZE               = 00800H;
CONST SWP_RESTORE                = 01000H;
CONST SWP_FOCUSACTIVATE          = 02000H;
CONST SWP_FOCUSDEACTIVATE        = 04000H;
CONST SWP_NOAUTOCLOSE            = 08000H;  (* Valid in PROGDETAILS struct only *)

(* Window painting *)

PROCEDURE [APIENTRY] WinUpdateWindow(hwnd: HWND): BOOL;

PROCEDURE [APIENTRY] WinInvalidateRect(hwnd:   HWND;
                                                                  pwrc:     PRECTL;
                                                                  fIncludeChildren: BOOL): BOOL;

PROCEDURE [APIENTRY] WinInvalidateRegion(hwnd: HWND;
                                                                      hrgn:   HRGN;
                                                                      fIncludeChildren: BOOL): BOOL;


(* Drawing helpers *)

PROCEDURE [APIENTRY] WinInvertRect(hps: HPS;
                                                          prcl:  PRECTL): BOOL;
PROCEDURE [APIENTRY] WinDrawBitmap(hpsDst:   HPS;
                                                          hbm:        HBITMAP;
                                                          pwrcSrc:    PRECTL;
                                                          pptlDst:    PPOINTL;
                                                          clrFore:    LONG;
                                                          clrBack:    LONG;
                                                          fl:         ULONG): BOOL;

(* WinDrawBitmap() flags *)

CONST DBM_NORMAL                 = 00000H;
CONST DBM_INVERT                 = 00001H;
CONST DBM_HALFTONE               = 00002H;
CONST DBM_STRETCH                = 00004H;
CONST DBM_IMAGEATTRS             = 00008H;



PROCEDURE [APIENTRY] WinDrawText(hps:      HPS;
                                                          cchText:  LONG;
                                                          lpchText: PCH;
                                                          prcl:     PRECTL;
                                                          clrFore:  LONG;
                                                          clrBack:  LONG;
                                                          flCmd:    ULONG): LONG;


(*
* WinDrawText() codes:
* From DT_LEFT to DT_EXTERNALLEADING; the codes are designed to be ||'ed with
* SS_TEXT to create variations of the basic text static item.
*)
CONST DT_LEFT                    = 00000H;
CONST DT_QUERYEXTENT             = 00002H;
CONST DT_UNDERSCORE              = 00010H;
CONST DT_STRIKEOUT               = 00020H;
CONST DT_TEXTATTRS               = 00040H;
CONST DT_EXTERNALLEADING         = 00080H;
CONST DT_CENTER                  = 00100H;
CONST DT_RIGHT                   = 00200H;
CONST DT_TOP                     = 00000H;
CONST DT_VCENTER                 = 00400H;
CONST DT_BOTTOM                  = 00800H;
CONST DT_HALFTONE                = 01000H;
CONST DT_MNEMONIC                = 02000H;
CONST DT_WORDBREAK               = 04000H;
CONST DT_ERASERECT               = 08000H;



PROCEDURE [APIENTRY] WinDrawBorder(hps:   HPS;
                                                        prcl:     PRECTL;
                                                        cx:       LONG;
                                                        cy:       LONG;
                                                        clrFore:  LONG;
                                                        clrBack:  LONG;
                                                        flCmd:    ULONG): BOOL;


(* WinDrawBorder() flags *)

CONST DB_PATCOPY                 = 00000H;
CONST DB_PATINVERT               = 00001H;
CONST DB_DESTINVERT              = 00002H;
CONST DB_AREAMIXMODE             = 00003H;

CONST DB_ROP                     = 00007H;
CONST DB_INTERIOR                = 00008H;
CONST DB_AREAATTRS               = 00010H;
CONST DB_STANDARD                = 00100H;
CONST DB_DLGBORDER               = 00200H;



(** Resource loading functions *)

PROCEDURE [APIENTRY] WinLoadString(hab:       HAB;
                                                              hmod:      HMODULE;
                                                              id:        ULONG;
                                                              cchMax:    LONG;
                                                              pchBuffer: PCSZ): LONG;
<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      PROCEDURE [APIENTRY] WinLoadMessage(hab:       HAB;
                                                                      hmod:      HMODULE;
                                                                      id:        ULONG;
                                                                      cchMax:    LONG;
                                                                      pchBuffer: PCSZ): LONG;


<* END *>

(***************************************************************************)
(****                 Window Manager Subsection part 2                  ****)
<* IF DEFINED (INCL_WINWINDOWMGR) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>

      PROCEDURE [APIENTRY] WinSetActiveWindow(hwndDesktop: HWND;
                                                                              hwnd:        HWND): BOOL;

<* END *>

<* IF DEFINED (INCL_WINWINDOWMGR)  THEN *>
      (* WM_CREATE structure *)

      TYPE CREATESTRUCT = RECORD   (* crst *)
            pPresParams:      PVOID;
            pCtlData:         PVOID;
            id:               ULONG;
            hwndInsertBehind: HWND;
            hwndOwner:        HWND;
            cy:               LONG;
            cx:               LONG;
            y:                LONG;
            x:                LONG;
            flStyle:          ULONG;
            pszText:          PSZ;
            pszClass:         PSZ;
            hwndParent:       HWND;
      END;
      TYPE PCREATESTRUCT = POINTER TO CREATESTRUCT;

      (* WinQueryClassInfo() structure *)

      TYPE CLASSINFO = RECORD   (* clsi *)
            flClassStyle:  ULONG;
            pfnWindowProc: PFNWP;
            cbWindowData:  ULONG;
      END;
      TYPE PCLASSINFO = POINTER TO CLASSINFO;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinSubclassWindow(hwnd:     HWND;
                                                                                pfnwp:     PFNWP): PFNWP;
   <* END *>

      PROCEDURE [APIENTRY] WinQueryClassName(hwnd:   HWND;
                                                                            cchMax: LONG;
                                                                            pch:    PCH): LONG;
      PROCEDURE [APIENTRY] WinQueryClassInfo(hab:         HAB;
                                                                          pszClassName: PCSZ;
                                                                          pClassInfo:   PCLASSINFO): BOOL;

      PROCEDURE [APIENTRY] WinQueryActiveWindow(hwndDesktop: HWND): HWND;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinIsThreadActive(hab: HAB): BOOL;
   <* END *>
      PROCEDURE [APIENTRY] WinQuerySysModalWindow(hwndDesktop: HWND): HWND;


      PROCEDURE [APIENTRY] WinSetSysModalWindow(hwndDesktop: HWND;
                                                                                hwnd:         HWND): BOOL;


   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinQueryWindowUShort(hwnd:  HWND;
                                                                                      index:  LONG): USHORT;
            PROCEDURE [APIENTRY] WinSetWindowUShort(hwnd:    HWND;
                                                                                  index:    LONG;
                                                                                  us:       USHORT): BOOL;
            PROCEDURE [APIENTRY] WinQueryWindowULong(hwnd: HWND;
                                                                                    index: LONG): ULONG;
            PROCEDURE [APIENTRY] WinSetWindowULong(hwnd:   HWND;
                                                                                index:   LONG;
                                                                                ul:      ULONG): BOOL;
            PROCEDURE [APIENTRY] WinQueryWindowPtr(hwnd: HWND;
                                                                                index: LONG): PVOID;
            PROCEDURE [APIENTRY] WinSetWindowPtr(hwnd:   HWND;
                                                                            index:   LONG;
                                                                            p:       PVOID): BOOL;
            PROCEDURE [APIENTRY] WinSetWindowBits(hwnd:  HWND;
                                                                              index:  LONG;
                                                                              flData: ULONG;
                                                                              flMask: ULONG): BOOL;

            (*** Standard WinQueryWindowUShort/ULong() indices *******************)
            CONST QWS_USER                  = 0;
            CONST QWS_ID                    = (-1);
            CONST QWS_MIN                   = (-1);

            CONST QWL_USER                  = 0;
            CONST QWL_STYLE                 = (-2);
            CONST QWP_PFNWP                 = (-3);
            CONST QWL_HMQ                   = (-4);
            CONST QWL_RESERVED              = (-5);

            CONST QWL_PENDATA               = (-7);
            CONST QWL_MIN                   = (-7);

            (*** WC_FRAME WinQueryWindowUShort/ULong() indices *******************)
            CONST QWL_HHEAP                  = 00004H;
            CONST QWL_HWNDFOCUSSAVE          = 00018H;
            CONST QWL_DEFBUTTON              = 00040H;
            CONST QWL_PSSCBLK                = 00048H;
            CONST QWL_PFEPBLK                = 0004cH;
            CONST QWL_PSTATBLK               = 00050H;

            CONST QWS_FLAGS                  = 00008H;
            CONST QWS_RESULT                 = 0000aH;
            CONST QWS_XRESTORE               = 0000cH;
            CONST QWS_YRESTORE               = 0000eH;
            CONST QWS_CXRESTORE              = 00010H;
            CONST QWS_CYRESTORE              = 00012H;
            CONST QWS_XMINIMIZE              = 00014H;
            CONST QWS_YMINIMIZE              = 00016H;


            (*** Window enumeration **********************************************)
            TYPE HENUM = LHANDLE;  (* henum *)

            PROCEDURE [APIENTRY] WinBeginEnumWindows(hwnd: HWND): HENUM;
            PROCEDURE [APIENTRY] WinGetNextWindow(henum: HENUM): HWND;
            PROCEDURE [APIENTRY] WinEndEnumWindows(henum: HENUM): BOOL;

   <* END *>

      PROCEDURE [APIENTRY] WinWindowFromPoint(hwnd:    HWND;
                                                                          pptl:      PPOINTL;
                                                                          fChildren: BOOL): HWND;

      PROCEDURE [APIENTRY] WinMapWindowPoints(hwndFrom: HWND;
                                                                          hwndTo:     HWND;
                                                                          prgptl:     PPOINTL;
                                                                          cwpt:       LONG): BOOL;


      (* More window painting functions *)

      PROCEDURE [APIENTRY] WinValidateRect(hwnd:     HWND;
                                                                    prcl:       PRECTL;
                                                                    fIncludeChildren: BOOL): BOOL;

      PROCEDURE [APIENTRY] WinValidateRegion(hwnd:     HWND;
                                                                        hrgn:       HRGN;
                                                                        fIncludeChildren: BOOL): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinWindowFromDC(hdc: HDC): HWND;

            PROCEDURE [APIENTRY] WinQueryWindowDC(hwnd: HWND): HDC;

            PROCEDURE [APIENTRY] WinGetScreenPS(hwndDesktop: HWND): HPS;

            PROCEDURE [APIENTRY] WinLockWindowUpdate(hwndDesktop:  HWND;
                                                                                  hwndLockUpdate: HWND): BOOL;

            PROCEDURE [APIENTRY] WinLockVisRegions(hwndDesktop: HWND;
                                                                              fLock:         BOOL): BOOL;
   <* END *>

      PROCEDURE [APIENTRY] WinQueryUpdateRect(hwnd: HWND;
                                                                          prcl:   PRECTL): BOOL;

      PROCEDURE [APIENTRY] WinQueryUpdateRegion(hwnd: HWND;
                                                                            hrgn:    HRGN): LONG;

      PROCEDURE [APIENTRY] WinExcludeUpdateRegion(hps: HPS;
                                                                                hwnd:   HWND): LONG;

<* END *>

<* IF DEFINED (INCL_WINMESSAGEMGR) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>

      (* QMSG structure *)
      TYPE QMSG = RECORD   (* qmsg *)
            hwnd:     HWND;
            msg:      ULONG;
            mp1:      MPARAM;
            mp2:      MPARAM;
            time:     ULONG;
            ptl:      POINTL;
            reserved: ULONG;
      END;
      TYPE PQMSG = POINTER TO QMSG;

      (*** Standard Window Messages *******************************************)
      CONST WM_NULL                    = 00000H;
      CONST WM_CREATE                  = 00001H;
      CONST WM_DESTROY                 = 00002H;


      CONST WM_ENABLE                  = 00004H;
      CONST WM_SHOW                    = 00005H;
      CONST WM_MOVE                    = 00006H;
      CONST WM_SIZE                    = 00007H;
      CONST WM_ADJUSTWINDOWPOS         = 00008H;

      CONST WM_CALCVALIDRECTS          = 00009H;

      CONST WM_SETWINDOWPARAMS         = 0000aH;
      CONST WM_QUERYWINDOWPARAMS       = 0000bH;
      CONST WM_HITTEST                 = 0000cH;
      CONST WM_ACTIVATE                = 0000dH;
      CONST WM_SETFOCUS                = 0000fH;
      CONST WM_SETSELECTION            = 00010H;

      (* language support Winproc *)
      CONST WM_PPAINT                  = 00011H;
      CONST WM_PSETFOCUS               = 00012H;
      CONST WM_PSYSCOLORCHANGE         = 00013H;
      CONST WM_PSIZE                   = 00014H;
      CONST WM_PACTIVATE               = 00015H;
      CONST WM_PCONTROL                = 00016H;

      CONST WM_COMMAND                 = 00020H;
      CONST WM_SYSCOMMAND              = 00021H;
      CONST WM_HELP                    = 00022H;
      CONST WM_PAINT                   = 00023H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST WM_TIMER                = 00024H;
            CONST WM_SEM1                 = 00025H;
            CONST WM_SEM2                 = 00026H;
            CONST WM_SEM3                 = 00027H;
            CONST WM_SEM4                 = 00028H;
   <* END *>

      CONST WM_CLOSE                   = 00029H;
      CONST WM_QUIT                    = 0002aH;
      CONST WM_SYSCOLORCHANGE          = 0002bH;
      CONST WM_SYSVALUECHANGED         = 0002dH;
      CONST WM_APPTERMINATENOTIFY      = 0002eH;
      CONST WM_PRESPARAMCHANGED        = 0002fH;

      (* Control notification messages *)
      CONST WM_CONTROL                 = 00030H;
      CONST WM_VSCROLL                 = 00031H;
      CONST WM_HSCROLL                 = 00032H;
      CONST WM_INITMENU                = 00033H;
      CONST WM_MENUSELECT              = 00034H;
      CONST WM_MENUEND                 = 00035H;
      CONST WM_DRAWITEM                = 00036H;
      CONST WM_MEASUREITEM             = 00037H;
      CONST WM_CONTROLPOINTER          = 00038H;
      CONST WM_QUERYDLGCODE            = 0003aH;
      CONST WM_INITDLG                 = 0003bH;
      CONST WM_SUBSTITUTESTRING        = 0003cH;
      CONST WM_MATCHMNEMONIC           = 0003dH;
      CONST WM_SAVEAPPLICATION         = 0003eH;


      (*************************************************************************
      * Reserve a range of messages for help manager.  This range includes
      * public messages; defined below; and private ones; which need to be
      * reserved here to prevent clashing with application messages
      *************************************************************************)

      CONST WM_HELPBASE                = 00F00H; (* Start of msgs for help manager   *)
      CONST WM_HELPTOP                 = 00FFFH; (* End of msgs for help manager     *)

      CONST WM_USER                    = 01000H;

      (*** WM_COMMAND msg source codes ****************************************)
      CONST CMDSRC_PUSHBUTTON     = 1;
      CONST CMDSRC_MENU           = 2;
      CONST CMDSRC_ACCELERATOR    = 3;
      CONST CMDSRC_FONTDLG        = 4;
      CONST CMDSRC_FILEDLG        = 5;
      CONST CMDSRC_PRINTDLG       = 6;
      CONST CMDSRC_COLORDLG       = 7;
      CONST CMDSRC_OTHER          = 0;

      -- #pragma pack(1) (* force structure alignment packing *)

      (*
      * The following structure and macro are used to access the
      * WM_COMMAND; WM_HELP; and WM_SYSCOMMAND message parameters:
      *)
      TYPE CMDMSG = RECORD    (* commandmsg *)
            cmd:     USHORT;           (* mp1 *)
            unused:  USHORT;
            source:  USHORT;           (* mp2 *)
            fMouse:  USHORT;
      END;
      TYPE PCMDMSG = POINTER TO CMDMSG;

      --CONST COMMANDMSG(pmsg) \
      --((PCMDMSG)((PBYTE)pmsg + sizeof(MPARAM)))

      --#pragma pack()  (* restore packing to default *)

      (*** The following structure is used by the WinQueryQueueInfo() routine *)
      TYPE MQINFO = RECORD   (* mqi *)
            cb:         ULONG;
            pid:        PID;
            tid:        TID;
            cmsgs:      ULONG;
            pReserved:  PVOID;
      END;
      TYPE PMQINFO = POINTER TO MQINFO;

      PROCEDURE [APIENTRY] WinSendMsg(hwnd: HWND;
                                                              msg:  ULONG;
                                                              mp1:  MPARAM;
                                                              mp2:  MPARAM): MRESULT;

      PROCEDURE [APIENTRY] WinCreateMsgQueue(hab:  HAB;
                                                                            cmsg: LONG): HMQ;

      PROCEDURE [APIENTRY] WinDestroyMsgQueue(hmq: HMQ): BOOL;

      PROCEDURE [APIENTRY] WinQueryQueueInfo(hmq:    HMQ;
                                                                            pmqi:   PMQINFO;
                                                                            cbCopy: ULONG): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinCancelShutdown(hmq:           HMQ;
                                                                                  fCancelAlways: BOOL): BOOL;
   <* END *>

      PROCEDURE [APIENTRY] WinGetMsg(hab:            HAB;
                                                            pqmsg:          PQMSG;
                                                            hwndFilter:     HWND;
                                                            msgFilterFirst: ULONG;
                                                            msgFilterLast:  ULONG): BOOL;

      PROCEDURE [APIENTRY] WinPeekMsg(hab:               HAB;
                                                              pqmsg:             PQMSG;
                                                              hwndFilter:        HWND;
                                                              msgFilterFirst:    ULONG;
                                                              msgFilterLast:     ULONG;
                                                              fl:                ULONG): BOOL;

      PROCEDURE [APIENTRY] WinDispatchMsg(hab:     HAB;
                                                                      pqmsg:   PQMSG): MRESULT;

      PROCEDURE [APIENTRY] WinPostMsg(hwnd: HWND;
                                                              msg:  ULONG;
                                                              mp1:  MPARAM;
                                                              mp2:  MPARAM): BOOL;

      PROCEDURE [APIENTRY] WinRegisterUserMsg(hab:       HAB;
                                                                              msgid:     ULONG;
                                                                              datatype1: LONG;
                                                                              dir1:      LONG;
                                                                              datatype2: LONG;
                                                                              dir2:      LONG;
                                                                              datatyper: LONG): BOOL;

      PROCEDURE [APIENTRY] WinRegisterUserDatatype(hab:      HAB;
                                                                                        datatype: LONG;
                                                                                        count:    LONG;
                                                                                        types:    PLONG): BOOL;
      PROCEDURE [APIENTRY] WinSetMsgMode(hab:       HAB;
                                                                    classname: PCSZ;
                                                                    control:   LONG): BOOL;

      PROCEDURE [APIENTRY] WinSetSynchroMode(hab:  HAB;
                                                                            mode: LONG): BOOL;

      (*** WinPeekMsg() constants *********************************************)
      CONST PM_REMOVE                  = 00001H;
      CONST PM_NOREMOVE                = 00000H;

      (*** WinRegisterUserDatatype datatypes defined in separate file *********)
   <* IF DEFINED (INCL_WINTYPES)  THEN *>
     
(* ------------- Include file: .\hm\pmtypes.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMTYPES.H
*
* OS/2 Presentation Manager Datatypes include file
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* Comments at the end of each typedef line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)


<* NEW TYPES_INCLUDED + *>

CONST DTYP_USER               = (16384);

CONST DTYP_CTL_ARRAY         = (1);
CONST DTYP_CTL_PARRAY        =(-1);
CONST DTYP_CTL_OFFSET        = (2);
CONST DTYP_CTL_LENGTH        = (3);


(**********************************************************************)
(* Ordinary datatypes                                                 *)
(**********************************************************************)
CONST DTYP_ACCEL             = (28);
CONST DTYP_ACCELTABLE        = (29);
CONST DTYP_ARCPARAMS         = (38);
CONST DTYP_AREABUNDLE        = (139);
CONST DTYP_ATOM              = (90);
CONST DTYP_BITMAPINFO        = (60);
CONST DTYP_BITMAPINFOHEADER  = (61);
CONST DTYP_BITMAPINFO2       = (170);
CONST DTYP_BITMAPINFOHEADER2 = (171);
CONST DTYP_BIT16             = (20);
CONST DTYP_BIT32             = (21);
CONST DTYP_BIT8              = (19);
CONST DTYP_BOOL              = (18);
CONST DTYP_BTNCDATA          = (35);
CONST DTYP_BYTE              = (13);
CONST DTYP_CATCHBUF          = (141);
CONST DTYP_CHAR              = (15);
CONST DTYP_CHARBUNDLE        = (135);
CONST DTYP_CLASSINFO         = (95);
CONST DTYP_COUNT2            = (93);
CONST DTYP_COUNT2B           = (70);
CONST DTYP_COUNT2CH          = (82);
CONST DTYP_COUNT4            = (152);
CONST DTYP_COUNT4B           = (42);
CONST DTYP_CPID              = (57);
CONST DTYP_CREATESTRUCT      = (98);
CONST DTYP_CURSORINFO        = (34);
CONST DTYP_DEVOPENSTRUC      = (124);
CONST DTYP_DLGTEMPLATE       = (96);
CONST DTYP_DLGTITEM          = (97);
CONST DTYP_ENTRYFDATA        = (127);
CONST DTYP_ERRORID           = (45);
CONST DTYP_FATTRS            = (75);
CONST DTYP_FFDESCS           = (142);
CONST DTYP_FIXED             = (99);
CONST DTYP_FONTMETRICS       = (74);
CONST DTYP_FRAMECDATA        = (144);
CONST DTYP_GRADIENTL         = (48);
CONST DTYP_HAB               = (10);
CONST DTYP_HACCEL            = (30);
CONST DTYP_HAPP              = (146);
CONST DTYP_HATOMTBL          = (91);
CONST DTYP_HBITMAP           = (62);
CONST DTYP_HCINFO            = (46);
CONST DTYP_HDC               = (132);
CONST DTYP_HENUM             = (117);
CONST DTYP_HHEAP             = (109);
CONST DTYP_HINI              = (53);
CONST DTYP_HLIB              = (147);
CONST DTYP_HMF               = (85);
CONST DTYP_HMQ               = (86);
CONST DTYP_HPOINTER          = (106);
CONST DTYP_HPROGRAM          = (131);
CONST DTYP_HPS               = (12);
CONST DTYP_HRGN              = (116);
CONST DTYP_HSEM              = (140);
CONST DTYP_HSPL              = (32);
CONST DTYP_HSWITCH           = (66);
CONST DTYP_HVPS              = (58);
CONST DTYP_HWND              = (11);
CONST DTYP_IDENTITY          = (133);
CONST DTYP_IDENTITY4         = (169);
CONST DTYP_IMAGEBUNDLE       = (136);
CONST DTYP_INDEX2            = (81);
CONST DTYP_IPT               = (155);
CONST DTYP_KERNINGPAIRS      = (118);
CONST DTYP_LENGTH2           = (68);
CONST DTYP_LENGTH4           = (69);
CONST DTYP_LINEBUNDLE        = (137);
CONST DTYP_LONG              = (25);
CONST DTYP_MARKERBUNDLE      = (138);
CONST DTYP_MATRIXLF          = (113);
CONST DTYP_MLECTLDATA        = (161);
CONST DTYP_MLEMARGSTRUCT     = (157);
CONST DTYP_MLEOVERFLOW       = (158);
CONST DTYP_OFFSET2B          = (112);
CONST DTYP_OWNERITEM         = (154);
CONST DTYP_PID               = (92);
CONST DTYP_PIX               = (156);
CONST DTYP_POINTERINFO       = (105);
CONST DTYP_POINTL            = (77);
CONST DTYP_PROGCATEGORY      = (129);
CONST DTYP_PROGRAMENTRY      = (128);
CONST DTYP_PROGTYPE          = (130);
CONST DTYP_PROPERTY2         = (88);
CONST DTYP_PROPERTY4         = (89);
CONST DTYP_QMSG              = (87);
CONST DTYP_RECTL             = (121);
CONST DTYP_RESID             = (125);
CONST DTYP_RGB               = (111);
CONST DTYP_RGNRECT           = (115);
CONST DTYP_SBCDATA           = (159);
CONST DTYP_SEGOFF            = (126);
CONST DTYP_SHORT             = (23);
CONST DTYP_SIZEF             = (101);
CONST DTYP_SIZEL             = (102);
CONST DTYP_STRL              = (17);
CONST DTYP_STR16             = (40);
CONST DTYP_STR32             = (37);
CONST DTYP_STR64             = (47);
CONST DTYP_STR8              = (33);
CONST DTYP_SWBLOCK           = (63);
CONST DTYP_SWCNTRL           = (64);
CONST DTYP_SWENTRY           = (65);
CONST DTYP_SWP               = (31);
CONST DTYP_TID               = (104);
CONST DTYP_TIME              = (107);
CONST DTYP_TRACKINFO         = (73);
CONST DTYP_UCHAR             = (22);
CONST DTYP_ULONG             = (26);
CONST DTYP_USERBUTTON        = (36);
CONST DTYP_USHORT            = (24);
CONST DTYP_WIDTH4            = (108);
CONST DTYP_WNDPARAMS         = (83);
CONST DTYP_WNDPROC           = (84);
CONST DTYP_WPOINT            = (59);
CONST DTYP_WRECT             = (55);
CONST DTYP_XYWINSIZE         = (52);


(**********************************************************************)
(* Pointer datatypes                                                  *)
(**********************************************************************)
CONST DTYP_PACCEL             =(-28);
CONST DTYP_PACCELTABLE        =(-29);
CONST DTYP_PARCPARAMS         =(-38);
CONST DTYP_PAREABUNDLE        =(-139);
CONST DTYP_PATOM              =(-90);
CONST DTYP_PBITMAPINFO        =(-60);
CONST DTYP_PBITMAPINFOHEADER  =(-61);
CONST DTYP_PBITMAPINFO2       =(-170);
CONST DTYP_PBITMAPINFOHEADER2 =(-171);
CONST DTYP_PBIT16             =(-20);
CONST DTYP_PBIT32             =(-21);
CONST DTYP_PBIT8              =(-19);
CONST DTYP_PBOOL              =(-18);
CONST DTYP_PBTNCDATA          =(-35);
CONST DTYP_PBYTE              =(-13);
CONST DTYP_PCATCHBUF          =(-141);
CONST DTYP_PCHAR              =(-15);
CONST DTYP_PCHARBUNDLE        =(-135);
CONST DTYP_PCLASSINFO         =(-95);
CONST DTYP_PCOUNT2            =(-93);
CONST DTYP_PCOUNT2B           =(-70);
CONST DTYP_PCOUNT2CH          =(-82);
CONST DTYP_PCOUNT4            =(-152);
CONST DTYP_PCOUNT4B           =(-42);
CONST DTYP_PCPID              =(-57);
CONST DTYP_PCREATESTRUCT      =(-98);
CONST DTYP_PCURSORINFO        =(-34);
CONST DTYP_PDEVOPENSTRUC      =(-124);
CONST DTYP_PDLGTEMPLATE       =(-96);
CONST DTYP_PDLGTITEM          =(-97);
CONST DTYP_PENTRYFDATA        =(-127);
CONST DTYP_PERRORID           =(-45);
CONST DTYP_PFATTRS            =(-75);
CONST DTYP_PFFDESCS           =(-142);
CONST DTYP_PFIXED             =(-99);
CONST DTYP_PFONTMETRICS       =(-74);
CONST DTYP_PFRAMECDATA        =(-144);
CONST DTYP_PGRADIENTL         =(-48);
CONST DTYP_PHAB               =(-10);
CONST DTYP_PHACCEL            =(-30);
CONST DTYP_PHAPP              =(-146);
CONST DTYP_PHATOMTBL          =(-91);
CONST DTYP_PHBITMAP           =(-62);
CONST DTYP_PHCINFO            =(-46);
CONST DTYP_PHDC               =(-132);
CONST DTYP_PHENUM             =(-117);
CONST DTYP_PHHEAP             =(-109);
CONST DTYP_PHINI              =(-53);
CONST DTYP_PHLIB              =(-147);
CONST DTYP_PHMF               =(-85);
CONST DTYP_PHMQ               =(-86);
CONST DTYP_PHPOINTER          =(-106);
CONST DTYP_PHPROGRAM          =(-131);
CONST DTYP_PHPS               =(-12);
CONST DTYP_PHRGN              =(-116);
CONST DTYP_PHSEM              =(-140);
CONST DTYP_PHSPL              =(-32);
CONST DTYP_PHSWITCH           =(-66);
CONST DTYP_PHVPS              =(-58);
CONST DTYP_PHWND              =(-11);
CONST DTYP_PIDENTITY          =(-133);
CONST DTYP_PIDENTITY4         =(-169);
CONST DTYP_PIMAGEBUNDLE       =(-136);
CONST DTYP_PINDEX2            =(-81);
CONST DTYP_PIPT               =(-155);
CONST DTYP_PKERNINGPAIRS      =(-118);
CONST DTYP_PLENGTH2           =(-68);
CONST DTYP_PLENGTH4           =(-69);
CONST DTYP_PLINEBUNDLE        =(-137);
CONST DTYP_PLONG              =(-25);
CONST DTYP_PMARKERBUNDLE      =(-138);
CONST DTYP_PMATRIXLF          =(-113);
CONST DTYP_PMLECTLDATA        =(-161);
CONST DTYP_PMLEMARGSTRUCT     =(-157);
CONST DTYP_PMLEOVERFLOW       =(-158);
CONST DTYP_POFFSET2B          =(-112);
CONST DTYP_POWNERITEM         =(-154);
CONST DTYP_PPID               =(-92);
CONST DTYP_PPIX               =(-156);
CONST DTYP_PPOINTERINFO       =(-105);
CONST DTYP_PPOINTL            =(-77);
CONST DTYP_PPROGCATEGORY      =(-129);
CONST DTYP_PPROGRAMENTRY      =(-128);
CONST DTYP_PPROGTYPE          =(-130);
CONST DTYP_PPROPERTY2         =(-88);
CONST DTYP_PPROPERTY4         =(-89);
CONST DTYP_PQMSG              =(-87);
CONST DTYP_PRECTL             =(-121);
CONST DTYP_PRESID             =(-125);
CONST DTYP_PRGB               =(-111);
CONST DTYP_PRGNRECT           =(-115);
CONST DTYP_PSBCDATA           =(-159);
CONST DTYP_PSEGOFF            =(-126);
CONST DTYP_PSHORT             =(-23);
CONST DTYP_PSIZEF             =(-101);
CONST DTYP_PSIZEL             =(-102);
CONST DTYP_PSTRL              =(-17);
CONST DTYP_PSTR16             =(-40);
CONST DTYP_PSTR32             =(-37);
CONST DTYP_PSTR64             =(-47);
CONST DTYP_PSTR8              =(-33);
CONST DTYP_PSWBLOCK           =(-63);
CONST DTYP_PSWCNTRL           =(-64);
CONST DTYP_PSWENTRY           =(-65);
CONST DTYP_PSWP               =(-31);
CONST DTYP_PTID               =(-104);
CONST DTYP_PTIME              =(-107);
CONST DTYP_PTRACKINFO         =(-73);
CONST DTYP_PUCHAR             =(-22);
CONST DTYP_PULONG             =(-26);
CONST DTYP_PUSERBUTTON        =(-36);
CONST DTYP_PUSHORT            =(-24);
CONST DTYP_PWIDTH4            =(-108);
CONST DTYP_PWNDPARAMS         =(-83);
CONST DTYP_PWNDPROC           =(-84);
CONST DTYP_PWPOINT            =(-59);
CONST DTYP_PWRECT             =(-55);
CONST DTYP_PXYWINSIZE         =(-52);

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmtypes.hm ------------- *)
   <* END *>

      (*** WinRegisterUserMsg direction codes *********************************)
      CONST RUM_IN                    = 1;
      CONST RUM_OUT                   = 2;
      CONST RUM_INOUT                 = 3;

      (*** WinSetMsgMode constants *******************************************)
      CONST SMD_DELAYED                = 00001H;
      CONST SMD_IMMEDIATE              = 00002H;

      (*** WinSetSynchroMode constants ***************************************)
      CONST SSM_SYNCHRONOUS            = 00001H;
      CONST SSM_ASYNCHRONOUS           = 00002H;
      CONST SSM_MIXED                  = 00003H;

<* END *>

<* IF DEFINED (INCL_WINMESSAGEMGR)  THEN *>

      (*** WM_CALCVALIDRECTS return flags *************************************)
      CONST CVR_ALIGNLEFT               = 00001H;
      CONST CVR_ALIGNBOTTOM             = 00002H;
      CONST CVR_ALIGNRIGHT              = 00004H;
      CONST CVR_ALIGNTOP                = 00008H;
      CONST CVR_REDRAW                  = 00010H;

      (*** WM_HITTEST return codes ********************************************)
      CONST HT_NORMAL                  = 0;
      CONST HT_TRANSPARENT             = (-1);
      CONST HT_DISCARD                 = (-2);
      CONST HT_ERROR                   = (-3);

      (*** WM_SET/QUERYWINDOWPARAMS structures and flags **********************)
      TYPE WNDPARAMS = RECORD   (* wprm *)
            fsStatus:      ULONG;
            cchText:       ULONG;
            pszText:       PSZ;
            cbPresParams:  ULONG;
            pPresParams:   PVOID;
            cbCtlData:     ULONG;
            pCtlData:      PVOID;
      END;
      TYPE PWNDPARAMS = POINTER TO WNDPARAMS;

      CONST WPM_TEXT                   = 00001H;
      CONST WPM_CTLDATA                = 00002H;
      CONST WPM_PRESPARAMS             = 00004H;
      CONST WPM_CCHTEXT                = 00008H;
      CONST WPM_CBCTLDATA              = 00010H;
      CONST WPM_CBPRESPARAMS           = 00020H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinInSendMsg(hab:  HAB): BOOL;
   <* END *>

      PROCEDURE [APIENTRY] WinBroadcastMsg(hwnd: HWND;
                                                                        msg:  ULONG;
                                                                        mp1:  MPARAM;
                                                                        mp2:  MPARAM;
                                                                        rgf:  ULONG): BOOL;

      (*** WinBroadcastMsg codes **********************************************)
      CONST BMSG_POST                  = 00000H;
      CONST BMSG_SEND                  = 00001H;
      CONST BMSG_POSTQUEUE             = 00002H;
      CONST BMSG_DESCENDANTS           = 00004H;
      CONST BMSG_FRAMEONLY             = 00008H;

      PROCEDURE [APIENTRY] WinWaitMsg(hab:    HAB;
                                                          msgFirst: ULONG;
                                                          msgLast:  ULONG): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinQueryQueueStatus(hwndDesktop: HWND): ULONG;

            (*** WinQueryQueueStatus() constants *********************************)
            CONST QS_KEY                     = 00001H;
            CONST QS_MOUSEBUTTON             = 00002H;
            CONST QS_MOUSEMOVE               = 00004H;
            CONST QS_MOUSE                   = 00006H;   (* QS_MOUSEMOVE|QS_MOUSEBUTTON *)
            CONST QS_TIMER                   = 00008H;
            CONST QS_PAINT                   = 00010H;
            CONST QS_POSTMSG                 = 00020H;
            CONST QS_SEM1                    = 00040H;
            CONST QS_SEM2                    = 00080H;
            CONST QS_SEM3                    = 00100H;
            CONST QS_SEM4                    = 00200H;
            CONST QS_SENDMSG                 = 00400H;
            CONST QS_MSGINPUT                = 00800H;

            PROCEDURE [APIENTRY] WinQueryMsgPos(hab:  HAB;
                                                                        pptl:   PPOINTL): BOOL;

            PROCEDURE [APIENTRY] WinQueryMsgTime(hab: HAB): ULONG;

      <* IF NOT DEFINED (INCL_DOSSEMAPHORES)  THEN *>
         <* IF NOT DEFINED (__HEV__)  THEN *>
            <* NEW __HEV__ + *>
                        TYPE HEV = ULONG;    (* hev *)
         <* END *>
                  TYPE HMTX = ULONG;   (* hmtx *)
                  TYPE HMUX = ULONG;   (* hmux *)
      <* END *>

            PROCEDURE [APIENTRY] WinWaitEventSem(hev:      HEV;
                                                                            ulTimeout: ULONG): APIRET;

            PROCEDURE [APIENTRY] WinRequestMutexSem(hmtx:     HMTX;
                                                                                  ulTimeout: ULONG): APIRET;

            PROCEDURE [APIENTRY] WinWaitMuxWaitSem(hmux:     HMUX;
                                                                                ulTimeout: ULONG;
                                                                                pulUser:   PULONG): APIRET;


   <* END *>

      PROCEDURE [APIENTRY] WinPostQueueMsg(hmq: HMQ;
                                                                    msg:   ULONG;
                                                                    mp1:   MPARAM;
                                                                    mp2:   MPARAM): BOOL;

      (*** WinSetMsgInterest()/WinSetClassMsgInterest() constants *************)
      CONST SMIM_ALL                   = 00EFFH;
      CONST SMI_NOINTEREST             = 00001H;
      CONST SMI_INTEREST               = 00002H;
      CONST SMI_RESET                  = 00004H;
      CONST SMI_AUTODISPATCH           = 00008H;

      PROCEDURE [APIENTRY] WinSetMsgInterest(hwnd:    HWND;
                                                                        msg_class: ULONG;
                                                                        control:   LONG): BOOL;

      PROCEDURE [APIENTRY] WinSetClassMsgInterest(hab:        HAB;
                                                                                  pszClassName: PCSZ;
                                                                                  msg_class:    ULONG;
                                                                                  control:      LONG): BOOL;

<* END *>

(*** Keyboard and mouse ****************************************************)

<* IF DEFINED (INCL_WININPUT) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>

      (*** Keyboard and mouse input COMMON subsection *************************)
      PROCEDURE [APIENTRY] WinSetFocus(hwndDesktop:  HWND;
                                                            hwndSetFocus:   HWND): BOOL;

      PROCEDURE [APIENTRY] WinFocusChange(hwndDesktop:    HWND;
                                                                  hwndSetFocus:     HWND;
                                                                  flFocusChange:    ULONG): BOOL;

      PROCEDURE [EXPENTRY] WinLockupSystem(hab: HAB): BOOL;

      PROCEDURE [EXPENTRY] WinUnlockSystem(hab: HAB;  pszPassword: PCSZ): BOOL;

      CONST FC_NOSETFOCUS              = 00001H;
      CONST FC_NOBRINGTOTOP           = FC_NOSETFOCUS;
      CONST FC_NOLOSEFOCUS             = 00002H;
      CONST FC_NOBRINGTOPFIRSTWINDOW  = FC_NOLOSEFOCUS;
      CONST FC_NOSETACTIVE             = 00004H;
      CONST FC_NOLOSEACTIVE            = 00008H;
      CONST FC_NOSETSELECTION          = 00010H;
      CONST FC_NOLOSESELECTION         = 00020H;

      CONST QFC_NEXTINCHAIN            = 00001H;
      CONST QFC_ACTIVE                 = 00002H;
      CONST QFC_FRAME                  = 00003H;
      CONST QFC_SELECTACTIVE           = 00004H;
      CONST QFC_PARTOFCHAIN            = 00005H;

<* END *>

<* IF DEFINED (INCL_WININPUT)  THEN *>
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinSetCapture(hwndDesktop:  HWND;
                                                                      hwnd:           HWND): BOOL;
   <* END *>

      PROCEDURE [APIENTRY] WinQueryCapture(hwndDesktop: HWND): HWND;

      PROCEDURE [APIENTRY] WinCheckInput(hab: HAB): BOOL;

      (*** Mouse input messages ***********************************************)
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST WM_MOUSEFIRST           = 00070H;
            CONST WM_MOUSELAST            = 00079H;
            CONST WM_BUTTONCLICKFIRST     = 00071H;
            CONST WM_BUTTONCLICKLAST      = 00079H;
   <* END *>
      CONST WM_MOUSEMOVE               = 00070H;

      CONST WM_BUTTON1DOWN             = 00071H;

      CONST WM_BUTTON1UP               = 00072H;
      CONST WM_BUTTON1DBLCLK           = 00073H;
      CONST WM_BUTTON2DOWN             = 00074H;
      CONST WM_BUTTON2UP               = 00075H;
      CONST WM_BUTTON2DBLCLK           = 00076H;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST WM_BUTTON3DOWN          = 00077H;
            CONST WM_BUTTON3UP            = 00078H;
            CONST WM_BUTTON3DBLCLK        = 00079H;

            CONST WM_MOUSEMAP             = 0007DH;

            CONST WM_EXTMOUSEFIRST        = 00410H;
            CONST WM_EXTMOUSELAST         = 00419H;

            CONST WM_CHORD                = 00410H;
            CONST WM_BUTTON1MOTIONSTART   = 00411H;
            CONST WM_BUTTON1MOTIONEND     = 00412H;
            CONST WM_BUTTON1CLICK         = 00413H;
            CONST WM_BUTTON2MOTIONSTART   = 00414H;
            CONST WM_BUTTON2MOTIONEND     = 00415H;
            CONST WM_BUTTON2CLICK         = 00416H;
            CONST WM_BUTTON3MOTIONSTART   = 00417H;
            CONST WM_BUTTON3MOTIONEND     = 00418H;
            CONST WM_BUTTON3CLICK         = 00419H;

            (* Messages = 0041A - = 0041F are reserved *)

            CONST WM_MOUSETRANSLATEFIRST  = 00420H;
            CONST WM_MOUSETRANSLATELAST   = 00428H;

            CONST WM_BEGINDRAG            = 00420H;
            CONST WM_ENDDRAG              = 00421H;
            CONST WM_SINGLESELECT         = 00422H;
            CONST WM_OPEN                 = 00423H;
            CONST WM_CONTEXTMENU          = 00424H;
            CONST WM_CONTEXTHELP          = 00425H;
            CONST WM_TEXTEDIT             = 00426H;
            CONST WM_BEGINSELECT          = 00427H;
            CONST WM_ENDSELECT            = 00428H;

            CONST WM_PENFIRST             = 004C0H;
            CONST WM_PENLAST              = 004FFH;
            CONST WM_MMPMFIRST            = 00500H;
            CONST WM_MMPMLAST             = 005FFH;

   <* END *>

      PROCEDURE [APIENTRY] WinQueryFocus(hwndDesktop: HWND): HWND;


      (*** Key/Character input messages ***************************************)
      CONST WM_CHAR                    = 0007aH;
      CONST WM_VIOCHAR                 = 0007bH;

      (* WM_CHAR fs field bits *)
      CONST KC_NONE                    = 00000H;     (* Reserved *)
      CONST KC_CHAR                    = 00001H;
      CONST KC_VIRTUALKEY              = 00002H;
      CONST KC_SCANCODE                = 00004H;

      CONST KC_SHIFT                   = 00008H;
      CONST KC_CTRL                    = 00010H;
      CONST KC_ALT                     = 00020H;
      CONST KC_KEYUP                   = 00040H;
      CONST KC_PREVDOWN                = 00080H;
      CONST KC_LONEKEY                 = 00100H;
      CONST KC_DEADKEY                 = 00200H;
      CONST KC_COMPOSITE               = 00400H;
      CONST KC_INVALIDCOMP             = 00800H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST KC_TOGGLE               = 01000H;
            CONST KC_INVALIDCHAR          = 02000H;
            CONST KC_DBCSRSRVD1           = 04000H;
            CONST KC_DBCSRSRVD2           = 08000H;
   <* END *>

      -- #pragma pack(1) (* force structure alignment packing *)

      (*
      * The following structure and macro are used to access the
      * WM_MOUSEMOVE; and WM_BUTTON message parameters
      *)
      TYPE MSEMSG = RECORD   (* mousemsg *)
            x:           SHORT;     (* mp1      *)
            y:           SHORT;
            codeHitTest: USHORT;    (* mp2      *)
            fsInp:       USHORT;    (* input flags *)
      END;
      TYPE PMSEMSG = POINTER TO MSEMSG;

      --CONST MOUSEMSG(pmsg) \
      --((PMSEMSG)((PBYTE)pmsg + sizeof(MPARAM)))

      TYPE CHRMSG = RECORD   (* charmsg *)
            fs:        USHORT;                 (* mp1     *)
            cRepeat:   UCHAR;
            scancode:  UCHAR;
            chr:       USHORT;                (* mp2     *)
            vkey:      USHORT;
      END;
      TYPE PCHRMSG = POINTER TO CHRMSG;

      --CONST CHARMSG(pmsg) \
      --((PCHRMSG)((PBYTE)pmsg + sizeof(MPARAM)))

      --#pragma pack()  (* restore packing to default *)

      CONST INP_NONE                   = 00000H;
      CONST INP_KBD                    = 00001H;
      CONST INP_MULT                   = 00002H;
      CONST INP_RES2                   = 00004H;
      CONST INP_SHIFT                  = 00008H;
      CONST INP_CTRL                   = 00010H;
      CONST INP_ALT                    = 00020H;
      CONST INP_RES3                   = 00040H;
      CONST INP_RES4                   = 00080H;
      CONST INP_IGNORE                 = 0FFFFH;

      (*** Virtual key values *************************************************)
      CONST VK_BUTTON1                 = 001H;
      CONST VK_BUTTON2                 = 002H;
      CONST VK_BUTTON3                 = 003H;
      CONST VK_BREAK                   = 004H;
      CONST VK_BACKSPACE               = 005H;
      CONST VK_TAB                     = 006H;
      CONST VK_BACKTAB                 = 007H;
      CONST VK_NEWLINE                 = 008H;
      CONST VK_SHIFT                   = 009H;
      CONST VK_CTRL                    = 00AH;
      CONST VK_ALT                     = 00BH;
      CONST VK_ALTGRAF                 = 00CH;
      CONST VK_PAUSE                   = 00DH;
      CONST VK_CAPSLOCK                = 00EH;
      CONST VK_ESC                     = 00FH;
      CONST VK_SPACE                   = 010H;
      CONST VK_PAGEUP                  = 011H;
      CONST VK_PAGEDOWN                = 012H;
      CONST VK_END                     = 013H;
      CONST VK_HOME                    = 014H;
      CONST VK_LEFT                    = 015H;
      CONST VK_UP                      = 016H;
      CONST VK_RIGHT                   = 017H;
      CONST VK_DOWN                    = 018H;
      CONST VK_PRINTSCRN               = 019H;
      CONST VK_INSERT                  = 01AH;
      CONST VK_DELETE                  = 01BH;
      CONST VK_SCRLLOCK                = 01CH;
      CONST VK_NUMLOCK                 = 01DH;
      CONST VK_ENTER                   = 01EH;
      CONST VK_SYSRQ                   = 01FH;
      CONST VK_F1                      = 020H;
      CONST VK_F2                      = 021H;
      CONST VK_F3                      = 022H;
      CONST VK_F4                      = 023H;
      CONST VK_F5                      = 024H;
      CONST VK_F6                      = 025H;
      CONST VK_F7                      = 026H;
      CONST VK_F8                      = 027H;
      CONST VK_F9                      = 028H;
      CONST VK_F10                     = 029H;
      CONST VK_F11                     = 02AH;
      CONST VK_F12                     = 02BH;
      CONST VK_F13                     = 02CH;
      CONST VK_F14                     = 02DH;
      CONST VK_F15                     = 02EH;
      CONST VK_F16                     = 02FH;
      CONST VK_F17                     = 030H;
      CONST VK_F18                     = 031H;
      CONST VK_F19                     = 032H;
      CONST VK_F20                     = 033H;
      CONST VK_F21                     = 034H;
      CONST VK_F22                     = 035H;
      CONST VK_F23                     = 036H;
      CONST VK_F24                     = 037H;
      CONST VK_ENDDRAG                 = 038H;
      CONST VK_CLEAR                   = 039H;
      CONST VK_EREOF                   = 03AH;
      CONST VK_PA1                     = 03BH;


      CONST VK_MENU                  =  VK_F10;
   <* IF DEFINED (INCL_NLS)  THEN *>
            CONST VK_DBCSFIRST            = 00080H;
            CONST VK_DBCSLAST             = 000ffH;
   <* END *>

      CONST VK_USERFIRST               = 00100H;
      CONST VK_USERLAST                = 001ffH;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            PROCEDURE [APIENTRY] WinGetKeyState(hwndDesktop: HWND;
                                                                      vkey:           LONG): LONG;
            PROCEDURE [APIENTRY] WinGetPhysKeyState(hwndDesktop:     HWND;
                                                                              sc:                 LONG): LONG;
            PROCEDURE [APIENTRY] WinEnablePhysInput(hwndDesktop: HWND;
                                                                                fEnable:       BOOL): BOOL;
            PROCEDURE [APIENTRY] WinIsPhysInputEnabled(hwndDesktop: HWND): BOOL;
            PROCEDURE [APIENTRY] WinSetKeyboardStateTable(hwndDesktop:  HWND;
                                                                                            pKeyStateTable: PBYTE;
                                                                                            fSet:           BOOL): BOOL;


            (* Journal Notification messages  *)
            CONST WM_JOURNALNOTIFY           = 0007cH;

            (*** Define the valid commands (lParm1) for journal notify message *)
            CONST JRN_QUEUESTATUS            = 000000001H;
            CONST JRN_PHYSKEYSTATE           = 000000002H;

   <* END *>
<* END *>


(**** Dialog Manager *)

<* IF DEFINED (INCL_WINDIALOGS) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>
      (**** Dialog Manager COMMON subsection *)

      PROCEDURE [APIENTRY] WinGetDlgMsg(hwndDlg:  HWND;
                                                                  pqmsg:    PQMSG): BOOL;

      PROCEDURE [APIENTRY] WinLoadDlg(hwndParent: HWND;
                                                              hwndOwner:  HWND;
                                                              pfnDlgProc: PFNWP;
                                                              hmod:       HMODULE;
                                                              idDlg:      ULONG;
                                                              pCreateParams: PVOID): HWND;
      PROCEDURE [APIENTRY] WinDlgBox(hwndParent: HWND;
                                                          hwndOwner:   HWND;
                                                          pfnDlgProc:  PFNWP;
                                                          hmod:        HMODULE;
                                                          idDlg:       ULONG;
                                                          pCreateParams: PVOID): ULONG;

      PROCEDURE [APIENTRY] WinDismissDlg(hwndDlg:  HWND;
                                                                    usResult: ULONG): BOOL;

      PROCEDURE [APIENTRY] WinQueryDlgItemShort(hwndDlg: HWND;
                                                                                  idItem:  ULONG;
                                                                                  pResult: PSHORT;
                                                                                  fSigned: BOOL): BOOL;
      PROCEDURE [APIENTRY] WinSetDlgItemShort(hwndDlg:  HWND;
                                                                              idItem:   ULONG;
                                                                              usValue:  USHORT;
                                                                              fSigned:  BOOL): BOOL;
      PROCEDURE [APIENTRY] WinSetDlgItemText(hwndDlg: HWND;
                                                                            idItem:  ULONG;
                                                                            pszText: PCSZ): BOOL;
      PROCEDURE [APIENTRY] WinQueryDlgItemText(hwndDlg:     HWND;
                                                                              idItem:       ULONG;
                                                                              cchBufferMax: LONG;
                                                                              pchBuffer:    PCSZ): ULONG;
      PROCEDURE [APIENTRY] WinQueryDlgItemTextLength(hwndDlg: HWND;
                                                                                          idItem:   ULONG): LONG;

      PROCEDURE [APIENTRY] WinDefDlgProc(hwndDlg: HWND;
                                                                    msg:     ULONG;
                                                                    mp1:     MPARAM;
                                                                    mp2:     MPARAM): MRESULT;

      (* Special item IDs *)

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST DID_OK     = 1;
            CONST DID_CANCEL = 2;
            CONST DID_ERROR   = 0ffffH;
   <* END *>

      PROCEDURE [APIENTRY] WinAlarm(hwndDesktop:  HWND;
                                                    rgfType:         ULONG): BOOL;

      (* WinAlarm Codes *)

      CONST WA_WARNING             =    0;
      CONST WA_NOTE                =    1;
      CONST WA_ERROR               =    2;
      CONST WA_CWINALARMS          =   13;     (* count of valid alarms     53304*)


      PROCEDURE [APIENTRY] WinMessageBox(hwndParent: HWND;
                                                                hwndOwner:    HWND;
                                                                pszText:      PCSZ;
                                                                pszCaption:   PCSZ;
                                                                idWindow:     ULONG;
                                                                flStyle:      ULONG): ULONG;


      (* Message box types *)

      CONST MB_OK                      = 00000H;
      CONST MB_OKCANCEL                = 00001H;
      CONST MB_RETRYCANCEL             = 00002H;
      CONST MB_ABORTRETRYIGNORE        = 00003H;
      CONST MB_YESNO                   = 00004H;
      CONST MB_YESNOCANCEL             = 00005H;
      CONST MB_CANCEL                  = 00006H;
      CONST MB_ENTER                   = 00007H;
      CONST MB_ENTERCANCEL             = 00008H;

      CONST MB_NOICON                  = 00000H;
      CONST MB_CUANOTIFICATION         = 00000H;
      CONST MB_ICONQUESTION            = 00010H;
      CONST MB_ICONEXCLAMATION         = 00020H;
      CONST MB_CUAWARNING              = 00020H;
      CONST MB_ICONASTERISK            = 00030H;
      CONST MB_ICONHAND                = 00040H;
      CONST MB_CUACRITICAL             = 00040H;
      CONST MB_QUERY                  = MB_ICONQUESTION;
      CONST MB_WARNING                = MB_CUAWARNING;
      CONST MB_INFORMATION            = MB_ICONASTERISK;
      CONST MB_CRITICAL               = MB_CUACRITICAL;
      CONST MB_ERROR                  = MB_CRITICAL;

      CONST MB_DEFBUTTON1              = 00000H;
      CONST MB_DEFBUTTON2              = 00100H;
      CONST MB_DEFBUTTON3              = 00200H;

      CONST MB_APPLMODAL               = 00000H;
      CONST MB_SYSTEMMODAL             = 01000H;
      CONST MB_HELP                    = 02000H;
      CONST MB_MOVEABLE                = 04000H;


      (* Message box return codes *)

      CONST MBID_OK                   = 1;
      CONST MBID_CANCEL               = 2;
      CONST MBID_ABORT                = 3;
      CONST MBID_RETRY                = 4;
      CONST MBID_IGNORE               = 5;
      CONST MBID_YES                  = 6;
      CONST MBID_NO                   = 7;
      CONST MBID_HELP                 = 8;
      CONST MBID_ENTER                = 9;
      CONST MBID_ERROR                 = 0ffffH;


      (* Useful macros *)

      (***************************************************************************
      * ULONG/USHORT WinCheckButton(HWND hwndDlg; USHORT id; USHORT checkState)
      *    sets the check state of button #id.
      *    returns the previous check state.
      ***************************************************************************)
      --CONST WinCheckButton(hwndDlg; id; usCheckState) \
      --((ULONG)WinSendDlgItemMsg(hwndDlg; id; BM_SETCHECK; \
      --MPFROMSHORT(usCheckState); (MPARAM)NULL))

      (***************************************************************************
      * ULONG/USHORT WinQueryButtonCheckstate(HWND hwndDlg; USHORT id)
      *    returns the check state of buttin #id.
      *
      ***************************************************************************)
      --CONST WinQueryButtonCheckstate(hwndDlg; id) \
      --((ULONG)WinSendDlgItemMsg(hwndDlg; id; BM_QUERYCHECK; \
      --(MPARAM)NULL; (MPARAM)NULL))

      (***************************************************************************
      * BOOL WinEnableControl(HWND hwndDlg; USHORT id; BOOL fEnable)
      *    sets the enable state of button #id.
      *    returns fSuccess.
      ***************************************************************************)
      --CONST WinEnableControl(hwndDlg; id; fEnable) \
      --WinEnableWindow(WinWindowFromID(hwndDlg; id); fEnable)

      (***************************************************************************
      * BOOL WinIsControlEnabled(HWND hwndDlg; ULONG id)
      *    returns the enable state of control #id.
      *
      ***************************************************************************)
      --CONST WinIsControlEnabled(hwndDlg; id) \
      --((BOOL)WinIsWindowEnabled(WinWindowFromID(hwndDlg; id)))

<* END *>


<* IF DEFINED (INCL_WINDIALOGS)  THEN *>

      (* Dialog codes: returned by WM_QUERYDLGCODE msg     *)

      CONST DLGC_ENTRYFIELD    = 00001H;  (* Entry field item understands EM_SETSEL) *)
      CONST DLGC_BUTTON        = 00002H;  (* Button item                             *)
      CONST DLGC_RADIOBUTTON   = 00004H;  (* Radio button                            *)
      CONST DLGC_STATIC        = 00008H;  (* Static item                             *)
      CONST DLGC_DEFAULT       = 00010H;  (* Default push button                     *)
      CONST DLGC_PUSHBUTTON    = 00020H;  (* Normal (Non-default) push button        *)
      CONST DLGC_CHECKBOX      = 00040H;  (* Check box button control                *)
      CONST DLGC_SCROLLBAR     = 00080H;  (* Scroll bar                              *)
      CONST DLGC_MENU          = 00100H;  (* Menu                                    *)
      CONST DLGC_TABONCLICK    = 00200H;
      CONST DLGC_MLE           = 00400H;  (* Multiple Line Entry                     *)


      PROCEDURE [APIENTRY] WinProcessDlg(hwndDlg: HWND): ULONG;
      PROCEDURE [APIENTRY] WinSendDlgItemMsg(hwndDlg: HWND;
                                                                            idItem: ULONG;
                                                                            msg:    ULONG;
                                                                            mp1:    MPARAM;
                                                                            mp2:    MPARAM): MRESULT;
      PROCEDURE [APIENTRY] WinMapDlgPoints(hwndDlg: HWND;
                                                                        prgwptl: PPOINTL;
                                                                        cwpt:    ULONG;
                                                                        fCalcWindowCoords: BOOL): BOOL;
      PROCEDURE [APIENTRY] WinEnumDlgItem(hwndDlg: HWND;
                                                                      hwnd:    HWND;
                                                                      code:    ULONG): HWND;
      PROCEDURE [APIENTRY] WinSubstituteStrings(hwnd:     HWND;
                                                                                pszSrc:    PCSZ;
                                                                                cchDstMax: LONG;
                                                                                pszDst:    PCSZ): LONG;


      (* WinEnumDlgItem() constants *)

      CONST EDI_FIRSTTABITEM          = 0H;
      CONST EDI_LASTTABITEM           = 1H;
      CONST EDI_NEXTTABITEM           = 2H;
      CONST EDI_PREVTABITEM           = 3H;
      CONST EDI_FIRSTGROUPITEM        = 4H;
      CONST EDI_LASTGROUPITEM         = 5H;
      CONST EDI_NEXTGROUPITEM         = 6H;
      CONST EDI_PREVGROUPITEM         = 7H;

      (*** Dialog template definitions *)

      (*** Variable-sized dialog template items: ******************************)

      -- #pragma pack(2) (* force structure alignment packing *)

      (*************************************************************************
      *
      *  We pack the structures _DLGTITEM and _DLGTEMPLATE so that the
      *  structures are identical in the 32-bit and 16-bit worlds. We have
      *  to do this because is has been documented that one can pass a
      *  pointer to 'the binary resource format' when calling WinCreateDlg.
      *
      *************************************************************************)

      (* Binary resources may be bound into application executables or *)
      (* passed as a parameter when creating a window or dialog        *)
      (* Currently they must be the same for both 16-bit and 32-bit    *)
      (* so we pack the structures.                                    *)
      TYPE DLGTITEM = RECORD   (* dlgti *)
            fsItemStatus: USHORT;
            cChildren:    USHORT;
            cchClassName: USHORT;
            offClassName: USHORT;
            cchText:      USHORT;
            offText:      USHORT;
            flStyle:      ULONG;
            x:            SHORT;
            y:            SHORT;
            cx:           SHORT;
            cy:           SHORT;
            id:           USHORT;
            offPresParams: USHORT;
            offCtlData:    USHORT;
      END;
      TYPE PDLGTITEM = POINTER TO DLGTITEM;

      (*** Dialog Template structure ******************************************)

      (* Binary resources may be bound into application executables or *)
      (* passed as a parameter when creating a window or dialog        *)
      (* Currently they must be the same for both 16-bit and 32-bit    *)
      (* so we pack the structures.                                    *)
      TYPE DLGTEMPLATE = RECORD   (* dlgt *)
            cbTemplate:     USHORT;
            type:           USHORT;
            codepage:       USHORT;
            offadlgti:      USHORT;
            fsTemplateStatus: USHORT;
            iItemFocus:     USHORT;
            coffPresParams: USHORT;
            adlgti:         ARRAY [0..0] OF DLGTITEM;
      END;
      TYPE PDLGTEMPLATE = POINTER TO DLGTEMPLATE;

      --#pragma pack()  (* restore packing to default *)

      PROCEDURE [APIENTRY] WinCreateDlg(hwndParent:   HWND;
                                                                hwndOwner:     HWND;
                                                                pfnDlgProc:    PFNWP;
                                                                pdlgt:         PDLGTEMPLATE;
                                                                pCreateParams: PVOID): HWND;


<* END *>


<* IF DEFINED (INCL_WINSTATICS)  THEN *>

      (*** Static Control Manager *)

      (* Static control styles:
      *
      * NOTE: the top 9 bits of the LOWORD of the window flStyle are used for
      * DT_* flags.  The lower 7 bits are for SS_* styles.  This gives us up
      * to 128 distinct static control types (we currently use 11 of them).
      *)
      CONST SS_TEXT                    = 00001H;
      CONST SS_GROUPBOX                = 00002H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST SS_ICON                    = 00003H;
            CONST SS_BITMAP                  = 00004H;
   <* END *>
      CONST SS_FGNDRECT                = 00005H;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST SS_HALFTONERECT            = 00006H;
   <* END *>
      CONST SS_BKGNDRECT               = 00007H;
      CONST SS_FGNDFRAME               = 00008H;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST SS_HALFTONEFRAME           = 00009H;
   <* END *>
      CONST SS_BKGNDFRAME              = 0000aH;
      CONST SS_SYSICON                 = 0000bH;
      CONST SS_AUTOSIZE         = 00040H;


      (* Static control messages *)

      CONST SM_SETHANDLE               = 00100H;
      CONST SM_QUERYHANDLE             = 00101H;

<* END *>


<* IF DEFINED (INCL_WINBUTTONS)  THEN *>
      (**** Button Controls Subsection *)

      (* Button control styles *)

      CONST BS_PUSHBUTTON            =  0;
      CONST BS_CHECKBOX              =  1;
      CONST BS_AUTOCHECKBOX          =  2;
      CONST BS_RADIOBUTTON           =  3;
      CONST BS_AUTORADIOBUTTON       =  4;
      CONST BS_3STATE                =  5;
      CONST BS_AUTO3STATE            =  6;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST BS_USERBUTTON         =  7;
   <* END *>
      CONST BS_PRIMARYSTYLES       = 0000fH;

      CONST BS_BITMAP           = 00040H;
      CONST BS_ICON             = 00080H;
      CONST BS_HELP                    = 00100H;
      CONST BS_SYSCOMMAND              = 00200H;
      CONST BS_DEFAULT                 = 00400H;
      CONST BS_NOPOINTERFOCUS          = 00800H;
      CONST BS_NOBORDER                = 01000H;
      CONST BS_NOCURSORSELECT          = 02000H;
      CONST BS_AUTOSIZE             = 04000H;



   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            -- #pragma pack(2) (* force structure alignment packing *)

            (* Binary resources may be bound into application executables or *)
            (* passed as a parameter when creating a window or dialog        *)
            (* Currently they must be the same for both 16-bit and 32-bit    *)
            (* so we pack the structures.                                    *)
            TYPE BTNCDATA = RECORD   (* btncd *)
                  cb:            USHORT;
                  fsCheckState:  USHORT;
                  fsHiliteState: USHORT;
                  hImage:        LHANDLE;
            END;
            TYPE PBTNCDATA = POINTER TO BTNCDATA;

            -- #pragma pack()  (* restore packing to default *)

   <* END *>

      (*** User button structure (passed in WM_CONTROL msg) *******************)

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            TYPE USERBUTTON = RECORD   (* ubtn *)
                  hwnd:       HWND;
                  hps:        HPS;
                  fsState:    ULONG;
                  fsStateOld: ULONG;
            END;
            TYPE PUSERBUTTON = POINTER TO USERBUTTON;
   <* END *>

      (* Button control messages *)

      CONST BM_CLICK                   = 00120H;
      CONST BM_QUERYCHECKINDEX         = 00121H;
      CONST BM_QUERYHILITE             = 00122H;
      CONST BM_SETHILITE               = 00123H;
      CONST BM_QUERYCHECK              = 00124H;
      CONST BM_SETCHECK                = 00125H;
      CONST BM_SETDEFAULT              = 00126H;

      (* Button notification codes *)

      CONST BN_CLICKED                = 1;
      CONST BN_DBLCLICKED             = 2;
      CONST BN_PAINT                  = 3;

      (* BN_PAINT button draw state codes (must be in high byte) *)

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST BDS_HILITED                = 00100H;
            CONST BDS_DISABLED               = 00200H;
            CONST BDS_DEFAULT                = 00400H;

   <* END *>

<* END *>


<* IF DEFINED (INCL_WINENTRYFIELDS)  THEN *>
      (**** Entryfield controls Subsection *)

      (* Entry field  styles *)

      CONST ES_LEFT                    = 000000000H;
      CONST ES_CENTER                  = 000000001H;
      CONST ES_RIGHT                   = 000000002H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST ES_AUTOSCROLL              = 000000004H;
   <* END *>

      CONST ES_MARGIN                  = 000000008H;
      CONST ES_AUTOTAB                 = 000000010H;
      CONST ES_READONLY                = 000000020H;
      CONST ES_COMMAND                 = 000000040H;
      CONST ES_UNREADABLE              = 000000080H;
      CONST ES_AUTOSIZE                = 000000200H;

   <* IF DEFINED (INCL_NLS)  THEN *>
            CONST ES_ANY                     = 000000000H;
            CONST ES_SBCS                    = 000001000H;
            CONST ES_DBCS                    = 000002000H;
            CONST ES_MIXED                   = 000003000H;
   <* END *>


      (*
      * combo box styles
      *)
      CONST CBS_SIMPLE                 = 00001H;
      CONST CBS_DROPDOWN               = 00002H;
      CONST CBS_DROPDOWNLIST           = 00004H;

      (*
      * Use this bit for drop down combo boxes that do not want to
      * receive a CBN_ENTER on a single click in their list boxes.
      * This is for compatibility with releases prior to OS/2 2.0 which
      * did not send this message
      *)
      CONST CBS_COMPATIBLE             = 00008H;

      (*
      * The following edit and listbox styles may be used in conjunction
      * with CBS_ styles
      * ES_AUTOTAB ES_ANY ES_SBCS ES_DBCS ES_MIXED LS_HORZSCROLL
      *)

      (*
      * IDs of combobox entry field and listbox.
      *)
      CONST CBID_LIST                  = 0029AH;
      CONST CBID_EDIT                  = 0029BH;

      CONST CBM_SHOWLIST               = 00170H;
      CONST CBM_HILITE                 = 00171H;
      CONST CBM_ISLISTSHOWING          = 00172H;

      CONST CBN_EFCHANGE              = 1;
      CONST CBN_EFSCROLL              = 2;
      CONST CBN_MEMERROR              = 3;
      CONST CBN_LBSELECT              = 4;
      CONST CBN_LBSCROLL              = 5;
      CONST CBN_SHOWLIST              = 6;
      CONST CBN_ENTER                 = 7;


   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            -- #pragma pack(2) (* force structure alignment packing *)

            (* Binary resources may be bound into application executables or *)
            (* passed as a parameter when creating a window or dialog        *)
            (* Currently they must be the same for both 16-bit and 32-bit    *)
            (* so we pack the structures.                                    *)
            TYPE ENTRYFDATA = RECORD   (* efd *)
                  cb:            USHORT;
                  cchEditLimit:  USHORT;
                  ichMinSel:     USHORT;
                  ichMaxSel:     USHORT;
            END;
            TYPE PENTRYFDATA = POINTER TO ENTRYFDATA;

            --#pragma pack()  (* restore packing to default *)

   <* END *>

      (* Entry Field  messages *)

      CONST EM_QUERYCHANGED            = 00140H;
      CONST EM_QUERYSEL                = 00141H;
      CONST EM_SETSEL                  = 00142H;
      CONST EM_SETTEXTLIMIT            = 00143H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST EM_CUT                     = 00144H;
            CONST EM_COPY                    = 00145H;
   <* END *>
      CONST EM_CLEAR                   = 00146H;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST EM_PASTE                   = 00147H;
   <* END *>
      CONST EM_QUERYFIRSTCHAR          = 00148H;
      CONST EM_SETFIRSTCHAR            = 00149H;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST EM_QUERYREADONLY           = 0014aH;
            CONST EM_SETREADONLY             = 0014bH;
            CONST EM_SETINSERTMODE           = 0014cH;
   <* END *>

      (* Entry Field notification messages *)

      CONST EN_SETFOCUS                = 00001H;
      CONST EN_KILLFOCUS               = 00002H;
      CONST EN_CHANGE                  = 00004H;
      CONST EN_SCROLL                  = 00008H;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST EN_MEMERROR                = 00010H;
            CONST EN_OVERFLOW                = 00020H;
            CONST EN_INSERTMODETOGGLE        = 00040H;
   <* END *>

<* END *>


(*  Multiple Line Entrys *)
<* IF DEFINED (INCL_WINMLE)  THEN *>
  <* IF NOT DEFINED (MLE_INCLUDED)  THEN *>
     
(* ------------- Include file: .\hm\pmmle.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMMLE.H
*
* OS/2 Presentation Manager MultiLine Edit Control
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* The following symbols are used in this file for conditional sections.
*
*   CONST:                To include:
*
*   INCL_WINMLE             Includes this file
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)


   <* NEW MLE_INCLUDED + *>

      (*************************************************************************
      * MLE Window styles ( in addition to WS_* )
      *************************************************************************)
      CONST MLS_WORDWRAP             =  00000001H;
      CONST MLS_BORDER               =  00000002H;
      CONST MLS_VSCROLL              =  00000004H;
      CONST MLS_HSCROLL              =  00000008H;
      CONST MLS_READONLY             =  00000010H;
      CONST MLS_IGNORETAB            =  00000020H;
      CONST MLS_DISABLEUNDO          =  00000040H;

      (*************************************************************************
      * MLE External Data Types
      *************************************************************************)
      TYPE IPT  = LONG;            (* insertion point         *)
      TYPE PIPT = POINTER TO IPT;  (* insertion point         *)
      TYPE PIX  = LONG;            (* pixel                   *)
      TYPE LINE = ULONG;           (* Line number             *)

      TYPE MLEFORMATRECT = RECORD   (* MLEFRD *)
            cxFormat:   LONG;           (* format rectangle width  *)
            cyFormat:   LONG;           (* format rectangle height *)
      END;
      TYPE PFORMATRECT = POINTER TO MLEFORMATRECT;

      TYPE MLECTLDATA = RECORD   (* MLECTL *)
            cbCtlData:     USHORT;     (* Length of the MLECTLDATA structure  *)
            afIEFormat:    USHORT;     (* import/export format                *)
            cchText:       ULONG;      (* text limit                          *)
            iptAnchor:     IPT;        (* beginning of selection              *)
            iptCursor:     IPT;        (* ending of selection                 *)
            cxFormat:      LONG;       (* format rectangle width              *)
            cyFormat:      LONG;       (* format rectangle height             *)
            afFormatFlags: ULONG;      (* formatting rectangle flags          *)
      END;
      TYPE PMLECTLDATA = POINTER TO MLECTLDATA;

      (*************************************************************************
      * afFormatFlags mask
      *************************************************************************)
      CONST MLFFMTRECT_LIMITHORZ     =  00000001H;
      CONST MLFFMTRECT_LIMITVERT     =  00000002H;
      CONST MLFFMTRECT_MATCHWINDOW   =  00000004H;
      CONST MLFFMTRECT_FORMATRECT    =  00000007H;

      (*************************************************************************
      * afIEFormat - Import/Export Format flags
      *************************************************************************)
      CONST MLFIE_CFTEXT             =  0;
      CONST MLFIE_NOTRANS            =  1;
      CONST MLFIE_WINFMT             =  2;
      CONST MLFIE_RTF                =  3;

      (*************************************************************************
      * MLN_OVERFLOW structure
      *************************************************************************)
      TYPE MLEOVERFLOW = RECORD   (* overflow *)
            afErrInd:      ULONG;         (* see mask below                         *)
            nBytesOver:    LONG;          (* number of bytes overflowed             *)
            pixHorzOver:   LONG;          (* number of pixels horizontally overflow *)
            pixVertOver:   LONG;          (* number of pixels vertically overflowed *)
      END;
      TYPE POVERFLOW = POINTER TO MLEOVERFLOW;

      (*************************************************************************
      * afErrInd - error format rectangle flags
      *************************************************************************)
      CONST MLFEFR_RESIZE            =  00000001H;
      CONST MLFEFR_TABSTOP           =  00000002H;
      CONST MLFEFR_FONT              =  00000004H;
      CONST MLFEFR_TEXT              =  00000008H;
      CONST MLFEFR_WORDWRAP          =  00000010H;
      CONST MLFETL_TEXTBYTES         =  00000020H;

      (*************************************************************************
      * MLN_MARGIN structure
      *************************************************************************)
      TYPE MLEMARGSTRUCT = RECORD   (* margin *)
            afMargins:  USHORT;      (* margin indicator     *)
            usMouMsg:   USHORT;      (* mouse message        *)
            iptNear:    IPT;         (* the geometrically nearest insertion point *)
      END;
      TYPE PMARGSTRUCT = POINTER TO MLEMARGSTRUCT;

      (*************************************************************************
      * afFlags - margin notification indicators
      *************************************************************************)
      CONST MLFMARGIN_LEFT           =  0001H;
      CONST MLFMARGIN_BOTTOM         =  0002H;
      CONST MLFMARGIN_RIGHT          =  0003H;
      CONST MLFMARGIN_TOP            =  0004H;

      (*************************************************************************
      * MLM_QUERYSELECTION flags
      *************************************************************************)
      CONST MLFQS_MINMAXSEL          =  0;
      CONST MLFQS_MINSEL             =  1;
      CONST MLFQS_MAXSEL             =  2;
      CONST MLFQS_ANCHORSEL          =  3;
      CONST MLFQS_CURSORSEL          =  4;

      (*************************************************************************
      * MLN_CLPBDFAIL flags
      *************************************************************************)
      CONST MLFCLPBD_TOOMUCHTEXT     =  00000001H;
      CONST MLFCLPBD_ERROR           =  00000002H;

      (*************************************************************************
      * MLM_SEARCH structure
      *************************************************************************)
      TYPE MLE_SEARCHDATA = RECORD   (* search *)
            cb:          USHORT;            (* size of search spec structure       *)
            pchFind:     PCHAR;       (* string to search for                *)
            pchReplace:  PCHAR;    (* string to replace with              *)
            cchFind:     SHORT;       (* length of pchFindString             *)
            cchReplace:  SHORT;    (* length of replace string            *)
            iptStart:    IPT;      (* point at which to start search      *)
            (* (negative indicates cursor pt)      *)
            (* becomes pt where string found       *)
            iptStop:     IPT;       (* point at which to stop search       *)
            (* (negative indicates EOT)            *)
            cchFound:    USHORT;      (* Length of found string at iptStart  *)
      END;
      TYPE PMLE_SEARCHDATA = POINTER TO MLE_SEARCHDATA;

      (*************************************************************************
      * MLM_SEARCH style flags
      *************************************************************************)
      CONST MLFSEARCH_CASESENSITIVE  =  000000001H;
      CONST MLFSEARCH_SELECTMATCH    =  000000002H;
      CONST MLFSEARCH_CHANGEALL      =  000000004H;

      (*************************************************************************
      * MLE messages - MLM from 0x01b0 to 0x01de; MLN from 0x0001 to 0x000f
      *************************************************************************)
      (* formatting messages *)
      CONST MLM_SETTEXTLIMIT         =  01B0H;
      CONST MLM_QUERYTEXTLIMIT       =  01B1H;
      CONST MLM_SETFORMATRECT        =  01B2H;
      CONST MLM_QUERYFORMATRECT      =  01B3H;
      CONST MLM_SETWRAP              =  01B4H;
      CONST MLM_QUERYWRAP            =  01B5H;
      CONST MLM_SETTABSTOP           =  01B6H;
      CONST MLM_QUERYTABSTOP         =  01B7H;
      CONST MLM_SETREADONLY          =  01B8H;
      CONST MLM_QUERYREADONLY        =  01B9H;

      (* text content manipulation and queries messages *)
      CONST MLM_QUERYCHANGED         =  01BAH;
      CONST MLM_SETCHANGED           =  01BBH;
      CONST MLM_QUERYLINECOUNT       =  01BCH;
      CONST MLM_CHARFROMLINE         =  01BDH;
      CONST MLM_LINEFROMCHAR         =  01BEH;
      CONST MLM_QUERYLINELENGTH      =  01BFH;
      CONST MLM_QUERYTEXTLENGTH      =  01C0H;

      (* text import and export messages *)
      CONST MLM_FORMAT               =  01C1H;
      CONST MLM_SETIMPORTEXPORT      =  01C2H;
      CONST MLM_IMPORT               =  01C3H;
      CONST MLM_EXPORT               =  01C4H;
      CONST MLM_DELETE               =  01C6H;
      CONST MLM_QUERYFORMATLINELENGTH=  01C7H;
      CONST MLM_QUERYFORMATTEXTLENGTH=  01C8H;
      CONST MLM_INSERT               =  01C9H;

      (* selection messages *)
      CONST MLM_SETSEL               =  01CAH;
      CONST MLM_QUERYSEL             =  01CBH;
      CONST MLM_QUERYSELTEXT         =  01CCH;

      (* undo and redo messages *)
      CONST MLM_QUERYUNDO            =  01CDH;
      CONST MLM_UNDO                 =  01CEH;
      CONST MLM_RESETUNDO            =  01CFH;

      (* text attributes messages *)
      CONST MLM_QUERYFONT            =  01D0H;
      CONST MLM_SETFONT              =  01D1H;
      CONST MLM_SETTEXTCOLOR         =  01D2H;
      CONST MLM_QUERYTEXTCOLOR       =  01D3H;
      CONST MLM_SETBACKCOLOR         =  01D4H;
      CONST MLM_QUERYBACKCOLOR       =  01D5H;

      (* scrolling messages *)
      CONST MLM_QUERYFIRSTCHAR       =  01D6H;
      CONST MLM_SETFIRSTCHAR         =  01D7H;

      (* clipboard messages *)
      CONST MLM_CUT                  =  01D8H;
      CONST MLM_COPY                 =  01D9H;
      CONST MLM_PASTE                =  01DAH;
      CONST MLM_CLEAR                =  01DBH;

      (* display manipulation messages *)
      CONST MLM_ENABLEREFRESH        =  01DCH;
      CONST MLM_DISABLEREFRESH       =  01DDH;

      (* search message *)
      CONST MLM_SEARCH               =  001DEH;
      CONST MLM_QUERYIMPORTEXPORT    =  001DFH;

      (* notification messages *)
      CONST MLN_OVERFLOW             =  0001H;
      CONST MLN_PIXHORZOVERFLOW      =  0002H;
      CONST MLN_PIXVERTOVERFLOW      =  0003H;
      CONST MLN_TEXTOVERFLOW         =  0004H;
      CONST MLN_VSCROLL              =  0005H;
      CONST MLN_HSCROLL              =  0006H;
      CONST MLN_CHANGE               =  0007H;
      CONST MLN_SETFOCUS             =  0008H;
      CONST MLN_KILLFOCUS            =  0009H;
      CONST MLN_MARGIN               =  000AH;
      CONST MLN_SEARCHPAUSE          =  000BH;
      CONST MLN_MEMERROR             =  000CH;
      CONST MLN_UNDOOVERFLOW         =  000DH;
      CONST MLN_CLPBDFAIL            =  000EH;

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmmle.hm ------------- *)
  <* END *>
<* END *>
<* IF DEFINED (INCL_WINLISTBOXES)  THEN *>

      (**** Listboxes *)

      (* List box styles *)

      CONST LS_MULTIPLESEL             = 000000001H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST LS_OWNERDRAW               = 000000002H;
   <* END *>

      CONST LS_NOADJUSTPOS             = 000000004H;
      CONST LS_HORZSCROLL              = 000000008H;

      CONST LS_EXTENDEDSEL             = 000000010H;


      (* List box notification messages *)

      CONST LN_SELECT                = 1;
      CONST LN_SETFOCUS              = 2;
      CONST LN_KILLFOCUS             = 3;
      CONST LN_SCROLL                = 4;
      CONST LN_ENTER                 = 5;

      (* List box messages *)

      CONST LM_QUERYITEMCOUNT          = 00160H;
      CONST LM_INSERTITEM              = 00161H;
      CONST LM_SETTOPINDEX             = 00162H;
      CONST LM_DELETEITEM              = 00163H;
      CONST LM_SELECTITEM              = 00164H;
      CONST LM_QUERYSELECTION          = 00165H;
      CONST LM_SETITEMTEXT             = 00166H;
      CONST LM_QUERYITEMTEXTLENGTH     = 00167H;
      CONST LM_QUERYITEMTEXT           = 00168H;

      CONST LM_SETITEMHANDLE           = 00169H;
      CONST LM_QUERYITEMHANDLE         = 0016aH;
      CONST LM_SEARCHSTRING            = 0016bH;
      CONST LM_SETITEMHEIGHT           = 0016cH;
      CONST LM_QUERYTOPINDEX           = 0016dH;
      CONST LM_DELETEALL               = 0016eH;

      (* List box constants *)

      CONST LIT_CURSOR              =   (-4);
      CONST LIT_ERROR               =   (-3);
      CONST LIT_MEMERROR            =   (-2);
      CONST LIT_NONE                =   (-1);
      CONST LIT_FIRST               =   (-1);

      (* For LM_INSERTITEM msg *)

      CONST LIT_END                 =   (-1);
      CONST LIT_SORTASCENDING       =   (-2);
      CONST LIT_SORTDESCENDING      =   (-3);

      (* For LM_SEARCHSTRING msg *)

      CONST LSS_SUBSTRING              = 00001H;
      CONST LSS_PREFIX                 = 00002H;
      CONST LSS_CASESENSITIVE          = 00004H;


      (* Useful macros *)

      (***************************************************************************
      * LONG/SHORT WinDeleteLboxItem(HWND hwndLbox; LONG/SHORT index)
      *    deletes item index from the listbox.
      *    returns the number of items left.
      ***************************************************************************)
      --CONST WinDeleteLboxItem(hwndLbox; index) \
      --((LONG)WinSendMsg(hwndLbox; LM_DELETEITEM; MPFROMLONG(index); \
      --(MPARAM)NULL))

      (***************************************************************************
      * LONG/SHORT WinInsertLboxItem(HWND hwndLbox; LONG/SHORT index; PSZ psz)
      *    inserts psz into a listbox at index.  Index may be an LIT_ constant.
      *    returns the actual index where it was inserted.
      ***************************************************************************)
      --CONST WinInsertLboxItem(hwndLbox; index; psz) \
      --((LONG)WinSendMsg(hwndLbox; LM_INSERTITEM; MPFROMLONG(index); \
      --MPFROMP(psz)))

      (***************************************************************************
      * LONG/SHORT WinQueryLboxCount(HWND hwndLbox)
      *    returns the number of items in the listbox.
      *
      ***************************************************************************)
      --CONST WinQueryLboxCount(hwndLbox) \
      --((LONG)WinSendMsg(hwndLbox; LM_QUERYITEMCOUNT; (MPARAM)NULL; \
      --(MPARAM)NULL))

      (***************************************************************************
      * LONG/SHORT WinQueryLboxItemText(HWND hwndLbox; LONG/SHORT index; PSZ psz; SHORT cchMax)
      *    fills psz with the text if item index.
      *    returns the text length copied.
      ***************************************************************************)
      --CONST WinQueryLboxItemText(hwndLbox; index; psz; cchMax) \
      --((LONG)WinSendMsg(hwndLbox; LM_QUERYITEMTEXT; \
      --MPFROM2SHORT((index); (cchMax)); MPFROMP(psz)))

      (***************************************************************************
      * LONG/SHORT WinQueryLboxItemTextLength(HWND hwndLbox; LONG/SHORT index)
      *    returns the length of item index.
      *
      ***************************************************************************)
      --CONST WinQueryLboxItemTextLength(hwndLbox; index)         \
      --((SHORT)WinSendMsg(hwndLbox; LM_QUERYITEMTEXTLENGTH;    \
      --MPFROMSHORT(index); (MPARAM)NULL))

      (***************************************************************************
      * BOOL WinSetLboxItemText(HWND hwndLbox; LONG/SHORT index; PSZ psz)
      *    sets the text of item index to psz.
      *    returns fSuccess.
      ***************************************************************************)
      --CONST WinSetLboxItemText(hwndLbox; index; psz) \
      --((BOOL)WinSendMsg(hwndLbox; LM_SETITEMTEXT; \
      --MPFROMLONG(index); MPFROMP(psz)))

      (***************************************************************************
      * LONG/SHORT WinQueryLboxSelectedItem(HWND hwndLbox)
      *    returns the item index selected. (for single selection only)
      *
      ***************************************************************************)
      --CONST WinQueryLboxSelectedItem(hwndLbox) \
      --((LONG)WinSendMsg(hwndLbox; LM_QUERYSELECTION; MPFROMLONG(LIT_FIRST); \
      --(MPARAM)NULL))

<* END *>


<* IF DEFINED (INCL_WINMENUS)  THEN *>

      (**** Menu Manager Subsection *)

      (* Menu control styles *)

      CONST MS_ACTIONBAR               = 000000001H;
      CONST MS_TITLEBUTTON             = 000000002H;
      CONST MS_VERTICALFLIP            = 000000004H;

      CONST MS_CONDITIONALCASCADE      = 000000040H;

      PROCEDURE [APIENTRY] WinLoadMenu(hwndFrame: HWND;
                                                          hmod:         HMODULE;
                                                          idMenu:       ULONG): HWND;


      (* Menu control messages *)

      CONST MM_INSERTITEM              = 00180H;
      CONST MM_DELETEITEM              = 00181H;
      CONST MM_QUERYITEM               = 00182H;
      CONST MM_SETITEM                 = 00183H;
      CONST MM_QUERYITEMCOUNT          = 00184H;
      CONST MM_STARTMENUMODE           = 00185H;
      CONST MM_ENDMENUMODE             = 00186H;
      CONST MM_REMOVEITEM              = 00188H;
      CONST MM_SELECTITEM              = 00189H;
      CONST MM_QUERYSELITEMID          = 0018aH;
      CONST MM_QUERYITEMTEXT           = 0018bH;
      CONST MM_QUERYITEMTEXTLENGTH     = 0018cH;
      CONST MM_SETITEMHANDLE           = 0018dH;
      CONST MM_SETITEMTEXT             = 0018eH;
      CONST MM_ITEMPOSITIONFROMID      = 0018fH;
      CONST MM_ITEMIDFROMPOSITION      = 00190H;
      CONST MM_QUERYITEMATTR           = 00191H;
      CONST MM_SETITEMATTR             = 00192H;
      CONST MM_ISITEMVALID             = 00193H;
      CONST MM_QUERYITEMRECT           = 00194H;

      CONST MM_QUERYDEFAULTITEMID      = 00431H;
      CONST MM_SETDEFAULTITEMID        = 00432H;

   <* IF NOT DEFINED (MTI_INCLUDED)  THEN *>
      <* NEW MTI_INCLUDED + *>

            TYPE MTI = RECORD     (* mti *)
                  afStyle: USHORT;      (* Style Flags      *)
                  pad:     USHORT;      (* pad for template *)
                  idItem:  USHORT;      (* Item ID          *)
                  c:       ARRAY [0..1] OF CHAR;
            END;

            TYPE MT = RECORD      (* mt *)
                  len:        ULONG;                  (* Length of template in bytes *)
                  codepage:   USHORT;                 (* Codepage                    *)
                  reserved:   USHORT;                 (* Reserved.                   *)
                  cMti:       USHORT;                 (* Count of template items.    *)
                  rgMti:      ARRAY [0..0] OF MTI;    (* Array of template items.    *)
            END;
            TYPE LPMT = POINTER TO MT;

   <* END *>

      PROCEDURE [APIENTRY] WinCreateMenu(hwndParent: HWND;
                                                              lpmt:          PVOID): HWND;

      (* Owner Item Structure (Also used for listboxes) *)

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            TYPE OWNERITEM = RECORD   (* oi *)
                  hwnd:          HWND;
                  hps:           HPS;
                  fsState:       ULONG;
                  fsAttribute:   ULONG;
                  fsStateOld:    ULONG;
                  fsAttributeOld: ULONG;
                  rclItem:       RECTL;
                  idItem:        LONG; (* This field contains idItem for menus; iItem for lb. *)
                  hItem:         ULONG;
            END;
            TYPE POWNERITEM = POINTER TO OWNERITEM;
   <* END *>

      (* Menu item *)

      --#pragma pack(2) (* force structure alignment packing *)

      (* Binary resources may be bound into application executables or *)
      (* passed as a parameter when creating a window or dialog        *)
      (* Currently they must be the same for both 16-bit and 32-bit    *)
      (* so we pack the structures.                                    *)
      TYPE MENUITEM = RECORD   (* mi *)
            iPosition:    SHORT;
            afStyle:      USHORT;
            afAttribute:  USHORT;
            id:           USHORT;
            hwndSubMenu:  HWND;
            hItem:        ULONG;
      END;
      TYPE PMENUITEM = POINTER TO MENUITEM;

      --#pragma pack()  (* restore packing to default *)

      CONST MIT_END                   = (-1);
      CONST MIT_NONE                  = (-1);
      CONST MIT_MEMERROR              = (-1);
      CONST MIT_ERROR                 = (-1);
      CONST MIT_FIRST                 = (-2);
      CONST MIT_LAST                  = (-3);
      CONST MID_NONE                  = MIT_NONE;
      CONST MID_ERROR                 = (-1);

      (* Menu item styles & attributes *)

      CONST MIS_TEXT                   = 00001H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST MIS_BITMAP                 = 00002H;
   <* END *>
      CONST MIS_SEPARATOR              = 00004H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST MIS_OWNERDRAW              = 00008H;
   <* END *>

      CONST MIS_SUBMENU                = 00010H;
      CONST MIS_MULTMENU               = 00020H;      (* multiple choice submenu     *)
      CONST MIS_SYSCOMMAND             = 00040H;
      CONST MIS_HELP                   = 00080H;
      CONST MIS_STATIC                 = 00100H;
      CONST MIS_BUTTONSEPARATOR        = 00200H;
      CONST MIS_BREAK                  = 00400H;
      CONST MIS_BREAKSEPARATOR         = 00800H;
      CONST MIS_GROUP                  = 01000H;      (* multiple choice group start *)
      (* In multiple choice submenus a style of 'single' denotes the item is a
      ** radiobutton.  Absence of this style defaults the item to a checkbox.       *)
      CONST MIS_SINGLE                 = 02000H;

      CONST MIA_NODISMISS              = 00020H;
      CONST MIA_FRAMED                 = 01000H;
      CONST MIA_CHECKED                = 02000H;
      CONST MIA_DISABLED               = 04000H;
      CONST MIA_HILITED                = 08000H;


      PROCEDURE [APIENTRY] WinPopupMenu(hwndParent: HWND;
                                                            hwndOwner:   HWND;
                                                            hwndMenu:    HWND;
                                                            x:           LONG;
                                                            y:           LONG;
                                                            idItem:      LONG;
                                                            fs:          ULONG): BOOL;

      (* Values of fs in WinPopupMenu call *)

      CONST PU_POSITIONONITEM          = 00001H; (* Need idItem parameter *)

      CONST PU_HCONSTRAIN              = 00002H; (* Keep menu on left and right edge *)
      CONST PU_VCONSTRAIN              = 00004H; (* Keep menu on top and bottom edge *)

      CONST PU_NONE                    = 00000H; (* If invoked by keyboard *)
      CONST PU_MOUSEBUTTON1DOWN        = 00008H; (* If invoked by button 1 *)
      CONST PU_MOUSEBUTTON2DOWN        = 00010H; (* If invoked by button 2 *)
      CONST PU_MOUSEBUTTON3DOWN        = 00018H; (* If invoked by button 3 *)

      CONST PU_SELECTITEM              = 00020H; (* Set selected item (use with kbd) *)

      CONST PU_MOUSEBUTTON1            = 00040H; (* If button1 use allowed *)
      CONST PU_MOUSEBUTTON2            = 00080H; (* If button2 use allowed *)
      CONST PU_MOUSEBUTTON3            = 00100H; (* If button3 use allowed *)
      CONST PU_KEYBOARD                = 00200H; (* If keyboard use allowed *)


      (* Useful macros *)

      (***************************************************************************
      * BOOL WinCheckMenuItem(HWND hwndMenu; ULONG/USHORT id; BOOL fcheck)
      *    Sets the check state of menuitem #id to fcheck.
      *    returns fSuccess.
      ***************************************************************************)
      --CONST WinCheckMenuItem(hwndMenu; id; fcheck) \
      --((BOOL)WinSendMsg(hwndMenu; MM_SETITEMATTR; \
      --MPFROM2SHORT(id; TRUE); \
      --MPFROM2SHORT(MIA_CHECKED; (USHORT)(fcheck) ? MIA_CHECKED : 0)))

      (***************************************************************************
      * BOOL WinIsMenuItemChecked(HWND hwndMenu; USHORT/ULONG id)
      *    returns the check state of menuitem #id.
      *
      ***************************************************************************)
      --CONST WinIsMenuItemChecked(hwndMenu; id) \
      --((BOOL)WinSendMsg(hwndMenu; MM_QUERYITEMATTR; \
      --MPFROM2SHORT(id; TRUE); \
      --MPFROMLONG(MIA_CHECKED)))

      (***************************************************************************
      * BOOL WinEnableMenuItem(HWND hwndMenu; ULONG/USHORT id; BOOL fenable)
      *    sets the enable state of menuitem #id to fenable.
      *    returns fSuccess.
      ***************************************************************************)
      --CONST WinEnableMenuItem(hwndMenu; id; fEnable) \
      --((BOOL)WinSendMsg(hwndMenu; MM_SETITEMATTR; \
      --MPFROM2SHORT(id; TRUE); \
      --MPFROM2SHORT(MIA_DISABLED; (USHORT)(fEnable) ? 0 : MIA_DISABLED)))

      (***************************************************************************
      * BOOL WinIsMenuItemEnabled(HWND hwndMenu; USHORT/ULONG id)
      *    returns the enable state of menuitem #id.
      *
      ***************************************************************************)
      --CONST WinIsMenuItemEnabled(hwndMenu; id)  \
      --(!(BOOL)WinSendMsg(hwndMenu; MM_QUERYITEMATTR; \
      --MPFROM2SHORT(id; TRUE); \
      --MPFROMLONG(MIA_DISABLED)))

      (***************************************************************************
      * BOOL WinSetMenuItemText(HWND hwndMenu; ULONG/USHORT id; PSZ psz)
      *    sets the text of menuitem #id.
      *    returns fSuccess.
      ***************************************************************************)
      --CONST WinSetMenuItemText(hwndMenu; id; psz) \
      --((BOOL)WinSendMsg(hwndMenu; MM_SETITEMTEXT; \
      --MPFROMLONG(id); MPFROMP(psz)))

      (***************************************************************************
      * BOOL WinIsMenuItemValid(HWND hwndMenu; ULONG/USHORT id)
      *    Returns TRUE if the specified item is a valid choice.
      ***************************************************************************)
      --CONST WinIsMenuItemValid(hwndMenu; id) \
      --((BOOL)WinSendMsg(hwndMenu; MM_ISITEMVALID; \
      --MPFROM2SHORT(id; TRUE); MPFROMLONG(FALSE)))

<* END *>


<* IF DEFINED (INCL_WINSCROLLBARS)  THEN *>

      (*** Scroll Bar controls Subsection *)

      (* Scroll Bar styles *)

      CONST SBS_HORZ                 =  0;
      CONST SBS_VERT                 =  1;
      CONST SBS_THUMBSIZE            =  2;
      CONST SBS_AUTOTRACK            =  4;
      CONST SBS_AUTOSIZE        = 02000H;



      (* Scroll Bar messages *)

      CONST SBM_SETSCROLLBAR           = 001a0H;
      CONST SBM_SETPOS                 = 001a1H;
      CONST SBM_QUERYPOS               = 001a2H;
      CONST SBM_QUERYRANGE             = 001a3H;
      CONST SBM_SETTHUMBSIZE           = 001a6H;

      (* Scroll Bar Commands *)

      CONST SB_LINEUP                =  1;
      CONST SB_LINEDOWN              =  2;
      CONST SB_LINELEFT              =  1;
      CONST SB_LINERIGHT             =  2;
      CONST SB_PAGEUP                =  3;
      CONST SB_PAGEDOWN              =  4;
      CONST SB_PAGELEFT              =  3;
      CONST SB_PAGERIGHT             =  4;
      CONST SB_SLIDERTRACK           =  5;
      CONST SB_SLIDERPOSITION        =  6;
      CONST SB_ENDSCROLL             =  7;


   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            --#pragma pack(2) (* force structure alignment packing *)

            (* Binary resources may be bound into application executables or *)
            (* passed as a parameter when creating a window or dialog        *)
            (* Currently they must be the same for both 16-bit and 32-bit    *)
            (* so we pack the structures.                                    *)
            TYPE SBCDATA = RECORD   (* sbcd *)
                  cb:            USHORT;
                  sHilite:       USHORT; (* reserved; should be set to zero *)
                  posFirst:      SHORT;
                  posLast:       SHORT;
                  posThumb:      SHORT;
                  cVisible:      SHORT;
                  cTotal:        SHORT;
            END;
            TYPE PSBCDATA = POINTER TO SBCDATA;

            --#pragma pack()  (* restore packing to default *)
   <* END *>

<* END *>


<* IF DEFINED (INCL_WINFRAMEMGR) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>
      (*** Frame Manager Common subsection *)

      --#pragma pack(2) (* force structure alignment packing *)

      (* Binary resources may be bound into application executables or *)
      (* passed as a parameter when creating a window or dialog        *)
      (* Currently they must be the same for both 16-bit and 32-bit    *)
      (* so we pack the structures.                                    *)
      TYPE FRAMECDATA = RECORD   (* fcdata *)
            cb:               USHORT;
            flCreateFlags:    ULONG;
            hmodResources:    USHORT;
            idResources:      USHORT;
      END;
      TYPE PFRAMECDATA = POINTER TO FRAMECDATA;

      --#pragma pack()  (* restore packing to default *)

      (* Frame window styles *)
      (* All unused FCF_xxx bits are reserved *)
      CONST FCF_TITLEBAR               = 000000001H;
      CONST FCF_SYSMENU                = 000000002H;
      CONST FCF_MENU                   = 000000004H;
      CONST FCF_SIZEBORDER             = 000000008H;
      CONST FCF_MINBUTTON              = 000000010H;
      CONST FCF_MAXBUTTON              = 000000020H;
      CONST FCF_MINMAX                 = 000000030H;(* minmax means BOTH buttons *)
      CONST FCF_VERTSCROLL             = 000000040H;
      CONST FCF_HORZSCROLL             = 000000080H;
      CONST FCF_DLGBORDER              = 000000100H;
      CONST FCF_BORDER                 = 000000200H;
      CONST FCF_SHELLPOSITION          = 000000400H;
      CONST FCF_TASKLIST               = 000000800H;
      CONST FCF_NOBYTEALIGN            = 000001000H;
      CONST FCF_NOMOVEWITHOWNER        = 000002000H;
      CONST FCF_ICON                   = 000004000H;
      CONST FCF_ACCELTABLE             = 000008000H;
      CONST FCF_SYSMODAL               = 000010000H;
      CONST FCF_SCREENALIGN            = 000020000H;
      CONST FCF_MOUSEALIGN             = 000040000H;
      CONST FCF_HIDEBUTTON             = 001000000H;
      CONST FCF_HIDEMAX                = 001000020H;(* hidemax means BOTH buttons *)
   <* IF DEFINED (INCL_NLS)  THEN *>
            CONST FCF_DBE_APPSTAT         = 080000000H;
   <* END *>
      CONST FCF_AUTOICON               = 040000000H;

      (* FCF_TITLEBAR | FCF_SYSMENU | FCF_MENU | FCF_SIZEBORDER | FCF_MINMAX |
      FCF_ICON | FCF_ACCELTABLE | FCF_SHELLPOSITION | FCF_TASKLIST *)
      CONST FCF_STANDARD            = 00000CC3FH;


      CONST FS_ICON                    = 000000001H;
      CONST FS_ACCELTABLE              = 000000002H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST FS_SHELLPOSITION        = 000000004H;
   <* END *>

      CONST FS_TASKLIST                = 000000008H;
      CONST FS_NOBYTEALIGN             = 000000010H;
      CONST FS_NOMOVEWITHOWNER         = 000000020H;
      CONST FS_SYSMODAL                = 000000040H;
      CONST FS_DLGBORDER               = 000000080H;
      CONST FS_BORDER                  = 000000100H;
      CONST FS_SCREENALIGN             = 000000200H;
      CONST FS_MOUSEALIGN              = 000000400H;
      CONST FS_SIZEBORDER              = 000000800H;
      CONST FS_AUTOICON                = 000001000H;
   <* IF DEFINED (INCL_NLS)  THEN *>
            CONST FS_DBE_APPSTAT          = 000008000H;
   <* END *>

      (* FS_ICON | FS_ACCELTABLE | FS_SHELLPOSITION | FS_TASKLIST *)
      CONST FS_STANDARD                = 00000000FH;


      (* Frame Window Flags accessed via WinSet/QueryWindowUShort(QWS_FLAGS) *)

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST FF_FLASHWINDOW             = 00001H;
            CONST FF_ACTIVE                  = 00002H;
            CONST FF_FLASHHILITE             = 00004H;
            CONST FF_OWNERHIDDEN             = 00008H;
            CONST FF_DLGDISMISSED            = 00010H;
            CONST FF_OWNERDISABLED           = 00020H;
            CONST FF_SELECTED                = 00040H;
            CONST FF_NOACTIVATESWP           = 00080H;

   <* END *>


      PROCEDURE [APIENTRY] WinCreateStdWindow(hwndParent:   HWND;
                                                                          flStyle:        ULONG;
                                                                          pflCreateFlags: PULONG;
                                                                          pszClientClass: PCSZ;
                                                                          pszTitle:       PCSZ;
                                                                          styleClient:    ULONG;
                                                                          hmod:           HMODULE;
                                                                          idResources:    ULONG;
                                                                          phwndClient:    PHWND): HWND;

<* END *>


<* IF DEFINED (INCL_WINFRAMEMGR)  THEN *>

      PROCEDURE [APIENTRY] WinFlashWindow(hwndFrame: HWND;
                                                                  fFlash:      BOOL): BOOL;

      (* Frame window related messages *)

      CONST WM_FLASHWINDOW             = 00040H;
      CONST WM_FORMATFRAME             = 00041H;
      CONST WM_UPDATEFRAME             = 00042H;
      CONST WM_FOCUSCHANGE             = 00043H;

      CONST WM_SETBORDERSIZE           = 00044H;
      CONST WM_TRACKFRAME              = 00045H;
      CONST WM_MINMAXFRAME             = 00046H;
      CONST WM_SETICON                 = 00047H;
      CONST WM_QUERYICON               = 00048H;
      CONST WM_SETACCELTABLE           = 00049H;
      CONST WM_QUERYACCELTABLE         = 0004aH;
      CONST WM_TRANSLATEACCEL          = 0004bH;
      CONST WM_QUERYTRACKINFO          = 0004cH;
      CONST WM_QUERYBORDERSIZE         = 0004dH;
      CONST WM_NEXTMENU                = 0004eH;
      CONST WM_ERASEBACKGROUND         = 0004fH;
      CONST WM_QUERYFRAMEINFO          = 00050H;
      CONST WM_QUERYFOCUSCHAIN         = 00051H;
      CONST WM_OWNERPOSCHANGE          = 00052H;
      CONST WM_CALCFRAMERECT           = 00053H;
      (* Note = 00054 is reserved *)
      CONST WM_WINDOWPOSCHANGED        = 00055H;
      CONST WM_ADJUSTFRAMEPOS          = 00056H;
      CONST WM_QUERYFRAMECTLCOUNT      = 00059H;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            (* Note = 0005A is reserved *)
            CONST WM_QUERYHELPINFO        = 0005BH;
            CONST WM_SETHELPINFO          = 0005CH;
            CONST WM_ERROR                = 0005DH;
            CONST WM_REALIZEPALETTE       = 0005EH;


            (* WM_QUERYFRAMEINFO constants *)

            CONST FI_FRAME                = 000000001H;
            CONST FI_OWNERHIDE            = 000000002H;
            CONST FI_ACTIVATEOK           = 000000004H;
            CONST FI_NOMOVEWITHOWNER      = 000000008H;


   <* END *>


      PROCEDURE [APIENTRY] WinCreateFrameControls(hwndFrame: HWND;
                                                                                  pfcdata:     PFRAMECDATA;
                                                                                  pszTitle:    PCSZ): BOOL;

      PROCEDURE [APIENTRY] WinCalcFrameRect(hwndFrame:    HWND;
                                                                      prcl:           PRECTL;
                                                                      fClient:        BOOL): BOOL;

      PROCEDURE [APIENTRY] WinGetMinPosition(hwnd:   HWND;
                                                                        pswp:     PSWP;
                                                                        pptl:     PPOINTL): BOOL;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinGetMaxPosition(hwnd: HWND;
                                                                              pswp:   PSWP): BOOL;
   <* END *>

      TYPE HSAVEWP = LHANDLE;      (* hsvwp *)

      PROCEDURE [APIENTRY] WinSaveWindowPos(hsvwp: HSAVEWP;
                                                                    pswp:     PSWP;
                                                                    cswp:     ULONG): BOOL;

      (* Frame control IDs    *)

      CONST FID_SYSMENU                = 08002H;
      CONST FID_TITLEBAR               = 08003H;
      CONST FID_MINMAX                 = 08004H;
      CONST FID_MENU                   = 08005H;
      CONST FID_VERTSCROLL             = 08006H;
      CONST FID_HORZSCROLL             = 08007H;
      CONST FID_CLIENT                 = 08008H;
      (* Note = 08009 is reserved *)

      CONST FID_DBE_APPSTAT            = 08010H;
      CONST FID_DBE_KBDSTAT            = 08011H;
      CONST FID_DBE_PECIC              = 08012H;
      CONST FID_DBE_KKPOPUP            = 08013H;

      (* Standard WM_SYSCOMMAND command values *)

      CONST SC_SIZE                    = 08000H;
      CONST SC_MOVE                    = 08001H;
      CONST SC_MINIMIZE                = 08002H;
      CONST SC_MAXIMIZE                = 08003H;
      CONST SC_CLOSE                   = 08004H;
      CONST SC_NEXT                    = 08005H;
      CONST SC_APPMENU                 = 08006H;
      CONST SC_SYSMENU                 = 08007H;
      CONST SC_RESTORE                 = 08008H;
      CONST SC_NEXTFRAME               = 08009H;
      CONST SC_NEXTWINDOW              = 08010H;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST SC_TASKMANAGER             = 08011H;
            CONST SC_HELPKEYS                = 08012H;
            CONST SC_HELPINDEX               = 08013H;
            CONST SC_HELPEXTENDED            = 08014H;
            CONST SC_SWITCHPANELIDS          = 08015H;
            CONST SC_DBE_FIRST               = 08018H;
            CONST SC_DBE_LAST                = 0801FH;

            CONST SC_BEGINDRAG               = 08020H;
            CONST SC_ENDDRAG                 = 08021H;
            CONST SC_SELECT                  = 08022H;
            CONST SC_OPEN                    = 08023H;
            CONST SC_CONTEXTMENU             = 08024H;
            CONST SC_CONTEXTHELP             = 08025H;
            CONST SC_TEXTEDIT                = 08026H;
            CONST SC_BEGINSELECT             = 08027H;
            CONST SC_ENDSELECT               = 08028H;
            CONST SC_WINDOW                  = 08029H;
            CONST SC_HIDE                    = 0802aH;


   <* END *>

<* END *>

(*** Frame controls *)

<* IF DEFINED (INCL_WINFRAMECTLS)  THEN *>

      (** Title bar controls *)


      (* Title bar control messages *)

      CONST TBM_SETHILITE              = 001e3H;
      CONST TBM_QUERYHILITE            = 001e4H;


<* END *>

<* IF DEFINED (INCL_WINRECTANGLES)  THEN *>
      (*** Rectangle routines *)

      PROCEDURE [APIENTRY] WinCopyRect(hab:    HAB;
                                                          prclDst:   PRECTL;
                                                          prclSrc:   PRECTL): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinSetRect(hab:     HAB;
                                                              prcl:       PRECTL;
                                                              xLeft:      LONG;
                                                              yBottom:    LONG;
                                                              xRight:     LONG;
                                                              yTop:       LONG): BOOL;
            PROCEDURE [APIENTRY] WinIsRectEmpty(hab:  HAB;
                                                                      prcl:    PRECTL): BOOL;
            PROCEDURE [APIENTRY] WinEqualRect(hab: HAB;
                                                                  prcl1:  PRECTL;
                                                                  prcl2:  PRECTL): BOOL;
            PROCEDURE [APIENTRY] WinSetRectEmpty(hab: HAB;
                                                                        prcl:   PRECTL): BOOL;
            PROCEDURE [APIENTRY] WinOffsetRect(hab: HAB;
                                                                    prcl:   PRECTL;
                                                                    cx:     LONG;
                                                                    cy:     LONG): BOOL;
            PROCEDURE [APIENTRY] WinInflateRect(hab: HAB;
                                                                      prcl:   PRECTL;
                                                                      cx:     LONG;
                                                                      cy:     LONG): BOOL;
            PROCEDURE [APIENTRY] WinPtInRect(hab: HAB;
                                                                prcl:   PRECTL;
                                                                pptl:   PPOINTL): BOOL;
            PROCEDURE [APIENTRY] WinIntersectRect(hab:   HAB;
                                                                          prclDst:  PRECTL;
                                                                          prclSrc1: PRECTL;
                                                                          prclSrc2: PRECTL): BOOL;
            PROCEDURE [APIENTRY] WinUnionRect(hab:   HAB;
                                                                  prclDst:  PRECTL;
                                                                  prclSrc1: PRECTL;
                                                                  prclSrc2: PRECTL): BOOL;
            PROCEDURE [APIENTRY] WinSubtractRect(hab:   HAB;
                                                                        prclDst:  PRECTL;
                                                                        prclSrc1: PRECTL;
                                                                        prclSrc2: PRECTL): BOOL;
            PROCEDURE [APIENTRY] WinMakeRect(hab: HAB;
                                                                pwrc:   PRECTL): BOOL;
            PROCEDURE [APIENTRY] WinMakePoints(hab: HAB;
                                                                    pwpt:   PPOINTL;
                                                                    cwpt:   ULONG): BOOL;
   <* END *>

<* END *>


<* IF DEFINED (INCL_WINSYS)  THEN *>

      (*** System values *)

      PROCEDURE [APIENTRY] WinQuerySysValue(hwndDesktop:  HWND;
                                                                    iSysValue:       LONG): LONG;
      PROCEDURE [APIENTRY] WinSetSysValue(hwndDesktop: HWND;
                                                                  iSysValue:     LONG;
                                                                  lValue:        LONG): BOOL;

      CONST SV_SWAPBUTTON            = 0;
      CONST SV_DBLCLKTIME            = 1;
      CONST SV_CXDBLCLK              = 2;
      CONST SV_CYDBLCLK              = 3;
      CONST SV_CXSIZEBORDER          = 4;
      CONST SV_CYSIZEBORDER          = 5;
      CONST SV_ALARM                 = 6;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST SV_RESERVEDFIRST1        = 7;
            CONST SV_RESERVEDLAST1         = 8;
   <* END *>

      CONST SV_CURSORRATE            = 9;
      CONST SV_FIRSTSCROLLRATE       = 10;
      CONST SV_SCROLLRATE            = 11;
      CONST SV_NUMBEREDLISTS         = 12;
      CONST SV_WARNINGFREQ           = 13;
      CONST SV_NOTEFREQ              = 14;
      CONST SV_ERRORFREQ             = 15;
      CONST SV_WARNINGDURATION       = 16;
      CONST SV_NOTEDURATION          = 17;
      CONST SV_ERRORDURATION         = 18;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST SV_RESERVEDFIRST         = 19;
            CONST SV_RESERVEDLAST          = 19;
   <* END *>

      CONST SV_CXSCREEN              = 20;
      CONST SV_CYSCREEN              = 21;
      CONST SV_CXVSCROLL             = 22;
      CONST SV_CYHSCROLL             = 23;
      CONST SV_CYVSCROLLARROW        = 24;
      CONST SV_CXHSCROLLARROW        = 25;
      CONST SV_CXBORDER              = 26;
      CONST SV_CYBORDER              = 27;
      CONST SV_CXDLGFRAME            = 28;
      CONST SV_CYDLGFRAME            = 29;
      CONST SV_CYTITLEBAR            = 30;
      CONST SV_CYVSLIDER             = 31;
      CONST SV_CXHSLIDER             = 32;
      CONST SV_CXMINMAXBUTTON        = 33;
      CONST SV_CYMINMAXBUTTON        = 34;
      CONST SV_CYMENU                = 35;
      CONST SV_CXFULLSCREEN          = 36;
      CONST SV_CYFULLSCREEN          = 37;
      CONST SV_CXICON                = 38;
      CONST SV_CYICON                = 39;
      CONST SV_CXPOINTER             = 40;
      CONST SV_CYPOINTER             = 41;

      CONST SV_DEBUG                 = 42;
      CONST SV_CMOUSEBUTTONS         = 43;
      CONST SV_CPOINTERBUTTONS       = 43;
      CONST SV_POINTERLEVEL          = 44;
      CONST SV_CURSORLEVEL           = 45;
      CONST SV_TRACKRECTLEVEL        = 46;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST SV_CTIMERS               = 47;
   <* END *>

      CONST SV_MOUSEPRESENT          = 48;

      CONST SV_CXBYTEALIGN           = 49;
      CONST SV_CXALIGN               = 49;
      CONST SV_CYBYTEALIGN           = 50;
      CONST SV_CYALIGN               = 50;

      (* The following value enables any greater value to be set by WinSetSysVlaue. *)
      (* Values of 51-55 are spare for extra non-settable system values             *)
      (* This is to enable the setting of SV_EXTRAKEYBEEP by applications.          *)

      CONST SV_NOTRESERVED           = 56;
      CONST SV_EXTRAKEYBEEP          = 57;

      (* The following system value controls whether PM controls the keyboard      *)
      (* lights for light key keystrokes (else applications will)                  *)
      CONST SV_SETLIGHTS             = 58;
      CONST SV_INSERTMODE            = 59;


      CONST SV_MENUROLLDOWNDELAY     = 64;
      CONST SV_MENUROLLUPDELAY       = 65;
      CONST SV_ALTMNEMONIC           = 66;
      CONST SV_TASKLISTMOUSEACCESS   = 67;

      CONST SV_CXICONTEXTWIDTH       = 68;
      CONST SV_CICONTEXTLINES        = 69;

      CONST SV_CHORDTIME             = 70;
      CONST SV_CXCHORD               = 71;
      CONST SV_CYCHORD               = 72;
      CONST SV_CXMOTIONSTART         = 73;
      CONST SV_CYMOTIONSTART         = 74;

      CONST SV_BEGINDRAG             = 75;
      CONST SV_ENDDRAG               = 76;
      CONST SV_SINGLESELECT          = 77;
      CONST SV_OPEN                  = 78;
      CONST SV_CONTEXTMENU           = 79;
      CONST SV_CONTEXTHELP           = 80;
      CONST SV_TEXTEDIT              = 81;
      CONST SV_BEGINSELECT           = 82;
      CONST SV_ENDSELECT             = 83;

      CONST SV_BEGINDRAGKB           = 84;
      CONST SV_ENDDRAGKB             = 85;
      CONST SV_SELECTKB              = 86;
      CONST SV_OPENKB                = 87;
      CONST SV_CONTEXTMENUKB         = 88;
      CONST SV_CONTEXTHELPKB         = 89;
      CONST SV_TEXTEDITKB            = 90;
      CONST SV_BEGINSELECTKB         = 91;
      CONST SV_ENDSELECTKB           = 92;

      CONST SV_ANIMATION             = 93;
      CONST SV_ANIMATIONSPEED        = 94;

      CONST SV_MONOICONS             = 95;

      CONST SV_KBDALTERED            = 96;

      CONST SV_PRINTSCREEN           = 97;

      CONST SV_CSYSVALUES            = 98;


      (*
      * Presentation parameter structures.
      *)
      TYPE PARAM = RECORD   (* param *)
            id:        ULONG;
            cb:        ULONG;
            ab:        ARRAY [0..0] OF BYTE;
      END;
      TYPE NPPARAM = POINTER TO PARAM;
      TYPE PPARAM  = POINTER TO PARAM;

      TYPE PRESPARAMS = RECORD   (* pres *)
            cb:      ULONG;
            aparam:  ARRAY [0..0] OF PARAM;
      END;
      TYPE NPPRESPARAMS = POINTER TO PRESPARAMS;
      TYPE PPRESPARAMS  = POINTER TO PRESPARAMS;

      (*
      * Presentation parameter APIs
      *)
      PROCEDURE [APIENTRY] WinSetPresParam(hwnd:  HWND;
                                                                    id:      ULONG;
                                                                    cbParam: ULONG;
                                                                    pbParam: PVOID): BOOL;
      PROCEDURE [APIENTRY] WinQueryPresParam(hwnd: HWND;
                                                                        id1:   ULONG;
                                                                        id2:   ULONG;
                                                                        pulId: PULONG;
                                                                        cbBuf: ULONG;
                                                                        pbBuf: PVOID;
                                                                        fs:    ULONG): ULONG;
      PROCEDURE [APIENTRY] WinRemovePresParam(hwnd:   HWND;
                                                                          id:       ULONG): BOOL;

      (*
      * Presentation parameter types.
      *)

      CONST PP_FOREGROUNDCOLOR                    = 1;
      CONST PP_FOREGROUNDCOLORINDEX               = 2;
      CONST PP_BACKGROUNDCOLOR                    = 3;
      CONST PP_BACKGROUNDCOLORINDEX               = 4;
      CONST PP_HILITEFOREGROUNDCOLOR              = 5;
      CONST PP_HILITEFOREGROUNDCOLORINDEX         = 6;
      CONST PP_HILITEBACKGROUNDCOLOR              = 7;
      CONST PP_HILITEBACKGROUNDCOLORINDEX         = 8;
      CONST PP_DISABLEDFOREGROUNDCOLOR            = 9;
      CONST PP_DISABLEDFOREGROUNDCOLORINDEX       = 10;
      CONST PP_DISABLEDBACKGROUNDCOLOR            = 11;
      CONST PP_DISABLEDBACKGROUNDCOLORINDEX       = 12;
      CONST PP_BORDERCOLOR                        = 13;
      CONST PP_BORDERCOLORINDEX                   = 14;
      CONST PP_FONTNAMESIZE                       = 15;
      CONST PP_FONTHANDLE                         = 16;
      CONST PP_RESERVED                           = 17;
      CONST PP_ACTIVECOLOR                        = 18;
      CONST PP_ACTIVECOLORINDEX                   = 19;
      CONST PP_INACTIVECOLOR                      = 20;
      CONST PP_INACTIVECOLORINDEX                 = 21;
      CONST PP_ACTIVETEXTFGNDCOLOR                = 22;
      CONST PP_ACTIVETEXTFGNDCOLORINDEX           = 23;
      CONST PP_ACTIVETEXTBGNDCOLOR                = 24;
      CONST PP_ACTIVETEXTBGNDCOLORINDEX           = 25;
      CONST PP_INACTIVETEXTFGNDCOLOR              = 26;
      CONST PP_INACTIVETEXTFGNDCOLORINDEX         = 27;
      CONST PP_INACTIVETEXTBGNDCOLOR              = 28;
      CONST PP_INACTIVETEXTBGNDCOLORINDEX         = 29;
      CONST PP_SHADOW                             = 30;
      CONST PP_MENUFOREGROUNDCOLOR                = 31;
      CONST PP_MENUFOREGROUNDCOLORINDEX           = 32;
      CONST PP_MENUBACKGROUNDCOLOR                = 33;
      CONST PP_MENUBACKGROUNDCOLORINDEX           = 34;
      CONST PP_MENUHILITEFGNDCOLOR                = 35;
      CONST PP_MENUHILITEFGNDCOLORINDEX           = 36;
      CONST PP_MENUHILITEBGNDCOLOR                = 37;
      CONST PP_MENUHILITEBGNDCOLORINDEX           = 38;
      CONST PP_MENUDISABLEDFGNDCOLOR              = 39;
      CONST PP_MENUDISABLEDFGNDCOLORINDEX         = 40;
      CONST PP_MENUDISABLEDBGNDCOLOR              = 41;
      CONST PP_MENUDISABLEDBGNDCOLORINDEX         = 42;

      CONST PP_USER                               = 08000H;

      (*
      * Flags for WinQueryPresParams()
      *)
      CONST QPF_NOINHERIT            = 00001H; (* Don't inherit                      *)
      CONST QPF_ID1COLORINDEX        = 00002H; (* Convert id1 color index into RGB   *)
      CONST QPF_ID2COLORINDEX        = 00004H; (* Convert id2 color index into RGB   *)
      CONST QPF_PURERGBCOLOR         = 00008H; (* Return pure RGB colors             *)
      CONST QPF_VALIDFLAGS           = 0000FH; (* Valid WinQueryPresParams() flags.  *)

      (*** System color functions *)

      PROCEDURE [APIENTRY] WinQuerySysColor(hwndDesktop: HWND;
                                                                    clr:            LONG;
                                                                    lReserved:      LONG): LONG;
      PROCEDURE [APIENTRY] WinSetSysColors(hwndDesktop:  HWND;
                                                                  flOptions:  ULONG;
                                                                  flFormat:   ULONG;
                                                                  clrFirst:   LONG;
                                                                  cclr:       ULONG;
                                                                  pclr:       PLONG): BOOL;

      CONST SYSCLR_SHADOWHILITEBGND        = (-50);
      CONST SYSCLR_SHADOWHILITEFGND        = (-49);
      CONST SYSCLR_SHADOWTEXT              = (-48);
      CONST SYSCLR_ENTRYFIELD              = (-47);
      CONST SYSCLR_MENUDISABLEDTEXT        = (-46);
      CONST SYSCLR_MENUHILITE              = (-45);
      CONST SYSCLR_MENUHILITEBGND          = (-44);
      CONST SYSCLR_PAGEBACKGROUND          = (-43);
      CONST SYSCLR_FIELDBACKGROUND         = (-42);
      CONST SYSCLR_BUTTONLIGHT             = (-41);
      CONST SYSCLR_BUTTONMIDDLE            = (-40);
      CONST SYSCLR_BUTTONDARK              = (-39);
      CONST SYSCLR_BUTTONDEFAULT           = (-38);
      CONST SYSCLR_TITLEBOTTOM             = (-37);
      CONST SYSCLR_SHADOW                  = (-36);
      CONST SYSCLR_ICONTEXT                = (-35);
      CONST SYSCLR_DIALOGBACKGROUND        = (-34);
      CONST SYSCLR_HILITEFOREGROUND        = (-33);
      CONST SYSCLR_HILITEBACKGROUND        = (-32);
      CONST SYSCLR_INACTIVETITLETEXTBGND   = (-31);
      CONST SYSCLR_ACTIVETITLETEXTBGND     = (-30);
      CONST SYSCLR_INACTIVETITLETEXT       = (-29);
      CONST SYSCLR_ACTIVETITLETEXT         = (-28);
      CONST SYSCLR_OUTPUTTEXT              = (-27);
      CONST SYSCLR_WINDOWSTATICTEXT        = (-26);
      CONST SYSCLR_SCROLLBAR               = (-25);
      CONST SYSCLR_BACKGROUND              = (-24);
      CONST SYSCLR_ACTIVETITLE             = (-23);
      CONST SYSCLR_INACTIVETITLE           = (-22);
      CONST SYSCLR_MENU                    = (-21);
      CONST SYSCLR_WINDOW                  = (-20);
      CONST SYSCLR_WINDOWFRAME             = (-19);
      CONST SYSCLR_MENUTEXT                = (-18);
      CONST SYSCLR_WINDOWTEXT              = (-17);
      CONST SYSCLR_TITLETEXT               = (-16);
      CONST SYSCLR_ACTIVEBORDER            = (-15);
      CONST SYSCLR_INACTIVEBORDER          = (-14);
      CONST SYSCLR_APPWORKSPACE            = (-13);
      CONST SYSCLR_HELPBACKGROUND          = (-12);
      CONST SYSCLR_HELPTEXT                = (-11);
      CONST SYSCLR_HELPHILITE              = (-10);

      CONST SYSCLR_CSYSCOLORS              = 41;

<* END *>


<* IF DEFINED (INCL_WINTIMER)  THEN *>
      (**** Timer manager *)

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


            PROCEDURE [APIENTRY] WinStartTimer(hab:     HAB;
                                                                      hwnd:      HWND;
                                                                      idTimer:   ULONG;
                                                                      dtTimeout: ULONG): ULONG;
            PROCEDURE [APIENTRY] WinStopTimer(hab:    HAB;
                                                                      hwnd:    HWND;
                                                                      idTimer: ULONG): BOOL;


            PROCEDURE [APIENTRY] WinGetCurrentTime(hab: HAB): ULONG;

            CONST TID_CURSOR          = 0ffffH;  (* Reserved cursor timer ID              *)
            CONST TID_SCROLL          = 0fffeH;  (* Reserved scrolling timer ID           *)
            CONST TID_FLASHWINDOW     = 0fffdH;  (* Reserved for window flashing timer ID *)
            CONST TID_USERMAX         = 07fffH;  (* Maximum user timer ID                 *)
   <* END *>

<* END *>

TYPE HACCEL = LHANDLE; (* haccel *)

<* IF DEFINED (INCL_WINACCELERATORS)  THEN *>
      (**** Accelerator functions *)

      (* ACCEL fs bits
      *
      * NOTE: the first six AF_ code bits have the same value
      * as their KC_ counterparts
      *)
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST AF_CHAR                    = 00001H;
            CONST AF_VIRTUALKEY              = 00002H;
            CONST AF_SCANCODE                = 00004H;
            CONST AF_SHIFT                   = 00008H;
            CONST AF_CONTROL                 = 00010H;
            CONST AF_ALT                     = 00020H;
            CONST AF_LONEKEY                 = 00040H;
            CONST AF_SYSCOMMAND              = 00100H;
            CONST AF_HELP                    = 00200H;
   <* END *>

      --#pragma pack(2) (* force structure alignment packing *)

      (* Binary resources may be bound into application executables or *)
      (* passed as a parameter when creating a window or dialog        *)
      (* Currently they must be the same for both 16-bit and 32-bit    *)
      (* so we pack the structures.                                    *)
      TYPE ACCEL = RECORD   (* acc *)
            fs:        USHORT;
            key:       USHORT;
            cmd:       USHORT;
      END;
      TYPE PACCEL = POINTER TO ACCEL;

      (* Binary resources may be bound into application executables or *)
      (* passed as a parameter when creating a window or dialog        *)
      (* Currently they must be the same for both 16-bit and 32-bit    *)
      (* so we pack the structures.                                    *)
      TYPE ACCELTABLE = RECORD   (* acct  *)
            cAccel:         USHORT;
            codepage:       USHORT;
            aaccel:         ARRAY [0..0] OF ACCEL;
      END;
      TYPE PACCELTABLE = POINTER TO ACCELTABLE;

      --#pragma pack()  (* restore packing to default *)

      PROCEDURE [APIENTRY] WinLoadAccelTable(hab:  HAB;
                                                                          hmod:  HMODULE;
                                                                          idAccelTable: ULONG): HACCEL;
      PROCEDURE [APIENTRY] WinCopyAccelTable(haccel:    HACCEL;
                                                                        pAccelTable: PACCELTABLE;
                                                                        cbCopyMax:   ULONG): ULONG;
      PROCEDURE [APIENTRY] WinCreateAccelTable(hab: HAB;
                                                                              pAccelTable: PACCELTABLE): HACCEL;
      PROCEDURE [APIENTRY] WinDestroyAccelTable(haccel: HACCEL): BOOL;
      PROCEDURE [APIENTRY] WinTranslateAccel(hab:   HAB;
                                                                          hwnd:   HWND;
                                                                          haccel: HACCEL;
                                                                          pqmsg:  PQMSG): BOOL;
      PROCEDURE [APIENTRY] WinSetAccelTable(hab:      HAB;
                                                                        haccel:    HACCEL;
                                                                        hwndFrame: HWND): BOOL;
      PROCEDURE [APIENTRY] WinQueryAccelTable(hab:      HAB;
                                                                            hwndFrame: HWND): HACCEL;

<* END *>

(**** Extended Attribute Flags (Association Table) *)

CONST EAF_DEFAULTOWNER           = 00001H;
CONST EAF_UNCHANGEABLE           = 00002H;
CONST EAF_REUSEICON              = 00004H;

(*** WinTrackRect() information *)

<* IF DEFINED (INCL_WINTRACKRECT)  THEN *>

      (* WinTrackRect() tracking information structure *)

      TYPE TRACKINFO = RECORD   (* ti *)
            cxBorder:      LONG;
            cyBorder:      LONG;
            cxGrid:        LONG;
            cyGrid:        LONG;
            cxKeyboard:    LONG;
            cyKeyboard:    LONG;
            rclTrack:      RECTL;
            rclBoundary:   RECTL;
            ptlMinTrackSize:  POINTL;
            ptlMaxTrackSize:  POINTL;
            fs:            ULONG;
      END;
      TYPE PTRACKINFO = POINTER TO TRACKINFO;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinTrackRect(hwnd:  HWND;
                                                                  hps:      HPS;
                                                                  pti:      PTRACKINFO): BOOL;
            PROCEDURE [APIENTRY] WinShowTrackRect(hwnd: HWND;
                                                                          fShow:   BOOL): BOOL;

            (* WinTrackRect() flags *)

            CONST TF_LEFT                    = 00001H;
            CONST TF_TOP                     = 00002H;
            CONST TF_RIGHT                   = 00004H;
            CONST TF_BOTTOM                  = 00008H;
            (* TF_MOVE = TF_LEFT | TF_TOP | TF_RIGHT | TF_BOTTOM *)
            CONST TF_MOVE                    = 0000FH;

            CONST TF_SETPOINTERPOS           = 00010H;
            CONST TF_GRID                    = 00020H;
            CONST TF_STANDARD                = 00040H;
            CONST TF_ALLINBOUNDARY           = 00080H;
            CONST TF_VALIDATETRACKRECT       = 00100H;
            CONST TF_PARTINBOUNDARY          = 00200H;

   <* END *>

<* END *>


(**** Clipboard Manager *)

<* IF DEFINED (INCL_WINCLIPBOARD) OR DEFINED (INCL_WINDDE)  THEN *>
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            (* Clipboard messages *)

            CONST WM_RENDERFMT               = 00060H;
            CONST WM_RENDERALLFMTS           = 00061H;
            CONST WM_DESTROYCLIPBOARD        = 00062H;
            CONST WM_PAINTCLIPBOARD          = 00063H;
            CONST WM_SIZECLIPBOARD           = 00064H;
            CONST WM_HSCROLLCLIPBOARD        = 00065H;
            CONST WM_VSCROLLCLIPBOARD        = 00066H;
            CONST WM_DRAWCLIPBOARD           = 00067H;

            (*
            * Standard Clipboard formats
            *)
            CONST CF_TEXT                   = 1;
            CONST CF_BITMAP                 = 2;
            CONST CF_DSPTEXT                = 3;
            CONST CF_DSPBITMAP              = 4;
            CONST CF_METAFILE               = 5;
            CONST CF_DSPMETAFILE            = 6;
            CONST CF_PALETTE                = 9;
            CONST CF_MMPMFIRST              =10;
            CONST CF_MMPMLAST               =19;
            (*
            * standard DDE and clipboard format stings
            *)
            CONST SZFMT_TEXT                  = "#1";
            CONST SZFMT_BITMAP                = "#2";
            CONST SZFMT_DSPTEXT               = "#3";
            CONST SZFMT_DSPBITMAP             = "#4";
            CONST SZFMT_METAFILE              = "#5";
            CONST SZFMT_DSPMETAFILE           = "#6";
            CONST SZFMT_PALETTE               = "#9";
            CONST SZFMT_SYLK                  = "Sylk";
            CONST SZFMT_DIF                   = "Dif";
            CONST SZFMT_TIFF                  = "Tiff";
            CONST SZFMT_OEMTEXT               = "OemText";
            CONST SZFMT_DIB                   = "Dib";
            CONST SZFMT_OWNERDISPLAY          = "OwnerDisplay";
            CONST SZFMT_LINK                  = "Link";
            CONST SZFMT_METAFILEPICT          = "MetaFilePict";
            CONST SZFMT_DSPMETAFILEPICT       = "DspMetaFilePict";
            CONST SZFMT_CPTEXT                = "Codepage Text";
            CONST SZDDEFMT_RTF                = "Rich Text Format";
            CONST SZDDEFMT_PTRPICT            = "Printer_Picture";

            --#pragma pack(2) (* force structure alignment packing *)

            (* Metafiles are the same no matter whether they are used in     *)
            (* 16-bit or 32-bit applications. While not strictly necessary   *)
            (* because of inherent alignment we force packing on a 2 byte    *)
            (* boundary to avoid any confusion.                              *)
            TYPE MFP = RECORD   (* mfp *)
                  sizeBounds:   POINTL;         (* metafile notional grid size      *)
                  sizeMM:       POINTL;         (* metafile size high metric units  *)
                  cbLength:     ULONG;         (* length of metafile data          *)
                  mapMode:      USHORT;         (* a PM metaflie map mode           *)
                  reserved:     USHORT;
                  abData:       ARRAY [0..0] OF BYTE; (* metafile Data                    *)
            END;
            TYPE PMFP = POINTER TO MFP;

            (* CPTEXT DDE data are the same no matter whether they are used  *)
            (* in 16-bit or 32-bit applications. While not strictly necessary*)
            (* because of inherent alignment we force packing on a 2 byte    *)
            (* boundary to avoid any confusion.                              *)
            TYPE CPTEXT = RECORD   (* cptxt *)
                  idCountry:   USHORT;
                  usCodepage:  USHORT;
                  usLangID:    USHORT;
                  usSubLangID: USHORT;
                  abText:      ARRAY [0..0] OF BYTE; (* text string starts here          *)
            END;
            TYPE PCPTEXT = POINTER TO CPTEXT;

            -- #pragma pack()  (* restore packing to default *)

   <* END *>
<* END *>

<* IF DEFINED (INCL_WINCLIPBOARD)  THEN *>
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinSetClipbrdOwner(hab:   HAB;
                                                                                  hwnd:   HWND): BOOL;
            PROCEDURE [APIENTRY] WinSetClipbrdData(hab:     HAB;
                                                                                ulData:   ULONG;
                                                                                fmt:      ULONG;
                                                                                rgfFmtInfo: ULONG): BOOL;
            PROCEDURE [APIENTRY] WinQueryClipbrdData(hab: HAB;
                                                                                    fmt:  ULONG): ULONG;
            PROCEDURE [APIENTRY] WinQueryClipbrdFmtInfo(hab:   HAB;
                                                                                          fmt:    ULONG;
                                                                                          prgfFmtInfo: PULONG): BOOL;
            PROCEDURE [APIENTRY] WinSetClipbrdViewer(hab:              HAB;
                                                                                    hwndNewClipViewer: HWND): BOOL;

            (* WinSetClipbrdData() flags *)

            CONST CFI_OWNERFREE              = 00001H;
            CONST CFI_OWNERDISPLAY           = 00002H;
            CONST CFI_POINTER                = 00400H;
            CONST CFI_HANDLE                 = 00200H;

   <* END *>

      PROCEDURE [APIENTRY] WinEnumClipbrdFmts(hab: HAB;
                                                                          fmt:   ULONG): ULONG;
      PROCEDURE [APIENTRY] WinEmptyClipbrd(hab: HAB): BOOL;
      PROCEDURE [APIENTRY] WinOpenClipbrd(hab: HAB): BOOL;
      PROCEDURE [APIENTRY] WinCloseClipbrd(hab: HAB): BOOL;

      PROCEDURE [APIENTRY] WinQueryClipbrdOwner(hab: HAB): HWND;
      PROCEDURE [APIENTRY] WinQueryClipbrdViewer(hab: HAB): HWND;

<* END *>


<* IF DEFINED (INCL_WINCURSORS) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>
      (**** Cursor manager common subsection *)

      PROCEDURE [APIENTRY] WinDestroyCursor(hwnd: HWND): BOOL;
      PROCEDURE [APIENTRY] WinShowCursor(hwnd:  HWND;
                                                              fShow:    BOOL): BOOL;
      PROCEDURE [APIENTRY] WinCreateCursor(hwnd:   HWND;
                                                                  x:         LONG;
                                                                  y:         LONG;
                                                                  cx:        LONG;
                                                                  cy:        LONG;
                                                                  fs:        ULONG;
                                                                  prclClip:  PRECTL): BOOL;

      (* WinCreateCursor() flags *)

      CONST CURSOR_SOLID               = 00000H;
      CONST CURSOR_HALFTONE            = 00001H;
      CONST CURSOR_FRAME               = 00002H;
      CONST CURSOR_FLASH               = 00004H;
      CONST CURSOR_SETPOS              = 08000H;


<* END *>

<* IF DEFINED (INCL_WINCURSORS)  THEN *>

      TYPE CURSORINFO = RECORD   (* csri *)
            hwnd:  HWND;
            x:     LONG;
            y:     LONG;
            cx:    LONG;
            cy:    LONG;
            fs:    ULONG;
            rclClip:  RECTL;
      END;
      TYPE PCURSORINFO = POINTER TO CURSORINFO;

      PROCEDURE [APIENTRY] WinQueryCursorInfo(hwndDesktop: HWND;
                                                                        pCursorInfo: PCURSORINFO): BOOL;

<* END *>

TYPE HPOINTER = LHANDLE;

<* IF DEFINED (INCL_WINPOINTERS)  THEN *>
      (**** Pointer manager *)

      PROCEDURE [APIENTRY] WinSetPointer(hwndDesktop: HWND;
                                                                      hptrNew:    HPOINTER): BOOL;
      PROCEDURE [APIENTRY] WinSetPointerOwner(hptr:      HPOINTER;
                                                                                pid:      PID;
                                                                                fDestroy: BOOL): BOOL;
      PROCEDURE [APIENTRY] WinShowPointer(hwndDesktop: HWND;
                                                                        fShow:      BOOL): BOOL;
      PROCEDURE [APIENTRY] WinLockPointerUpdate(hwndDesktop:  HWND;
                                                                                    hptrNew:     HPOINTER;
                                                                                    ulTimeInterval: ULONG): BOOL;
      PROCEDURE [APIENTRY] WinQuerySysPointer(hwndDesktop:  HWND;
                                                                                iptr:        LONG;
                                                                                fLoad:       BOOL): HPOINTER;

      PROCEDURE [APIENTRY] WinQuerySysPointerData(hwndDesktop: HWND;
                                                                                iptr:        ULONG;
                                                                                pIconInfo:   PICONINFO): BOOL;
      PROCEDURE [APIENTRY] WinSetSysPointerData(hwndDesktop: HWND;
                                                                            iptr:           ULONG;
                                                                            pIconInfo:      PICONINFO): BOOL;

      (* System pointers (NOTE: these are 1-based) *)

      CONST SPTR_ARROW               =  1;
      CONST SPTR_TEXT                =  2;
      CONST SPTR_WAIT                =  3;
      CONST SPTR_SIZE                =  4;
      CONST SPTR_MOVE                =  5;
      CONST SPTR_SIZENWSE            =  6;
      CONST SPTR_SIZENESW            =  7;
      CONST SPTR_SIZEWE              =  8;
      CONST SPTR_SIZENS              =  9;
      CONST SPTR_APPICON             =  10;

      CONST SPTR_ICONINFORMATION     =  11;
      CONST SPTR_ICONQUESTION        =  12;
      CONST SPTR_ICONERROR           =  13;
      CONST SPTR_ICONWARNING         =  14;

      CONST SPTR_ILLEGAL             =  18;
      CONST SPTR_FILE                =  19;
      CONST SPTR_FOLDER              =  20;
      CONST SPTR_MULTFILE            =  21;
      CONST SPTR_PROGRAM             =  22;
      CONST SPTR_DISPLAY_PTRS        =  22;
      CONST SPTR_PENFIRST            =  23;
      CONST SPTR_PENLAST             =  39;
      CONST SPTR_CPTR                =  39;  (* total # of system pointers *)

      (* backward compatibility *)
      CONST SPTR_HANDICON       =  SPTR_ICONERROR;
      CONST SPTR_QUESICON       =  SPTR_ICONQUESTION;
      CONST SPTR_BANGICON       =  SPTR_ICONWARNING;
      CONST SPTR_NOTEICON       =  SPTR_ICONINFORMATION;


      PROCEDURE [APIENTRY] WinLoadPointer(hwndDesktop: HWND;
                                                                        hmod:       HMODULE;
                                                                        idres:      ULONG): HPOINTER;
      PROCEDURE [APIENTRY] WinCreatePointer(hwndDesktop: HWND;
                                                                            hbmPointer: HBITMAP;
                                                                            fPointer:   BOOL;
                                                                            xHotspot:   LONG;
                                                                            yHotspot:   LONG): HPOINTER;
      PROCEDURE [APIENTRY] WinSetPointerPos(hwndDesktop: HWND;
                                                                            x:          LONG;
                                                                            y:          LONG): BOOL;
      PROCEDURE [APIENTRY] WinDestroyPointer(hptr: HPOINTER): BOOL;

      PROCEDURE [APIENTRY] WinQueryPointer(hwndDesktop: HWND): HPOINTER;
      PROCEDURE [APIENTRY] WinQueryPointerPos(hwndDesktop: HWND;
                                                                                pptl:       PPOINTL): BOOL;

      TYPE POINTERINFO = RECORD   (* ptri *)
            fPointer:        ULONG;
            xHotspot:        LONG;
            yHotspot:        LONG;
            hbmPointer:      HBITMAP;
            hbmColor:        HBITMAP;
            hbmMiniPointer:  HBITMAP;
            hbmMiniColor:    HBITMAP;
      END;
      TYPE PPOINTERINFO = POINTER TO POINTERINFO;

      PROCEDURE [APIENTRY] WinCreatePointerIndirect(hwndDesktop:  HWND;
                                                                                            pptri: PPOINTERINFO): HPOINTER;
      PROCEDURE [APIENTRY] WinQueryPointerInfo(hptr:            HPOINTER;
                                                                                  pPointerInfo: PPOINTERINFO): BOOL;
      PROCEDURE [APIENTRY] WinDrawPointer(hps:    HPS;
                                                                        x:     LONG;
                                                                        y:     LONG;
                                                                        hptr:  HPOINTER;
                                                                        fs:    ULONG): BOOL;



      (* WinDrawPointer() constants *)

      CONST DP_NORMAL                  = 00000H;
      CONST DP_HALFTONED               = 00001H;
      CONST DP_INVERTED                = 00002H;


      PROCEDURE [APIENTRY] WinGetSysBitmap(hwndDesktop:   HWND;
                                                                        ibm:           ULONG): HBITMAP;

      (* System bitmaps (NOTE: these are 1-based) *)

      CONST SBMP_OLD_SYSMENU         =  1;
      CONST SBMP_OLD_SBUPARROW       =  2;
      CONST SBMP_OLD_SBDNARROW       =  3;
      CONST SBMP_OLD_SBRGARROW       =  4;
      CONST SBMP_OLD_SBLFARROW       =  5;
      CONST SBMP_MENUCHECK           =  6;
      CONST SBMP_OLD_CHECKBOXES      =  7;
      CONST SBMP_BTNCORNERS          =  8;
      CONST SBMP_OLD_MINBUTTON       =  9;
      CONST SBMP_OLD_MAXBUTTON       =  10;
      CONST SBMP_OLD_RESTOREBUTTON   =  11;
      CONST SBMP_OLD_CHILDSYSMENU    =  12;
      CONST SBMP_DRIVE               =  15;
      CONST SBMP_FILE                =  16;
      CONST SBMP_FOLDER              =  17;
      CONST SBMP_TREEPLUS            =  18;
      CONST SBMP_TREEMINUS           =  19;
      CONST SBMP_PROGRAM             =  22;
      CONST SBMP_MENUATTACHED        =  23;
      CONST SBMP_SIZEBOX             =  24;

      CONST SBMP_SYSMENU             =  25;
      CONST SBMP_MINBUTTON           =  26;
      CONST SBMP_MAXBUTTON           =  27;
      CONST SBMP_RESTOREBUTTON       =  28;
      CONST SBMP_CHILDSYSMENU        =  29;
      CONST SBMP_SYSMENUDEP          =  30;
      CONST SBMP_MINBUTTONDEP        =  31;
      CONST SBMP_MAXBUTTONDEP        =  32;
      CONST SBMP_RESTOREBUTTONDEP    =  33;
      CONST SBMP_CHILDSYSMENUDEP     =  34;
      CONST SBMP_SBUPARROW           =  35;
      CONST SBMP_SBDNARROW           =  36;
      CONST SBMP_SBLFARROW           =  37;
      CONST SBMP_SBRGARROW           =  38;
      CONST SBMP_SBUPARROWDEP        =  39;
      CONST SBMP_SBDNARROWDEP        =  40;
      CONST SBMP_SBLFARROWDEP        =  41;
      CONST SBMP_SBRGARROWDEP        =  42;
      CONST SBMP_SBUPARROWDIS        =  43;
      CONST SBMP_SBDNARROWDIS        =  44;
      CONST SBMP_SBLFARROWDIS        =  45;
      CONST SBMP_SBRGARROWDIS        =  46;
      CONST SBMP_COMBODOWN           =  47;
      CONST SBMP_CHECKBOXES       = 48;

<* END *>


(**** Hook manager *)

<* IF DEFINED (INCL_WINHOOKS)  THEN *>

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinSetHook(hab:  HAB;
                                                              hmq:     HMQ;
                                                              iHook:   LONG;
                                                              pfnHook: PFN;
                                                              hmod:    HMODULE): BOOL;
            PROCEDURE [APIENTRY] WinReleaseHook(hab:  HAB;
                                                                      hmq:     HMQ;
                                                                      iHook:   LONG;
                                                                      pfnHook: PFN;
                                                                      hmod:    HMODULE): BOOL;
            PROCEDURE [APIENTRY] WinCallMsgFilter(hab: HAB;
                                                                          pqmsg:  PQMSG;
                                                                          msgf:   ULONG): BOOL;


            (**********************************************************************
            * Hook codes
            *
            * Whether the hook receives a (U)SHORT or (U)LONG parameter depends
            * on the memory model that the hook executes in. 32-bit hook will
            * receive long parameters
            *
            **********************************************************************)

            CONST HK_SENDMSG              =   0;
            (* VOID PROCEDURE [EXPENTRY] SendMsgHook(HAB hab;               ** installer's hab
            *                            PSMHSTRUCT psmh;       ** p send msg struct
            *                            BOOL fInterTask);      ** between threads *)

            CONST HK_INPUT                =   1;
            (* BOOL PROCEDURE [EXPENTRY] InputHook(HAB hab;                 ** installer's hab
            *                          PQMSG pQmsg;             ** p qmsg
            *                          ULONG/USHORT fs);        ** remove/noremove *)

            CONST HK_MSGFILTER            =   2;
            (* BOOL PROCEDURE [EXPENTRY] MsgFilterHook(HAB hab;             ** installer's hab
            *                              PQMSG pQmsg;         ** p qmsg
            *                              ULONG/USHORT msgf);  ** filter flag *)

            CONST HK_JOURNALRECORD        =   3;
            (* VOID PROCEDURE [EXPENTRY] JournalRecordHook(HAB hab;         ** installer's hab
            *                                  PQMSG pQmsg);    ** p qmsg *)

            CONST HK_JOURNALPLAYBACK      =   4;
            (* ULONG PROCEDURE [EXPENTRY] JournalPlaybackHook(HAB hab;      **installer's hab
            *                                     BOOL fSkip;   ** skip messages
            *                                     PQMSG pQmsg); ** p qmsg *)

            CONST HK_HELP                 =   5;
            (* BOOL PROCEDURE [EXPENTRY] HelpHook(HAB hab;                  ** installer's hab
            *                         ULONG/USHORT usMode;      ** mode
            *                         ULONG/USHORT idTopic;     ** main topic
            *                         ULONG/USHORT idSubTopic;  ** sub topic
            *                         PRECTL prcPosition);      ** associated position *)

            CONST HK_LOADER               =   6;
            (* BOOL PROCEDURE [EXPENTRY] LoaderHook(HAB hab;                ** installer's hab
            *                           LONG/USHORT idContext;  ** who called hook
            *                           PSZ pszLibname;         ** lib name string
            *                           PHLIB hlib;             ** p to lib handle
            *                           PSZ pszProcname;        ** procedure name
            *                           PFNWP wndProc);         ** window procedure *)

            CONST HK_REGISTERUSERMSG      =   7;
            (* BOOL PROCEDURE [EXPENTRY] RegisterUserHook(HAB hab;          ** installer's hab
            *                                 ULONG cUshort;    ** entries in arRMP
            *                                 PULONG/PUSHORT arRMP; ** RMP array
            *                                 PBOOL fRegistered); ** msg parms already reg*)

            CONST HK_MSGCONTROL           =   8;
            (* BOOL PROCEDURE [EXPENTRY] MsgControlHook(HAB hab;            ** installer's hab
            *                               LONG/SHORT idContext;** who called hook
            *                               HWND hwnd;          ** SEI window handle
            *                               PSZ pszClassname;   ** window class name
            *                               ULONG/USHORT usMsgclass;** interested msg class **
            *                               LONG/SHORT idControl;** SMI_*
            *                               PBOOL fSuccess);    ** mode already set *)

            CONST HK_PLIST_ENTRY          =   9;
            (* BOOL PROCEDURE [EXPENTRY] ProgramListEntryHook(HAB hab;      ** installer's hab
            *                                     PPRFHOOKPARMS pProfileHookParams;** data
            *                                     PBOOL fNoExecute);  ** cease hook processing*)

            CONST HK_PLIST_EXIT            =  10;
            (* BOOL PROCEDURE [EXPENTRY] ProgramListExitHook(HAB hab;       ** installer's hab
            *                                    PPRFHOOKPARMS pProfileHookParams);** data*)

            CONST HK_FINDWORD              =  11;
            (* BOOL PROCEDURE [EXPENTRY] FindWordHook(usCodepage;           ** code page to use
            *                             PSZ pszText;          ** text to break
            *                             ULONG cb;             ** maximum text size
            *                             ULONG ich;            ** break 'near' here
            *                             PULONG pichStart;     ** where break began
            *                             PULONG pichEnd;       ** where break ended
            *                             PULONG pichNext);     ** where next word begin*)

            CONST HK_CODEPAGECHANGED       =  12;
            (* VOID PROCEDURE [EXPENTRY] CodePageChangedHook(HMQ hmq;       ** msg q handle
            *                                    ULONG/USHORT usOldCodepage; ** old code page
            *                                    ULONG/USHORT usNewCodepage);** new code page*)

            CONST HK_WINDOWDC              =  15;
            (* BOOL PROCEDURE [EXPENTRY] WindowDCHook(HAB  hab;             ** installer's hab
            *                             HDC  hdc;             ** current hdc
            *                             HWND hwnd;            ** current hwnd
            *                             BOOL);                ** association flag *)

            CONST HK_DESTROYWINDOW         =  16;
            (* BOOL PROCEDURE [EXPENTRY] DestroyWindowHook (HAB  hab;       ** installer's hab
            *                                   HWND hwnd;      ** destroyed win hwnd
            *                                   ULONG Reserved);** association flag  *)

            CONST HK_CHECKMSGFILTER        =  20;
            (* BOOL PROCEDURE [EXPENTRY] CheckMsgFilteHook (HAB  hab;       ** installer's hab
            *                                   PQMSG pQmsg;    ** p qmsg
            *                                   ULONG/USHORT usFirst;  ** first msg
            *                                   ULONG/USHORT usLast;   ** last msg
            *                                   ULONG/USHORT fOptions);** flags  *)

            CONST HK_MSGINPUT              =  21;
            (* BOOL PROCEDURE [EXPENTRY] MsgInputHook (HAB  hab;          ** installer's hab
            *                              PQMSG pQmsg;       ** p qmsg
            *                              BOOL fSkip;        ** skip msg
            *                              PBOOL pfNoRecord); ** journal record event *)

            CONST HK_LOCKUP                =  23;
            (* BOOL PROCEDURE [EXPENTRY] LockupHook (HAB  hab;              ** installer's hab
            *                           HWND hwndLockupFrame); ** hwnd     *)

            CONST HK_FLUSHBUF              =  24;
            (* BOOL PROCEDURE [EXPENTRY] FlushBufHook (HAB  hab);           ** installer's hab *)

            (*** Current message queue constant **********************************)
            CONST HMQ_CURRENT         = HMQ(1);

            (*** WH_MSGFILTER context codes **************************************)
            CONST MSGF_DIALOGBOX          =   1;
            CONST MSGF_MESSAGEBOX         =   2;
            CONST MSGF_TRACK              =   8;
            CONST MSGF_DDEPOSTMSG         =   3;

            (*** HK_HELP Help modes **********************************************)
            CONST HLPM_FRAME              =(-1);
            CONST HLPM_WINDOW             =(-2);
            CONST HLPM_MENU               =(-3);

            (*** HK_SENDMSG structure ********************************************)
            CONST PM_MODEL_1X    =  0;
            CONST PM_MODEL_2X    =  1;

            TYPE SMHSTRUCT = RECORD     (* smhs *)
                  mp2:    MPARAM;
                  mp1:    MPARAM;
                  msg:    ULONG;
                  hwnd:   HWND;
                  model:  ULONG;
            END;
            TYPE PSMHSTRUCT = POINTER TO SMHSTRUCT;

            (*HK_LOADER context codes *)

            CONST LHK_DELETEPROC          =   1;
            CONST LHK_DELETELIB           =   2;
            CONST LHK_LOADPROC            =   3;
            CONST LHK_LOADLIB             =   4;

            (*HK_MSGCONTROL context codes *)

            CONST MCHK_MSGINTEREST        =   1;
            CONST MCHK_CLASSMSGINTEREST   =   2;
            CONST MCHK_SYNCHRONISATION    =   3;
            CONST MCHK_MSGMODE            =   4;

            (*HK_REGISTERUSERMSG conext codes *)

            CONST RUMHK_DATATYPE          =   1;
            CONST RUMHK_MSG               =   2;

   <* END *>

<* END *>


<* IF DEFINED (INCL_WINTHUNKAPI)  THEN *>

      PROCEDURE [APIENTRY] WinSetClassThunkProc(pszClassname:  PCSZ;
                                                                                  pfnThunkProc:  PFN): BOOL;
      PROCEDURE [APIENTRY] WinQueryClassThunkProc(pszClassname: PCSZ): PFN;
      PROCEDURE [APIENTRY] WinSetWindowThunkProc(hwnd:         HWND;
                                                                                    pfnThunkProc: PFN): BOOL;
      PROCEDURE [APIENTRY] WinQueryWindowThunkProc(hwnd: HWND): PFN;
      PROCEDURE [APIENTRY] WinQueryWindowModel(hwnd: HWND): LONG;

<* END *>

(*
* Include Shell API
*)
<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
   
(* ------------- Include file: .\hm\pmshl.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMSHL.H
*
* OS/2 Presentation Manager Shell constants; types; messages and
* function declarations include file.
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1992
*
* ===========================================================================
*
* The following symbols are used in this file for conditional sections.
*
*   INCL_SHLERRORS       defined if INCL_ERRORS is defined
*   INCL_WINPROGRAMLIST  Include Program List Calls
*   INCL_WINSHELLDATA    Include Presentation Manager profile calls
*   INCL_WINSWITCHLIST   Include Switch List Calls
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)

<* NEW SHL_INCLUDED + *>


(*** if error definitions are required then allow Shell errors *************)
<* IF DEFINED (INCL_ERRORS)  THEN *>
   <* NEW INCL_SHLERRORS + *>
<* END *>


<* IF NOT DEFINED (SESMGR)  THEN *>
      (*** common types; constants and function declarations ******************)


      (*** maximum title length ***********************************************)
      CONST MAXNAMEL = 60;


      (*** program handle *****************************************************)
      TYPE HPROGRAM  = LHANDLE;       (* hprog *)
      TYPE PHPROGRAM = POINTER TO HPROGRAM;
      TYPE HAPP = LHANDLE;


      (*** ini file handle ****************************************************)
      TYPE HINI  = LHANDLE;           (* hini *)
      TYPE PHINI = POINTER TO HINI;


      CONST HINI_PROFILE        = HINI(0);
      CONST HINI_USERPROFILE    = HINI(LONG(-1));
      CONST HINI_SYSTEMPROFILE  = HINI(LONG(-2));
      CONST HINI_USER           = HINI(LONG(-1));
      CONST HINI_SYSTEM         = HINI(LONG(-2));


      TYPE PRFPROFILE = RECORD   (* prfpro *)
            cchUserName:     ULONG  ;
            pszUserName:     PSZ    ;
            cchSysName:      ULONG  ;
            pszSysName:      PSZ    ;
      END;
      TYPE PPRFPROFILE = POINTER TO PRFPROFILE;

<* END *>

<* IF DEFINED (INCL_WINPROGRAMLIST)  THEN *>
      (*** program list section ***********************************************)
   <* IF NOT DEFINED (SESMGR)  THEN *>

            (*** maximum path length *********************************************)
            CONST  MAXPATHL = 128;

            (*** root group handle ***********************************************)
            CONST  SGH_ROOT =  HPROGRAM(LONG(-1));

            TYPE HPROGARRAY = RECORD      (* hpga *)
                  ahprog:  ARRAY [0..0] OF HPROGRAM;
            END;
            TYPE PHPROGARRAY = POINTER TO HPROGARRAY;

   <* END *>

      TYPE PROGCATEGORY  = ULONG;       (* progc *)

      TYPE PPROGCATEGORY = POINTER TO PPROGCATEGORY;

      (*** values acceptable for PROGCATEGORY for PM groups *******************)
      CONST  PROG_DEFAULT             = PROGCATEGORY(0);
      CONST  PROG_FULLSCREEN          = PROGCATEGORY(1);
      CONST  PROG_WINDOWABLEVIO       = PROGCATEGORY(2);
      CONST  PROG_PM                  = PROGCATEGORY(3);
      CONST  PROG_GROUP               = PROGCATEGORY(5);
      CONST  PROG_REAL                = PROGCATEGORY(4);
      CONST  PROG_VDM                 = PROGCATEGORY(4);
      CONST  PROG_WINDOWEDVDM         = PROGCATEGORY(7);
      CONST  PROG_DLL                 = PROGCATEGORY(6);
      CONST  PROG_PDD                 = PROGCATEGORY(8);
      CONST  PROG_VDD                 = PROGCATEGORY(9);
      CONST  PROG_WINDOW_REAL         = PROGCATEGORY(10);
      CONST  PROG_WINDOW_PROT         = PROGCATEGORY(11);
      CONST  PROG_30_STD              = PROGCATEGORY(11);
      CONST  PROG_WINDOW_AUTO         = PROGCATEGORY(12);
      CONST  PROG_SEAMLESSVDM         = PROGCATEGORY(13);
      CONST  PROG_30_STDSEAMLESSVDM   = PROGCATEGORY(13);
      CONST  PROG_SEAMLESSCOMMON      = PROGCATEGORY(14);
      CONST  PROG_30_STDSEAMLESSCOMMON = PROGCATEGORY(14);
      CONST  PROG_31_STDSEAMLESSVDM   = PROGCATEGORY(15);
      CONST  PROG_31_STDSEAMLESSCOMMON = PROGCATEGORY(16);
      CONST  PROG_31_ENHSEAMLESSVDM   = PROGCATEGORY(17);
      CONST  PROG_31_ENHSEAMLESSCOMMON = PROGCATEGORY(18);
      CONST  PROG_31_ENH              = PROGCATEGORY(19);
      CONST  PROG_31_STD              = PROGCATEGORY(20);
      CONST  PROG_RESERVED            = PROGCATEGORY(255);

   <* IF NOT DEFINED (SESMGR)  THEN *>

            TYPE PROGTYPE = RECORD        (* progt *)
                  progc:        PROGCATEGORY ;
                  fbVisible:    ULONG        ;
            END;
            TYPE PPROGTYPE = POINTER TO PROGTYPE;


            (*** visibility flag for PROGTYPE structure **************************)
            CONST  SHE_VISIBLE         = 000H;
            CONST  SHE_INVISIBLE       = 001H;
            CONST  SHE_RESERVED        = 0FFH;

            (*** Protected group flag for PROGTYPE structure *********************)
            CONST  SHE_UNPROTECTED     = 000H;
            CONST  SHE_PROTECTED       = 002H;



            (*** Structures associated with 'Prf' calls **************************)
            TYPE PROGDETAILS = RECORD    (* progde *)
                  Length:         ULONG;    (* set this to sizeof(PROGDETAILS)  *)
                  progt:          PROGTYPE;
                  pszTitle:       PSZ;      (* any of the pointers can be NULL  *)
                  pszExecutable:  PSZ;
                  pszParameters:  PSZ;
                  pszStartupDir:  PSZ;
                  pszIcon:        PSZ;
                  pszEnvironment: PSZ; (* this is terminated by  /0/0      *)
                  swpInitial:     SWP;     (* this replaces XYWINSIZE          *)
            END;
            TYPE  PPROGDETAILS = POINTER TO PROGDETAILS;

            TYPE PROGTITLE = RECORD   (* progti *)
                  hprog:         HPROGRAM ;
                  progt:         PROGTYPE ;
                  pszTitle:      PSZ      ;
            END;
            TYPE PPROGTITLE = POINTER TO PROGTITLE;

            (*** Program List API Function Definitions ***************************)


            (*** Program List API available 'Prf' calls **************************)

            PROCEDURE [APIENTRY] PrfQueryProgramTitles(      hini:   HINI ;
                                                                                      hprogGroup: HPROGRAM ;
                                                                                      pTitles:  PPROGTITLE ;
                                                                                      cchBufferMax:  ULONG ;
                                                                                      pulCount:     PULONG): ULONG;

            (*********************************************************************)
            (*  NOTE: string information is concatanated after the array of      *)
            (*        PROGTITLE structures so you need to allocate storage       *)
            (*        greater than sizeof(PROGTITLE)*cPrograms to query programs *)
            (*        in a group.                                                *)
            (*                                                                   *)
            (*  PrfQueryProgramTitles recommended usage to obtain titles of all  *)
            (*  programs in a group (Hgroup=SGH_ROOT is for all groups):         *)
            (*                                                                   *)
            (*  BufLen = PrfQueryProgramTitles(Hini; Hgroup;                     *)
            (*                                  (PPROGTITLE)NULL; 0; &Count);    *)
            (*                                                                   *)
            (*  Alocate buffer of  Buflen                                        *)
            (*                                                                   *)
            (*  Len = PrfQueryProgramTitles(Hini; Hgroup; (PPROGTITLE)pBuffer;   *)
            (*                               BufLen; pCount);                    *)
            (*                                                                   *)
            (*********************************************************************)

            PROCEDURE [APIENTRY] PrfAddProgram( hini:        HINI ;
                                                                            pDetails:    PPROGDETAILS ;
                                                                            hprogGroup:  HPROGRAM):  HPROGRAM;

            PROCEDURE [APIENTRY] PrfChangeProgram( hini:     HINI ;
                                                                                  hprog:    HPROGRAM ;
                                                                                  pDetails: PPROGDETAILS): BOOL;

            PROCEDURE [APIENTRY] PrfQueryDefinition( hini:         HINI ;
                                                                                      hprog:        HPROGRAM ;
                                                                                      pDetails:     PPROGDETAILS ;
                                                                                      cchBufferMax: ULONG): ULONG;

            (*********************************************************************)
            (*  NOTE: string information is concatanated after the PROGDETAILS   *)
            (*        field structure so you need to allocate storage greater    *)
            (*        than sizeof(PROGDETAILS) to query programs                 *)
            (*                                                                   *)
            (*  PrfQueryDefinition recomended usage:                             *)
            (*                                                                   *)
            (*  bufferlen = PrfQueryDefinition(Hini;Hprog;(PPROGDETAILS)NULL;0)  *)
            (*                                                                   *)
            (*  Alocate buffer of bufferlen bytes                                *)
            (*  set Length field (0 will be supported)                           *)
            (*                                                                   *)
            (*  (PPROGDETAILS)pBuffer->Length=sizeof(PPROGDETAILS)               *)
            (*                                                                   *)
            (*  len = PrfQueryDefinition(Hini; Hprog; (PPROGDETAILS)pBuffer;     *)
            (*      bufferlen)                                                   *)
            (*********************************************************************)

            PROCEDURE [APIENTRY] PrfRemoveProgram( hini:     HINI ;
                                                                                  hprog:    HPROGRAM):  BOOL;

            PROCEDURE [APIENTRY] PrfQueryProgramHandle( hini:         HINI ;
                                                                                            pszExe:       PCSZ ;
                                                                                            phprogArray:  PHPROGARRAY ;
                                                                                            cchBufferMax: ULONG ;
                                                                                            pulCount:     PULONG): ULONG;

            PROCEDURE [APIENTRY] PrfCreateGroup( hini:         HINI ;
                                                                              pszTitle:     PCSZ ;
                                                                              chVisibility: UCHAR): HPROGRAM;

            PROCEDURE [APIENTRY] PrfDestroyGroup( hini:       HINI ;
                                                                                hprogGroup: HPROGRAM): BOOL;

            PROCEDURE [APIENTRY] PrfQueryProgramCategory(hini:     HINI ;
                                                                                              pszExe:   PCSZ): PROGCATEGORY;

            PROCEDURE [APIENTRY] WinStartApp(hwndNotify:     HWND ;
                                                                pDetails:    PPROGDETAILS ;
                                                                pszParams:   PCSZ ;
                                                                Reserved:    PVOID ;
                                                                fbOptions:   ULONG): HAPP;

            (*** bit values for Options parameter ********************************)
            CONST  SAF_VALIDFLAGS        = 0001FH;

            CONST  SAF_INSTALLEDCMDLINE  = 00001H;   (* use installed parameters *)
            CONST  SAF_STARTCHILDAPP     = 00002H;   (* related application      *)
            CONST  SAF_MAXIMIZED         = 00004H;   (* Start App maximized *)
            CONST  SAF_MINIMIZED         = 00008H;   (* Start App minimized; if !SAF_MAXIMIZED *)
            CONST  SAF_BACKGROUND        = 00010H;   (* Start app in the background *)


            PROCEDURE [APIENTRY] WinTerminateApp(happ: HAPP): BOOL;

   <* END *>
<* END *>


(*** switch list section ***************************************************)

TYPE HSWITCH  = LHANDLE;        (* hsw *)
TYPE PHSWITCH = POINTER TO HSWITCH;

<* IF NOT DEFINED (SESMGR)  THEN *>
   <* IF (DEFINED (INCL_WINSWITCHLIST) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>

            TYPE SWCNTRL = RECORD         (* swctl *)
                  hwnd:             HWND     ;
                  hwndIcon:         HWND     ;
                  hprog:            HPROGRAM ;
                  idProcess:        PID      ;
                  idSession:        ULONG    ;
                  uchVisibility:    ULONG    ;
                  fbJump:           ULONG    ;
                  szSwtitle:        ARRAY [0..MAXNAMEL+3] OF CHAR;
                  bProgType:        ULONG    ;
            END;
            TYPE PSWCNTRL = POINTER TO SWCNTRL;

            (*** visibility flag for SWCNTRL structure ***************************)
            CONST  SWL_VISIBLE    = 04;
            CONST  SWL_INVISIBLE  = 01;
            CONST  SWL_GRAYED     = 02;

            (*** jump flag for SWCNTRL structure *********************************)
            CONST  SWL_JUMPABLE    = 02;
            CONST  SWL_NOTJUMPABLE = 01;


            (*** Switching Program functions *************************************)
            PROCEDURE [APIENTRY] WinAddSwitchEntry(p: PSWCNTRL): HSWITCH;
            PROCEDURE [APIENTRY] WinRemoveSwitchEntry(h: HSWITCH): ULONG;

   <* END *>

   <* IF NOT DEFINED (INCL_WINSWITCHLIST)  THEN *>

            TYPE SWENTRY = RECORD         (* swent *)
                  hswitch:   HSWITCH ;
                  swctl:     SWCNTRL ;
            END;
            TYPE PSWENTRY = POINTER TO SWENTRY;

            TYPE SWBLOCK = RECORD         (* swblk *)
                  cswentry:         ULONG    ;
                  aswentry:         ARRAY [0..0] OF SWENTRY;
            END;
            TYPE PSWBLOCK = POINTER TO SWBLOCK;


            (*** 32-bit versions of these APIs have 32-bit parameters *********)
            PROCEDURE [APIENTRY] WinChangeSwitchEntry(hswitchSwitch:       HSWITCH ;
                                                                                        pswctlSwitchData:    PSWCNTRL
                                                                                        ): ULONG;

            PROCEDURE [APIENTRY] WinCreateSwitchEntry(hab:               HAB ;
                                                                                        pswctlSwitchData:  PSWCNTRL
                                                                                          ): HSWITCH;

            PROCEDURE [APIENTRY] WinQuerySessionTitle(hab:    HAB ;
                                                                                        usSession:    ULONG ;
                                                                                        pszTitle:      PCSZ ;
                                                                                        usTitlelen:    ULONG): ULONG;

            PROCEDURE [APIENTRY] WinQuerySwitchEntry(hswitchSwitch:       HSWITCH ;
                                                                                      pswctlSwitchData:    PSWCNTRL
                                                                                      ): ULONG;

            PROCEDURE [APIENTRY] WinQuerySwitchHandle(hwnd:          HWND ;
                                                                                          pidProcess:   PID): HSWITCH;
            PROCEDURE [APIENTRY] WinQuerySwitchList(hab:                   HAB ;
                                                                                    pswblkSwitchEntries:   PSWBLOCK ;
                                                                                    usDataLength:          ULONG
                                                                                    ): ULONG;

            PROCEDURE [APIENTRY] WinQueryTaskSizePos(hab:     HAB ;
                                                                                      usScreenGroup:      ULONG ;
                                                                                      pswpPositionData:   PSWP): ULONG;

            PROCEDURE [APIENTRY] WinQueryTaskTitle(usSession:  ULONG ;
                                                                                  pszTitle:   PCSZ ;
                                                                                  usTitlelen: ULONG): ULONG;

            PROCEDURE [APIENTRY] WinSwitchToProgram(hswitchSwHandle: HSWITCH): ULONG;


   <* END *>

   <* IF NOT DEFINED (INCL_WINSHELLDATA)  THEN *>

            (*** OS2.INI Access functions ****************************************)

            PROCEDURE [APIENTRY] PrfQueryProfileInt(hini:    HINI ;
                                                                                  pszApp:   PCSZ ;
                                                                                  pszKey:   PCSZ ;
                                                                                  sDefault: LONG  ): LONG;

            PROCEDURE [APIENTRY] PrfQueryProfileString(hini:        HINI ;
                                                                                        pszApp:       PCSZ ;
                                                                                        pszKey:       PCSZ ;
                                                                                        pszDefault:   PCSZ ;
                                                                                        pBuffer:      PVOID ;
                                                                                        cchBufferMax: ULONG ): ULONG;

            PROCEDURE [APIENTRY] PrfWriteProfileString(hini:    HINI ;
                                                                                        pszApp:   PCSZ ;
                                                                                        pszKey:   PCSZ ;
                                                                                        pszData:  PCSZ ): BOOL;

            PROCEDURE [APIENTRY] PrfQueryProfileSize(hini:     HINI ;
                                                                                    pszApp:    PCSZ ;
                                                                                    pszKey:    PCSZ ;
                                                                                    pulReqLen: PULONG ): BOOL;

            PROCEDURE [APIENTRY] PrfQueryProfileData(hini:      HINI ;
                                                                                    pszApp:     PCSZ ;
                                                                                    pszKey:     PCSZ ;
                                                                                    pBuffer:    PVOID ;
                                                                                    pulBuffLen: PULONG ): BOOL;

            PROCEDURE [APIENTRY] PrfWriteProfileData(hini:      HINI ;
                                                                                    pszApp:     PCSZ ;
                                                                                    pszKey:     PCSZ ;
                                                                                    pData:      PVOID ;
                                                                                    cchDataLen: ULONG ): BOOL;

            PROCEDURE [APIENTRY] PrfOpenProfile(hab:        HAB ;
                                                                          pszFileName: PCSZ ): HINI;

            PROCEDURE [APIENTRY] PrfCloseProfile(hini: HINI ): BOOL;

            PROCEDURE [APIENTRY] PrfReset(hab:         HAB ;
                                                              PpPrfProfile: PRFPROFILE ): BOOL;

            PROCEDURE [APIENTRY]
              PrfQueryProfile(hab:         HAB ;
                                                                            pPrfProfile:  PPRFPROFILE ): BOOL;

            (*** public message; broadcast on WinReset ***************************)
            CONST  PL_ALTERED = 0008EH;  (* WM_SHELLFIRST + 0E *)

   <* END *>

   <* IF DEFINED (INCL_SHLERRORS)  THEN *>
      
(* ------------- Include file: .\hm\pmerr.hm ------------- *)
(* ------------- This file we'll include late. EOF. --------------- *)

   <* END *>

<* END *>


(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmshl.hm ------------- *)
<* END *>

<* IF DEFINED (INCL_WINCOUNTRY)  THEN *>

      PROCEDURE [APIENTRY] WinQueryCp(hmq: HMQ): ULONG;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            PROCEDURE [APIENTRY] WinSetCp(hmq:        HMQ;
                                                                idCodePage: ULONG): BOOL;

            PROCEDURE [APIENTRY] WinQueryCpList(hab:    HAB;
                                                                          ccpMax:  ULONG;
                                                                          prgcp:   PULONG): ULONG;

            PROCEDURE [APIENTRY] WinCpTranslateString(hab:        HAB;
                                                                                        cpSrc:      ULONG;
                                                                                        pszSrc:     PCSZ;
                                                                                        cpDst:      ULONG;
                                                                                        cchDestMax: ULONG;
                                                                                        pchDest:    PCSZ): BOOL;

            PROCEDURE [APIENTRY] WinCpTranslateChar(hab:    HAB;
                                                                                    cpSrc:  ULONG;
                                                                                    chSrc:  UCHAR;
                                                                                    cpDst:  ULONG): UCHAR;

            PROCEDURE [APIENTRY] WinUpper(hab:  HAB;
                                                              idcp:  ULONG;
                                                              idcc:  ULONG;
                                                              psz:   PCSZ): ULONG;

            PROCEDURE [APIENTRY] WinUpperChar(hab:  HAB;
                                                                      idcp:  ULONG;
                                                                      idcc:  ULONG;
                                                                      c:     ULONG): ULONG;

            PROCEDURE [APIENTRY] WinNextChar(hab:  HAB;
                                                                      idcp: ULONG;
                                                                      idcc: ULONG;
                                                                      psz:  PCSZ): PCSZ;

            PROCEDURE [APIENTRY] WinPrevChar(hab:       HAB;
                                                                      idcp:      ULONG;
                                                                      idcc:      ULONG;
                                                                      pszStart:  PCSZ;
                                                                      psz:       PCSZ): PCSZ;

            PROCEDURE [APIENTRY] WinCompareStrings(hab: HAB;
                                                                                idcp: ULONG;
                                                                                idcc: ULONG;
                                                                                psz1: PCSZ;
                                                                                psz2: PCSZ;
                                                                                reserved: ULONG): ULONG;

            CONST WCS_ERROR               =   0;
            CONST WCS_EQ                  =   1;
            CONST WCS_LT                  =   2;
            CONST WCS_GT                  =   3;

   <* END *>

<* END *>



(* Heap Manager Interface declarations *)

<* IF DEFINED (INCL_WINHEAP)  THEN *>


<* END *>


(*** Atom Manager Interface declarations *)

<* IF DEFINED (INCL_WINATOM)  THEN *>

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            TYPE HATOMTBL = LHANDLE;
            TYPE ATOM     = ULONG;

            PROCEDURE [APIENTRY] WinQuerySystemAtomTable(): HATOMTBL;
            PROCEDURE [APIENTRY] WinCreateAtomTable(cbInitial: ULONG;
                                                                                      cBuckets: ULONG): HATOMTBL;
            PROCEDURE [APIENTRY] WinDestroyAtomTable(hAtomTbl: HATOMTBL): HATOMTBL;
            PROCEDURE [APIENTRY] WinAddAtom(hAtomTbl:     HATOMTBL;
                                                                      pszAtomName: PCSZ): ATOM;
            PROCEDURE [APIENTRY] WinFindAtom(hAtomTbl:     HATOMTBL;
                                                                        pszAtomName: PCSZ): ATOM;
            PROCEDURE [APIENTRY] WinDeleteAtom(hAtomTbl:  HATOMTBL;
                                                                            atom:     ATOM): ATOM;
            PROCEDURE [APIENTRY] WinQueryAtomUsage(hAtomTbl: HATOMTBL;
                                                                                  atom:     ATOM): ULONG;
            PROCEDURE [APIENTRY] WinQueryAtomLength(hAtomTbl: HATOMTBL;
                                                                                    atom:     ATOM): ULONG;
            PROCEDURE [APIENTRY] WinQueryAtomName(hAtomTbl:     HATOMTBL;
                                                                                atom:         ATOM;
                                                                                pchBuffer:    PCSZ;
                                                                                cchBufferMax: ULONG): ULONG;

            --CONST MAKEINTATOM(a)  ((PCH)MAKEULONG(a; = 0ffff))
   <* END *>

<* END *>


<* IF DEFINED (INCL_WINERRORS)  THEN *>
      
(* ------------- Include file: .\hm\pmerr.hm ------------- *)
(* ------------- This file we'll include late. EOF. --------------- *)


      (* Error codes for debugging support                                       *)
      (* = 01001 - = 01021; = 01034; = 01036 - = 01050 are reserved                   *)

      CONST WINDBG_HWND_NOT_DESTROYED           = 01022H;
      CONST WINDBG_HPTR_NOT_DESTROYED           = 01023H;
      CONST WINDBG_HACCEL_NOT_DESTROYED         = 01024H;
      CONST WINDBG_HENUM_NOT_DESTROYED          = 01025H;
      CONST WINDBG_VISRGN_SEM_BUSY              = 01026H;
      CONST WINDBG_USER_SEM_BUSY                = 01027H;
      CONST WINDBG_DC_CACHE_BUSY                = 01028H;
      CONST WINDBG_HOOK_STILL_INSTALLED         = 01029H;
      CONST WINDBG_WINDOW_STILL_LOCKED          = 0102aH;
      CONST WINDBG_UPDATEPS_ASSERTION_FAIL      = 0102bH;
      CONST WINDBG_SENDMSG_WITHIN_USER_SEM      = 0102cH;
      CONST WINDBG_USER_SEM_NOT_ENTERED         = 0102dH;
      CONST WINDBG_PROC_NOT_EXPORTED            = 0102eH;
      CONST WINDBG_BAD_SENDMSG_HWND             = 0102fH;
      CONST WINDBG_ABNORMAL_EXIT                = 01030H;
      CONST WINDBG_INTERNAL_REVISION            = 01031H;
      CONST WINDBG_INITSYSTEM_FAILED            = 01032H;
      CONST WINDBG_HATOMTBL_NOT_DESTROYED       = 01033H;
      CONST WINDBG_WINDOW_UNLOCK_WAIT           = 01035H;

      (* Get/Set Error Information Interface declarations *)

      TYPE ERRINFO = RECORD   (* erri *)
            cbFixedErrInfo: ULONG;
            idError:        ERRORID;
            cDetailLevel:   ULONG;
            offaoffszMsg:   ULONG;
            offBinaryData:  ULONG;
      END;
      TYPE PERRINFO = POINTER TO ERRINFO;

      PROCEDURE [APIENTRY]    WinGetLastError(hab: HAB): ERRORID;
      PROCEDURE [APIENTRY]    WinGetErrorInfo(hab: HAB): PERRINFO;
      PROCEDURE [APIENTRY]    WinFreeErrorInfo(perrinfo: PERRINFO): BOOL;

<* END *>

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
      (* include WinSetErrorInfo *)
   <* IF DEFINED (INCL_WINSEI)  THEN *>
      <* IF NOT DEFINED (SEI_PMWINP)  THEN *>
         <* NEW SEI_PMWIN + *>
         
(* ------------- Include file: .\hm\pmsei.hm ------------- *)
(****************************** Module Header *******************************\
*
* Module Name: PMSEI.H
*
* OS/2 Presentation Manager SetErrorInfo constants and function declaration
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1992
*
* ===========================================================================
*
* This is included from PMWIN.H when appropriate INCL symbols are defined
*
* ===========================================================================
*
* Comments at the end of each typedef line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)


<* NEW SEI_INCLUDED + *>

PROCEDURE [APIENTRY] WinSetErrorInfo(ei: ERRORID; ul: ULONG;
                                                                      SEQ X: SYSTEM.BYTE): ERRORID;

CONST SEI_BREAKPOINT  = 8000H;  (* Always enter an INT 3 breakpt       *)
CONST SEI_NOBEEP      = 4000H;  (* Do not call DosBeep                 *)
CONST SEI_NOPROMPT    = 2000H;  (* Do not prompt the user              *)
CONST SEI_DBGRSRVD    = 1000H;  (* Reserved for debug use              *)
CONST SEI_DEBUGONLY   = (SEI_BREAKPOINT + SEI_NOBEEP + SEI_NOPROMPT + SEI_DBGRSRVD);

CONST SEI_STACKTRACE  = 0001H;  (* save the stack trace                *)
CONST SEI_REGISTERS   = 0002H;  (* save the registers                  *)
CONST SEI_ARGCOUNT    = 0004H;  (* first USHORT in args is arg count   *)
CONST SEI_DOSERROR    = 0008H;  (* first USHORT in args is OS2 error code *)
CONST SEI_RESERVED    = 0FE0H;  (* Reserved for future use             *)

(****************************************************************************
* Note that when SEI_ARGCOUNT; SEI_DOSERROR are specified
* together; then the implied order of the parameters is:
*
*
*  WinSetErrorInfo( MAKEERRORID( .... );
*                   SEI_ARGCOUNT | SEI_DOSERROR;
*                   argCount;
*                   dosErrorCode);
*
****************************************************************************)

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmsei.hm ------------- *)
      <* END *>
   <* END *>
<* END *>

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
   <* IF DEFINED (INCL_WINDDE)  THEN *>

            (*
            * DDE standard system topic and item strings
            *)
            CONST SZDDESYS_TOPIC                =  "System";
            CONST SZDDESYS_ITEM_TOPICS          =  "Topics";
            CONST SZDDESYS_ITEM_SYSITEMS        =  "SysItems";
            CONST SZDDESYS_ITEM_RTNMSG          =  "ReturnMessage";
            CONST SZDDESYS_ITEM_STATUS          =  "Status";
            CONST SZDDESYS_ITEM_FORMATS         =  "Formats";
            CONST SZDDESYS_ITEM_SECURITY        =  "Security";
            CONST SZDDESYS_ITEM_ITEMFORMATS     =  "ItemFormats";
            CONST SZDDESYS_ITEM_HELP            =  "Help";
            CONST SZDDESYS_ITEM_PROTOCOLS       =  "Protocols";
            CONST SZDDESYS_ITEM_RESTART         =  "Restart";

            (*
            * Dynamic Data Exchange (DDE) Structure Declarations
            *)
            TYPE CONVCONTEXT = RECORD   (* cctxt *)
                  cb:          ULONG;      (* sizeof(CONVCONTEXT) *)
                  fsContext:   ULONG;
                  idCountry:   ULONG;
                  usCodepage:  ULONG;
                  usLangID:    ULONG;
                  usSubLangID: ULONG;
            END;
            TYPE PCONVCONTEXT = POINTER TO CONVCONTEXT;

            CONST DDECTXT_CASESENSITIVE    = 00001H;

            TYPE DDEINIT = RECORD   (* ddei *)
                  cb:              ULONG;  (* sizeof(DDEINIT) *)
                  pszAppName:      PSZ;
                  pszTopic:        PSZ;
                  offConvContext:  ULONG;
            END;
            TYPE PDDEINIT = POINTER TO DDEINIT;

            TYPE DDESTRUCT = RECORD   (* dde *)
                  cbData:        ULONG;
                  fsStatus:      USHORT;
                  usFormat:      USHORT;
                  offszItemName: USHORT;
                  offabData:     USHORT;
            END;
            TYPE PDDESTRUCT = POINTER TO DDESTRUCT;

            (* DDE constants for wStatus field *)
            CONST DDE_FACK                   = 00001H;
            CONST DDE_FBUSY                  = 00002H;
            CONST DDE_FNODATA                = 00004H;
            CONST DDE_FACKREQ                = 00008H;
            CONST DDE_FRESPONSE              = 00010H;
            CONST DDE_NOTPROCESSED           = 00020H;
            CONST DDE_FRESERVED              = 000C0H;
            CONST DDE_FAPPSTATUS             = 0FF00H;

            (* old DDE public formats - new ones are CF_ constants *)

            CONST DDEFMT_TEXT                = 00001H;

            (* Dynamic Data Exchange (DDE) Routines *)

            PROCEDURE [APIENTRY] WinDdeInitiate(hwndClient:   HWND;
                                                                            pszAppName:   PCSZ;
                                                                            pszTopicName: PCSZ;
                                                                            pcctxt:       PCONVCONTEXT): BOOL;

            PROCEDURE [APIENTRY] WinDdeRespond(hwndClient:   HWND;
                                                                          hwndServer:   HWND;
                                                                          pszAppName:   PCSZ;
                                                                          pszTopicName: PCSZ;
                                                                          pcctxt:       PCONVCONTEXT): MRESULT;

            PROCEDURE [APIENTRY] WinDdePostMsg(hwndTo:     HWND;
                                                                          hwndFrom:   HWND;
                                                                          wm:         ULONG;
                                                                          pddest:     PDDESTRUCT;
                                                                          flOptions:  ULONG): BOOL;

            CONST DDEPM_RETRY     = 000000001H;
            CONST DDEPM_NOFREE    = 000000002H;

            (* Dynamic Data Exchange (DDE) Messages *)

            CONST WM_DDE_FIRST               = 000A0H;
            CONST WM_DDE_INITIATE            = 000A0H;
            CONST WM_DDE_REQUEST             = 000A1H;
            CONST WM_DDE_ACK                 = 000A2H;
            CONST WM_DDE_DATA                = 000A3H;
            CONST WM_DDE_ADVISE              = 000A4H;
            CONST WM_DDE_UNADVISE            = 000A5H;
            CONST WM_DDE_POKE                = 000A6H;
            CONST WM_DDE_EXECUTE             = 000A7H;
            CONST WM_DDE_TERMINATE           = 000A8H;
            CONST WM_DDE_INITIATEACK         = 000A9H;
            CONST WM_DDE_LAST                = 000AFH;

            (* DDE helper macros *)

            --CONST DDES_PSZITEMNAME(pddes) \
            --(((PSZ)pddes) + ((PDDESTRUCT)pddes)->offszItemName)

            --CONST DDES_PABDATA(pddes)       \
            --(((PBYTE)pddes) + ((PDDESTRUCT)pddes)->offabData)

            --CONST DDEI_PCONVCONTEXT(pddei)        \
            --((PCONVCONTEXT)((PBYTE)pddei + pddei->offConvContext))


   <* END *>
<* END *>

<* IF DEFINED (INCL_WINWINDOWMGR)  THEN *>
      CONST WM_QUERYCONVERTPOS         = 000b0H;   (* WM_DBCSFIRST *)

      (* Return values for WM_QUERYCONVERTPOS *)
      CONST QCP_CONVERT                = 00001H;
      CONST QCP_NOCONVERT              = 00000H;

<* END *>

<* IF DEFINED (INCL_WINHELP)  THEN *>
   <* IF NOT DEFINED (PMHELP_INCLUDED)  THEN *>
      
(* ------------- Include file: .\hm\pmhelp.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMHELP.H
*
* OS/2 Presentation Manager Information Presentation Facility;
* Help Manager declarations.
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1993
*
* ===========================================================================
*
* The following symbols are used in this file for conditional sections.
*
*   CONST:                To include:
*
*   INCL_WINHELP            Help manager structures and APIs
*   INCL_DDF                Dynamic Data Formatting APIs
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)

      (* XLATON *)
   <* NEW PMHELP_INCLUDED + *>



      (************************************************************************)
      (* HelpSubTable entry structure                                         *)
      (************************************************************************)
      TYPE HELPSUBTABLE  = USHORT;
      TYPE PHELPSUBTABLE = POINTER TO HELPSUBTABLE;

      (************************************************************************)
      (* HelpTable entry structure                                            *)
      (*                                                                      *)
      (*  Pack the structure HELPTABLE so that it is identical in the 32-Bit  *)
      (*  and 16-Bit world.  We have to do this because the HelpTable can     *)
      (*  reside either in memory or in the application's resources.          *)
      (************************************************************************)

      (* XLATOFF *)
      --#pragma pack(2)   (* pack on word boundary *)
      (* XLATON *)

      TYPE HELPTABLE = RECORD       (* ht *)
            idAppWindow:      USHORT          ;
            phstHelpSubTable: PHELPSUBTABLE   ;
            idExtPanel:       USHORT          ;
      END;
      TYPE PHELPTABLE = POINTER TO HELPTABLE;

      (* XLATOFF *)
      --#pragma pack()    (* reset to default packing *)
      (* XLATON *)


      (************************************************************************)
      (* IPF Initialization Structure used on the                             *)
      (* WinCreateHelpInstance() call.                                        *)
      (************************************************************************)

      TYPE HELPINIT = RECORD     (* hinit 32 bit *)
            cb:                  ULONG        ;
            ulReturnCode:        ULONG        ;
            pszTutorialName:     PSZ          ;
            phtHelpTable:        PHELPTABLE   ;
            hmodHelpTableModule: HMODULE      ;
            hmodAccelActionBarModule:    HMODULE      ;
            idAccelTable:        ULONG        ;
            idActionBar:         ULONG        ;
            pszHelpWindowTitle:  PSZ          ;
            fShowPanelId:        ULONG        ;
            pszHelpLibraryName:  PSZ          ;
      END;
      TYPE PHELPINIT = POINTER TO HELPINIT;


      (************************************************************************)
      (* Search parent chain indicator for HM_SET_ACTIVE_WINDOW message.      *)
      (************************************************************************)
      CONST HWND_PARENT       = HWND(NIL);

      (************************************************************************)
      (* Constants used to define whether user wants to display panel using   *)
      (* panel number or panel name.                                          *)
      (************************************************************************)
      CONST HM_RESOURCEID            = 0;
      CONST HM_PANELNAME             = 1;

      CONST HMPANELTYPE_NUMBER       = 0;
      CONST HMPANELTYPE_NAME         = 1;

      (************************************************************************)
      (* Constants used to define how the panel IDs are displayed on          *)
      (* help panels.                                                         *)
      (************************************************************************)
      CONST CMIC_HIDE_PANEL_ID       = 0000H;
      CONST CMIC_SHOW_PANEL_ID       = 0001H;
      CONST CMIC_TOGGLE_PANEL_ID     = 0002H;

      (************************************************************************)
      (* Window Help API declarations.                                        *)
      (************************************************************************)
      PROCEDURE [APIENTRY]  WinDestroyHelpInstance(hwndHelpInstance: HWND ): BOOL;

      PROCEDURE [APIENTRY]  WinCreateHelpInstance(hab:     HAB ;
                                                                                phinitHMInitStructure: PHELPINIT ): HWND;

      PROCEDURE [APIENTRY]  WinAssociateHelpInstance(hwndHelpInstance:    HWND ;
                                                                                      hwndApp: HWND ): BOOL;

      PROCEDURE [APIENTRY]  WinQueryHelpInstance(hwndApp: HWND ): HWND;

      PROCEDURE [APIENTRY]  WinLoadHelpTable(hwndHelpInstance:    HWND ;
                                                                      idHelpTable:       ULONG ;
                                                                      Module: HMODULE ): BOOL;

      PROCEDURE [APIENTRY]  WinCreateHelpTable(hwndHelpInstance:  HWND ;
                                                                          phtHelpTable: PHELPTABLE ): BOOL;

      (************************************************************************)
      (* IPF message base.                                                    *)
      (************************************************************************)
      CONST HM_MSG_BASE              = 0220H;

      (************************************************************************)
      (* Messages applications can send to the IPF.                           *)
      (************************************************************************)
      CONST HM_DISMISS_WINDOW             = HM_MSG_BASE+00001H;
      CONST HM_DISPLAY_HELP               = HM_MSG_BASE+00002H;
      CONST HM_EXT_HELP                   = HM_MSG_BASE+00003H;
      CONST HM_GENERAL_HELP               = HM_EXT_HELP;
      CONST HM_SET_ACTIVE_WINDOW          = HM_MSG_BASE+00004H;
      CONST HM_LOAD_HELP_TABLE            = HM_MSG_BASE+00005H;
      CONST HM_CREATE_HELP_TABLE          = HM_MSG_BASE+00006H;
      CONST HM_SET_HELP_WINDOW_TITLE      = HM_MSG_BASE+00007H;
      CONST HM_SET_SHOW_PANEL_ID          = HM_MSG_BASE+00008H;
      CONST HM_REPLACE_HELP_FOR_HELP      = HM_MSG_BASE+00009H;
      CONST HM_REPLACE_USING_HELP         = HM_REPLACE_HELP_FOR_HELP;
      CONST HM_HELP_INDEX                 = HM_MSG_BASE+0000aH;
      CONST HM_HELP_CONTENTS              = HM_MSG_BASE+0000bH;
      CONST HM_KEYS_HELP                  = HM_MSG_BASE+0000cH;
      CONST HM_SET_HELP_LIBRARY_NAME      = HM_MSG_BASE+0000dH;

      CONST HM_SET_OBJCOM_WINDOW          = HM_MSG_BASE+00018H;
      CONST HM_UPDATE_OBJCOM_WINDOW_CHAIN = HM_MSG_BASE+00019H;
      CONST HM_QUERY_DDF_DATA             = HM_MSG_BASE+0001aH;
      CONST HM_INVALIDATE_DDF_DATA        = HM_MSG_BASE+0001bH;
      CONST HM_QUERY                      = HM_MSG_BASE+0001cH;
      CONST HM_SET_COVERPAGE_SIZE         = HM_MSG_BASE+0001dH;

      (************************************************************************)
      (* Constants used to query the info from IPF in HM_QUERY message        *)
      (************************************************************************)

      (* Hi word in lParam 1 *)
      CONST HMQW_COVERPAGE          = 00001H;
      CONST HMQW_INDEX              = 00002H;
      CONST HMQW_TOC                = 00003H;
      CONST HMQW_SEARCH             = 00004H;
      CONST HMQW_VIEWPAGES          = 00005H;
      CONST HMQW_LIBRARY            = 00006H;
      CONST HMQW_VIEWPORT           = 00007H;
      CONST HMQW_OBJCOM_WINDOW      = 00008H;
      CONST HMQW_INSTANCE           = 00009H;
      CONST HMQW_ACTIVEVIEWPORT     = 0000aH;
      CONST CONTROL_SELECTED        = 0000bH;

      CONST HMQW_GROUP_VIEWPORT     = 000f1H;
      CONST HMQW_RES_VIEWPORT       = 000f2H;
      CONST USERDATA                = 000f3H;

      (* Lo word in lParam1 of HMQW_VIEWPORT *)
      CONST HMQVP_NUMBER            = 00001H;
      CONST HMQVP_NAME              = 00002H;
      CONST HMQVP_GROUP             = 00003H;

      (************************************************************************)
      (* Predefined Control IDs                                               *)
      (************************************************************************)
      CONST CTRL_PREVIOUS_ID    = 00001H;
      CONST CTRL_SEARCH_ID      = 00002H;
      CONST CTRL_PRINT_ID       = 00003H;
      CONST CTRL_INDEX_ID       = 00004H;
      CONST CTRL_CONTENTS_ID    = 00005H;
      CONST CTRL_BACK_ID        = 00006H;
      CONST CTRL_FORWARD_ID     = 00007H;
      CONST CTRL_TUTORIAL_ID    = 000FFH;

      CONST CTRL_USER_ID_BASE   = 257;

      (************************************************************************)
      (* Messages the IPF sends to the applications active window             *)
      (* as defined by the IPF.                                               *)
      (************************************************************************)

      CONST HM_ERROR                      = HM_MSG_BASE+0000eH;
      CONST HM_HELPSUBITEM_NOT_FOUND      = HM_MSG_BASE+0000fH;
      CONST HM_QUERY_KEYS_HELP            = HM_MSG_BASE+00010H;
      CONST HM_TUTORIAL                   = HM_MSG_BASE+00011H;
      CONST HM_EXT_HELP_UNDEFINED         = HM_MSG_BASE+00012H;
      CONST HM_GENERAL_HELP_UNDEFINED     = HM_EXT_HELP_UNDEFINED;
      CONST HM_ACTIONBAR_COMMAND          = HM_MSG_BASE+00013H;
      CONST HM_INFORM                     = HM_MSG_BASE+00014H;
      CONST HM_NOTIFY                     = HM_MSG_BASE+00022H;
      CONST HM_SET_USERDATA               = HM_MSG_BASE+00023H;
      CONST HM_CONTROL                    = HM_MSG_BASE+00024H;

      (************************************************************************)
      (* notify information for HM_NOTIFY                                     *)
      (************************************************************************)
      CONST OPEN_COVERPAGE       = 00001H;
      CONST OPEN_PAGE            = 00002H;
      CONST SWAP_PAGE            = 00003H;
      CONST OPEN_TOC             = 00004H;
      CONST OPEN_INDEX           = 00005H;
      CONST OPEN_HISTORY         = 00006H;
      CONST OPEN_SEARCH_HIT_LIST = 00007H;
      CONST OPEN_LIBRARY         = 00008H;
      CONST HELP_REQUESTED       = 00009H;

      (************************************************************************)
      (* HMERR_NO_FRAME_WND_IN_CHAIN - There is no frame window in the        *)
      (* window chain from which to find or set the associated help           *)
      (* instance.                                                            *)
      (************************************************************************)
      CONST  HMERR_NO_FRAME_WND_IN_CHAIN               = 000001001H;

      (***********************************************************************)
      (* HMERR_INVALID_ASSOC_APP_WND - The application window handle         *)
      (* specified on the WinAssociateHelpInstance() call is not a valid     *)
      (* window handle.                                                      *)
      (***********************************************************************)
      CONST  HMERR_INVALID_ASSOC_APP_WND               = 000001002H;

      (***********************************************************************)
      (* HMERR_INVALID_ASSOC_HELP_INST - The help instance handle specified  *)
      (* on the WinAssociateHelpInstance() call is not a valid               *)
      (* window handle.                                                      *)
      (***********************************************************************)
      CONST  HMERR_INVALID_ASSOC_HELP_INST             = 000001003H;

      (***********************************************************************)
      (* HMERR_INVALID_DESTROY_HELP_INST - The window handle specified       *)
      (* as the help instance to destroy is not of the help instance class.  *)
      (***********************************************************************)
      CONST  HMERR_INVALID_DESTROY_HELP_INST           = 000001004H;

      (***********************************************************************)
      (* HMERR_NO_HELP_INST_IN_CHAIN - The parent or owner chain of the      *)
      (* application window specified does not have a help instance          *)
      (* associated with it.                                                 *)
      (***********************************************************************)
      CONST  HMERR_NO_HELP_INST_IN_CHAIN               = 000001005H;

      (***********************************************************************)
      (* HMERR_INVALID_HELP_INSTANCE_HDL - The handle specified to be a      *)
      (* help instance does not have the class name of a IPF                 *)
      (* help instance.                                                      *)
      (***********************************************************************)
      CONST  HMERR_INVALID_HELP_INSTANCE_HDL           = 000001006H;

      (***********************************************************************)
      (* HMERR_INVALID_QUERY_APP_WND - The application window specified on   *)
      (* a WinQueryHelpInstance() call is not a valid window handle.         *)
      (***********************************************************************)
      CONST  HMERR_INVALID_QUERY_APP_WND               = 000001007H;

      (***********************************************************************)
      (* HMERR_HELP_INST_CALLED_INVALID -  The handle of the help instance   *)
      (* specified on an API call to the IPF does not have the               *)
      (* class name of an IPF help instance.                                 *)
      (***********************************************************************)
      CONST  HMERR_HELP_INST_CALLED_INVALID            = 000001008H;

      CONST  HMERR_HELPTABLE_UNDEFINE                  = 000001009H;
      CONST  HMERR_HELP_INSTANCE_UNDEFINE              = 00000100aH;
      CONST  HMERR_HELPITEM_NOT_FOUND                  = 00000100bH;
      CONST  HMERR_INVALID_HELPSUBITEM_SIZE            = 00000100cH;
      CONST  HMERR_HELPSUBITEM_NOT_FOUND               = 00000100dH;

      (***********************************************************************)
      (* HMERR_INDEX_NOT_FOUND - No index in library file.                   *)
      (***********************************************************************)
      CONST  HMERR_INDEX_NOT_FOUND                     = 000002001H;

      (***********************************************************************)
      (* HMERR_CONTENT_NOT_FOUND - Library file does not have any contents.  *)
      (***********************************************************************)
      CONST  HMERR_CONTENT_NOT_FOUND                   = 000002002H;

      (***********************************************************************)
      (* HMERR_OPEN_LIB_FILE     - Cannot open library file                  *)
      (***********************************************************************)
      CONST  HMERR_OPEN_LIB_FILE                       = 000002003H;

      (***********************************************************************)
      (* HMERR_READ_LIB_FILE     - Cannot read library file                  *)
      (***********************************************************************)
      CONST  HMERR_READ_LIB_FILE                       = 000002004H;

      (***********************************************************************)
      (* HMERR_CLOSE_LIB_FILE    - Cannot close library file                 *)
      (***********************************************************************)
      CONST  HMERR_CLOSE_LIB_FILE                      = 000002005H;

      (***********************************************************************)
      (* HMERR_INVALID_LIB_FILE  - Improper library file provided            *)
      (***********************************************************************)
      CONST  HMERR_INVALID_LIB_FILE                    = 000002006H;

      (***********************************************************************)
      (* HMERR_NO_MEMORY - Unable to allocate the requested amount of memory.*)
      (***********************************************************************)
      CONST  HMERR_NO_MEMORY                           = 000002007H;

      (***********************************************************************)
      (* HMERR_ALLOCATE_SEGMENT - Unable                                     *)
      (* to allocate a segment of memory for memory allocation requested     *)
      (* from the IPF.                                                       *)
      (***********************************************************************)
      CONST  HMERR_ALLOCATE_SEGMENT                    = 000002008H;

      (***********************************************************************)
      (* HMERR_FREE_MEMORY - Unable to free allocated  memory                *)
      (***********************************************************************)
      CONST  HMERR_FREE_MEMORY                         = 000002009H;

      (***********************************************************************)
      (* HMERR_PANEL_NOT_FOUND  - Unable                                     *)
      (* to find a help panel requested to help manager                      *)
      (***********************************************************************)
      CONST  HMERR_PANEL_NOT_FOUND                     = 000002010H;

      (***********************************************************************)
      (* HMERR_DATABASE_NOT_OPEN - Unable to read the unopened database      *)
      (***********************************************************************)
      CONST  HMERR_DATABASE_NOT_OPEN                   = 000002011H;

      (***********************************************************************)
      (* HMERR_DDL_ERROR - Unable to load resource dll                       *)
      (***********************************************************************)
      CONST  HMERR_LOAD_DLL                             = 000002013H;

      (***********************************************************************)
      (* AC Viewport stucture definitions                                    *)
      (***********************************************************************)
      TYPE ACVP = RECORD       (* acvp *)
            cb:          ULONG;
            hAB:         HAB;
            hmq:         HMQ;
            ObjectID:    ULONG;            (* object identifier *)
            hWndParent:  HWND;             (* IPF viewport client handle *)
            hWndOwner:   HWND;             (* IPF viewport client handle *)
            hWndACVP:    HWND;             (* applications frame window hwnd *)
      END;
      TYPE PACVP = POINTER TO ACVP;

      (***********************************************************************)
      (* DDF defines and prototypes                                          *)
      (***********************************************************************)
   <* IF NOT DEFINED (PMDDF_H)  THEN *>
      <* NEW PMDDF_H + *>
   <* END *>

   <* IF DEFINED (INCL_DDF)  THEN *>
            (*********************************************************************)
            (* Define Handle to DDF                                              *)
            (*********************************************************************)
            TYPE HDDF = POINTER TO SYSTEM.void;

            (* DdfHyperText Flags *)
            CONST REFERENCE_BY_ID    = 0H;
            CONST REFERENCE_BY_RES   = 1H;

            (* DdfBeginList formatting flags *)
            CONST HMBT_NONE          = 1H;
            CONST HMBT_ALL           = 2H;
            CONST HMBT_FIT           = 3H;

            CONST HMLS_SINGLELINE    = 1H;
            CONST HMLS_DOUBLELINE    = 2H;

            (* DdfBitmap alignment flags *)
            CONST ART_RUNIN          = 010H;
            CONST ART_LEFT           = 001H;
            CONST ART_RIGHT          = 002H;
            CONST ART_CENTER         = 004H;

            (* DdfSetColor Color Flag *)
            CONST CLR_UNCHANGED      = -6H;

            (**********************************************************************)
            (* DDF API declarations.                                              *)
            (**********************************************************************)

            PROCEDURE [APIENTRY]  DdfInitialize (hwndHelpInstance:   HWND ;
                                                                        cbBuffer:        ULONG ;
                                                                        ulIncrement:     ULONG ): HDDF;

            PROCEDURE [APIENTRY]  DdfPara (hddf: HDDF ): BOOL;

            PROCEDURE [APIENTRY]  DdfSetFormat (hddf:        HDDF ;
                                                                      fFormatType:    ULONG ): BOOL;

            PROCEDURE [APIENTRY]  DdfSetTextAlign (hddf:     HDDF ;
                                                                            fAlign:      ULONG ): BOOL;

            PROCEDURE [APIENTRY]  DdfSetColor (hddf: HDDF ;
                                                                    fBackColor:     COLOR ;
                                                                    fForColor:      COLOR ): BOOL;

            PROCEDURE [APIENTRY]  DdfInform (hddf:   HDDF ;
                                                                pszText:   PCSZ;
                                                                resInformNumber: ULONG ): BOOL;

            PROCEDURE [APIENTRY]  DdfSetFontStyle (hddf:        HDDF ;
                                                                            fFontStyle: ULONG ): BOOL;

            PROCEDURE [APIENTRY]  DdfHyperText (hddf:        HDDF ;
                                                                      pszText:        PCSZ ;
                                                                      pszReference:   PCSZ ;
                                                                      fReferenceType: ULONG ): BOOL;

            PROCEDURE [APIENTRY]  DdfBeginList (hddf:       HDDF ;
                                                                      ulWidthDT:     ULONG ;
                                                                      fBreakType:    ULONG ;
                                                                      fSpacing:      ULONG ): BOOL;

            PROCEDURE [APIENTRY]  DdfListItem (hddf: HDDF ;
                                                                    pszTerm: PCSZ ;
                                                                    pszDescription: PCSZ ): BOOL;

            PROCEDURE [APIENTRY]  DdfEndList (hddf: HDDF ): BOOL;

            PROCEDURE [APIENTRY]  DdfMetafile (hddf:  HDDF ;
                                                                    hmf:      HMF ;
                                                                    prclRect: PRECTL ): BOOL;

            PROCEDURE [APIENTRY]  DdfText (hddf:     HDDF ;
                                                            pszText:     PCSZ ): BOOL;

            PROCEDURE [APIENTRY]  DdfSetFont (hddf:  HDDF ;
                                                                  pszFaceName: PCSZ;
                                                                  ulWidth:     ULONG ;
                                                                  ulHeight:    ULONG ): BOOL;

            PROCEDURE [APIENTRY]  DdfBitmap (hddf:   HDDF ;
                                                                hbm:    HBITMAP ;
                                                                fAlign: ULONG ): BOOL;

            (*********************************************************************)
            (* error codes returned by DDF API functions                         *)
            (*********************************************************************)
            CONST HMERR_DDF_MEMORY                 = 03001H;
            CONST HMERR_DDF_ALIGN_TYPE             = 03002H;
            CONST HMERR_DDF_BACKCOLOR              = 03003H;
            CONST HMERR_DDF_FORECOLOR              = 03004H;
            CONST HMERR_DDF_FONTSTYLE              = 03005H;
            CONST HMERR_DDF_REFTYPE                = 03006H;
            CONST HMERR_DDF_LIST_UNCLOSED          = 03007H;
            CONST HMERR_DDF_LIST_UNINITIALIZED     = 03008H;
            CONST HMERR_DDF_LIST_BREAKTYPE         = 03009H;
            CONST HMERR_DDF_LIST_SPACING           = 0300AH;
            CONST HMERR_DDF_HINSTANCE              = 0300BH;
            CONST HMERR_DDF_EXCEED_MAX_LENGTH      = 0300CH;
            CONST HMERR_DDF_EXCEED_MAX_INC         = 0300DH;
            CONST HMERR_DDF_INVALID_DDF            = 0300EH;
            CONST HMERR_DDF_FORMAT_TYPE            = 0300FH;
            CONST HMERR_DDF_INVALID_PARM           = 03010H;
            CONST HMERR_DDF_INVALID_FONT           = 03011H;
            CONST HMERR_DDF_SEVERE                 = 03012H;

   <* END *>
      (* XLATOFF *)



(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmhelp.hm ------------- *)
   <* END *>
<* END *>

(*Load/Delete Library/Procedure *)

TYPE HLIB  = HMODULE;
TYPE PHLIB = PHMODULE;

<* IF DEFINED (INCL_WINLOAD)  THEN *>
      PROCEDURE [APIENTRY] WinDeleteProcedure(hab:     HAB;
                                                                              wndproc: PFNWP): BOOL;
      PROCEDURE [APIENTRY] WinDeleteLibrary(hab:       HAB;
                                                                          libhandle: HLIB): BOOL;
      PROCEDURE [APIENTRY] WinLoadProcedure(hab:       HAB;
                                                                          libhandle: HLIB;
                                                                          procname:  PCSZ): PFNWP;
      PROCEDURE [APIENTRY] WinLoadLibrary(hab:     HAB;
                                                                      libname: PCSZ): HLIB;
<* END *>

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
   <* IF DEFINED (INCL_WINDESKTOP)  THEN *>

            (*** Desktop API definitions ***)

            TYPE DESKTOP = RECORD         (* dsk *)
                  cbSize:     ULONG;
                  hbm:        HBITMAP;
                  x:          LONG;
                  y:          LONG;
                  fl:         ULONG;
                  lTileCount: LONG;
                  szFile:     ARRAY [0..259] OF CHAR;
            END;
            TYPE PDESKTOP = POINTER TO DESKTOP;  (* pdsk *)

            PROCEDURE [APIENTRY] WinSetDesktopBkgnd(hwndDesktop: HWND;
                                                                                    pdskNew:     PDESKTOP): HBITMAP;
            PROCEDURE [APIENTRY] WinQueryDesktopBkgnd(hwndDesktop: HWND;
                                                                                        pdsk:        PDESKTOP): BOOL;

            CONST SDT_DESTROY         = 00001H;
            CONST SDT_NOBKGND         = 00002H;
            CONST SDT_TILE            = 00004H;
            CONST SDT_SCALE           = 00008H;
            CONST SDT_PATTERN         = 00010H;
            CONST SDT_CENTER          = 00020H;
            CONST SDT_RETAIN          = 00040H;
            CONST SDT_LOADFILE        = 00080H;

   <* END *>
<* END *>

<* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
   <* IF DEFINED (INCL_WINPALETTE)  THEN *>

            (*** Palette Manager API definitions ***)

            PROCEDURE [APIENTRY] WinRealizePalette(hwnd: HWND;
                                                                            hps:     HPS;
                                                                            pcclr:   PULONG): LONG;

   <* END *>
<* END *>

<* IF DEFINED (INCL_REMAPDLL)  THEN *>
      CONST STR_DLLNAME = "keyremap";
<* END *>

<* IF DEFINED (INCL_NLS)  THEN *>
      CONST WM_DBCSFIRST               = 000b0H;
      CONST WM_DBCSLAST                = 000cfH;

   
(* ------------- Include file: .\hm\os2nls.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: OS2NLS.H
*
* OS/2 Presentation Manager DBCS include file
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1992
*
* ===========================================================================
*
* The definitions in this file are for use on Double Byte Character Set
* (DBCS) versions of OS/2 only. They may not be used on SBCS versions.
*
* This is included from PMWIN.H when INCL_NLS symbol is defined
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)


      (* resource ID offset for bi-lingual system resources (menu & string) *)

      CONST RID_DBE_OFFSET         = 01000H;
      CONST STR_DBE_OFFSET         = 01000H;


      (* definition of Virtual key values for DBCS *)

      CONST VK_DBE_FIRST           = 080H; (* VK_DBCSFIRST *)
      CONST VK_DBE_LAST            = 0ffH; (* VK_DBCSLAST  *)

      CONST VK_DBE_IMEFIRST        = 0A0H; (* VK_DBE_FIRST + 020 *)
      CONST VK_DBE_IMELAST         = 0FFH; (* VK_DBE_LAST *)

      (* OEM keyboard support including PS/2 keyboard *)

      CONST VK_DBE_OEMFIRST        = 0C0H;
      CONST VK_DBE_OEMLAST         = 0CFH;

      (* for codepage 932 *)

      CONST VK_DBE_ALPHANUMERIC    = 080H; (* VK_DBE_FIRST + 000 *)
      CONST VK_DBE_KATAKANA        = 081H; (* VK_DBE_FIRST + 001 *)
      CONST VK_DBE_HIRAGANA        = 082H; (* VK_DBE_FIRST + 002 *)
      CONST VK_DBE_SBCSCHAR        = 083H; (* VK_DBE_FIRST + 003 *)
      CONST VK_DBE_DBCSCHAR        = 084H; (* VK_DBE_FIRST + 004 *)
      CONST VK_DBE_SBCSDBCSCHAR    = 085H; (* VK_DBE_FIRST + 005 *)
      CONST VK_DBE_ROMAN           = 086H; (* VK_DBE_FIRST + 006 *)

      (* for codepage 934 *)

      CONST VK_DBE_HANJA           = 087H; (* VK_DBE_FIRST + 007 *)
      CONST VK_DBE_HANGEUL         = 088H; (* VK_DBE_FIRST + 008 *)
      CONST VK_DBE_JAMO            = 089H; (* VK_DBE_FIRST + 009 *)

      (* for codepage 936 *)

      CONST VK_DBE_HANZI           = 08AH; (* VK_DBE_FIRST + 00A *)

      (* for codepage 938 *)

      CONST VK_DBE_TSANGJYE        = 08CH; (* VK_DBE_FIRST + 00C *)
      CONST VK_DBE_PHONETIC        = 08DH; (* VK_DBE_FIRST + 00D *)

      CONST VK_DBE_KANJI           = 0a0H; (* VK_DBE_IMEFIRST + 000 *)
      CONST VK_DBE_IMEACTIVATE     = 0a0H; (* VK_DBE_IMEFIRST + 000 *)
      CONST VK_DBE_CONV            = 0a1H; (* VK_DBE_IMEFIRST + 001 *)
      CONST VK_DBE_NOCONV          = 0a2H; (* VK_DBE_IMEFIRST + 002 *)
      CONST VK_DBE_TANGO           = 0a3H; (* VK_DBE_IMEFIRST + 003 *)
      CONST VK_DBE_WORDREGISTER    = 0a3H; (* VK_DBE_IMEFIRST + 003 *)
      CONST VK_DBE_IMEDIALOG       = 0a4H; (* VK_DBE_IMEFIRST + 004 *)
      CONST VK_DBE_IME_MBSELECTED  = 0a5H; (* VK_DBE_IMEFIRST + 005 *)
      CONST VK_DBE_IME_LBSELECTED  = 0a6H; (* VK_DBE_IMEFIRST + 006 *)
      CONST VK_DBE_CODEINPUT       = 0a7H; (* VK_DBE_IMEFIRST + 007 *)
      CONST VK_DBE_ALLCANDIDATE    = 0a8H; (* VK_DBE_IMEFIRST + 008 *)
      CONST VK_DBE_PREVCANDIDATE   = 0a9H; (* VK_DBE_IMEFIRST + 009 *)
      CONST VK_DBE_IMEDEACTIVATE   = 0aaH; (* VK_DBE_IMEFIRST + 00a *)
      CONST VK_DBE_IME_WORDREGISTED= 0abH; (* VK_DBE_IMEFIRST + 00b *)
      CONST VK_DBE_IMECONTROL      = 0acH; (* VK_DBE_IMEFIRST + 00c *)
      CONST VK_DBE_IME_FREEPS      = 0adH; (* VK_DBE_IMEFIRST + 00d *)
      CONST VK_DBE_IMEMODEEXIT     = 0aeH; (* VK_DBE_IMEFIRST + 00e *)

      (* Window Class definitoin for DBCS (migration) *)

      CONST WC_DBE_APPSTAT          = PSZ(0ffff0010H); (* WC_APPSTAT *)
      CONST WC_DBE_KBDSTAT          = PSZ(0ffff0011H); (* WC_KBDSTAT *)
      CONST WC_DBE_PECIC            = PSZ(0ffff0012H); (* WC_PECIC   *)

      (* Double byte character set messages *)

      CONST WM_DBE_SETAPPLSTAT     = 000b6H;
      CONST WM_DBE_KKCPARAMS       = 000bcH;

      (* DBCS unique statndsrd Frame Create Flag (migration) *)

      CONST FCF_DBE_STATAREA       = 080000000H; (* FCF_DBE_APPSTAT *)

      (* WM_SETWINDOWPARAM ctldata of DBCS status area *)

      TYPE KEYSTSDATA = RECORD          (* keysts *)
            wpmctlflag:        ULONG       ;
            textlength:        ULONG       ;
            pTextString:       PSZ         ;
            pAttrString:       PSZ         ;
            pRomanString:      PSZ         ;
      END;
      TYPE PKEYSTSDATA = POINTER TO KEYSTSDATA;

      TYPE WPMCTLPARAMS = RECORD       (* wpmctlprm - old definition *)
            wpmctlflag:       ULONG       ;
            textlength:       ULONG       ;
            pTextString:      PSZ         ;
            pAttrString:      PSZ         ;
      END;
      TYPE PWPMCTLPARAMS = POINTER TO WPMCTLPARAMS;

      (* wpmctlflag value definition *)

      CONST DBE_KSF_ALPHANUMERIC      = 00001H;
      CONST DBE_KSF_KATAKANA          = 00002H;
      CONST DBE_KSF_HIRAGANA          = 00004H;
      CONST DBE_KSF_CAPS              = 00008H;
      CONST DBE_KSF_ROMAN             = 00010H;
      CONST DBE_KSF_HANKAKU           = 00020H;
      CONST DBE_KSF_ZENKAKU           = 00040H;
      CONST DBE_KSF_SBCS              = DBE_KSF_HANKAKU;
      CONST DBE_KSF_DBCS              = DBE_KSF_ZENKAKU;
      CONST DBE_KSF_UPPER             = 00080H;
      CONST DBE_KSF_LOWER             = 00100H;
      CONST DBE_KSF_TEXT              = 00200H;
      CONST DBE_KSF_NOROMAN           = 00400H;
      CONST DBE_KSF_DISABLEONTHESPOT  = 00800H;
      CONST DBE_KSF_ROMANTEXT         = 01000H;

      (* For Code Page 934(Korea) wpmctlflag value definition  *)

      CONST DBE_KSF_JAMO              = 00002H;
      CONST DBE_KSF_HANGEUL           = 00004H;

      (* For Code Page 938(Taiwan) wpmctlflag value definition  *)

      CONST DBE_KSF_PHONETIC          = 00002H;
      CONST DBE_KSF_TSANGJYE          = 00004H;

      (* WM_SETWINDOWPARAM ctldata of Pecic control *)

      TYPE PECICDATA = RECORD       (* pecicdata *)
            wpmctlflag:    ULONG       ;
            textlength:    ULONG       ;
            pTextString:   PSZ         ;
            pAttrString:   PSZ         ;
            CursorPos:     ULONG       ;
            CursorAttr:    ULONG       ;
      END;
      TYPE PPECICDATA = POINTER TO PECICDATA;

      (* wndparams definition of WM_DBE_APPLSTAT *)

      CONST DBE_WPM_APPLSTAT_VISIBILITY  = 00004H;

      (* ctldata of DBE_WPM_APPLSTAT_VISIBLITY *)

      CONST DBE_AS_APPLTOP         = 00001H;
      CONST DBE_AS_KBDTOP          = 00002H;
      CONST DBE_AS_PECICTOP        = 00004H;
      CONST DBE_AS_APPLBOTTOM      = 00008H;

      (** WM_DBE_KKCPARAMS definition **)
      (* mp1(lpkkcparams) *)

      TYPE KKCPARAMS = RECORD       (* kkcparams *)
            lenKKCParams:  ULONG       ;
            fRequest:      ULONG       ;
            fKKCParams:    ULONG       ;
            pKKCData:      PVOID       ;
            Reserved:      ULONG       ;
      END;
      TYPE PKKCPARAMS = POINTER TO KKCPARAMS;

      (* fRequest *)
      CONST DBE_KKCPARAMS_SET          = 00001H;
      CONST DBE_KKCPARAMS_QUERY        = 00002H;

      (* fKKCParams *)
      CONST DBE_KKCPARAMS_PHYSICALATTRIBUTE = 00001H;
      CONST DBE_KKCPARAMS_PECICCURSORPOS    = 00002H;

      --#pragma pack(1) (* force structure alignment packing *)

      (* Level format for ColorLookUpTable *)
      TYPE LEVEL = RECORD  (* Level *)
            attri1: UCHAR;                         (** 1st Attribute         **)
            attri2: UCHAR;                         (** 2nd Attribute         **)
      END;
      TYPE PLEVEL = POINTER TO LEVEL;

      --#pragma pack()  (* restore packing to default *)

      (* Color Look Up Table format *)
      TYPE COLORLOOKUPTBL = RECORD  (* ColorLookUpTable *)
            nAttr:         ULONG;                          (** number of Attribute   **)
            PhysicalLevel: ARRAY [0..31] OF LEVEL;         (** struct of Levels      **)
      END;
      TYPE PCOLORLOOKUPTBL = POINTER TO COLORLOOKUPTBL;

      (** WinDBCSIMEControl() Definition & Prototype **)

      (* type *)
      CONST DBE_IMCTL_QUERY        = 00001H;
      CONST DBE_IMCTL_SET          = 00002H;

      TYPE IMEMODE = RECORD        (* imemode *)
            lenIMEMODE: ULONG  ;
            fIMEMode:   ULONG  ;
            hIME:       ULONG  ; (* query mode only valid *)
            hModIME:    ULONG  ; (* query mode only valid *)
      END;
      TYPE PIMEMODE = POINTER TO IMEMODE;

      (* definition of fIMEMode *)
      CONST DBE_IMCTL_IMEENABLE     = 00001H;
      CONST DBE_IMCTL_IMEDISABLE    = 00002H;
      CONST DBE_IMCTL_IMEMODE       = 00004H;
      CONST DBE_IMCTL_NOTIMEMODE    = 00008H;
      CONST DBE_IMCTL_INHERIT_PFRAME= 00100H;
      CONST DBE_IMCTL_INTERIMREQUEST= 08000H;

      PROCEDURE [APIENTRY] WinDBCSIMEControl( hab: HAB ;
                                                                        hwndFrame:  HWND ;
                                                                        ulType:     ULONG ;
                                                                        pIMEMode:   PIMEMODE ): ULONG;


      (** WinDBCSModeControl() Definition & Prototype **)

      (* WinDBCSModeControl parameters definitions *)
      (* type *)
      CONST DBE_MCTL_QUERY         = 00001H;
      CONST DBE_MCTL_SET           = 00002H;

      (* arg *)
      CONST DBE_MCTL_INPUTMODEREQUEST= 00001H;
      CONST DBE_MCTL_JAPANREQ      = 00001H;   (* migration *)

      (* parm - MCTL_JAPAN *)
      CONST DBE_MCTL_ALPHANUMERIC  = 00001H;
      CONST DBE_MCTL_KATAKANA      = 00002H;
      CONST DBE_MCTL_HIRAGANA      = 00004H;
      CONST DBE_MCTL_SBCSCHAR      = 00008H;
      CONST DBE_MCTL_DBCSCHAR      = 00010H;
      CONST DBE_MCTL_ROMAN         = 00020H;
      CONST DBE_MCTL_NOROMAN       = 00040H;

      CONST DBE_MCTL_KKCREQ        = 01000H;
      CONST DBE_MCTL_CP932REQ      = 00001H;
      CONST DBE_MCTL_KKCENABLE     = 01000H;
      CONST DBE_MCTL_KKCDISABLE    = 02000H;
      CONST DBE_MCTL_HANKAKU       = 00008H;
      CONST DBE_MCTL_ZENKAKU       = 00010H;

      (* parm - MCTL_KOREA *)
      CONST DBE_MCTL_JAMO          = 00002H;
      CONST DBE_MCTL_HANGEUL       = 00004H;
      CONST DBE_MCTL_INTERIMREQUEST= 00080H;

      (* parm - MCTL_TCHINESE *)
      CONST DBE_MCTL_PHONETIC      = 00002H;
      CONST DBE_MCTL_TSANGJYE      = 00004H;

      (* for MDI support *)
      CONST DBE_MCTL_INHERIT_PFRAME= 00100H;

      PROCEDURE [APIENTRY] WinDBCSModeControl(hab: HAB ;
                                                                          hwndFrame:    HWND ;
                                                                          ulType: ULONG ;
                                                                          ulArg:  ULONG ;
                                                                          pparm:  PULONG): ULONG;

      (* Font Driver Description structure  *)

      TYPE FD_DESC = RECORD   (* fd_desc *)
            flType:       ULONG  ;
            str64Desc:    ARRAY [0..63] OF CHAR;
      END;
      TYPE PFD_DESC = POINTER TO FD_DESC;

      (* Font Driver functions *)

      PROCEDURE [APIENTRY] WinDBCSLoadFontDriver(hab:      HAB ;
                                                                                    psz:      PCSZ): BOOL;

      PROCEDURE [APIENTRY] WinDBCSUnloadFontDriver(hab:    HAB ;
                                                                                        psz:    PCSZ): BOOL;

      PROCEDURE [APIENTRY] WinDBCSQueryFDDescription(hab:      HAB ;
                                                                                            psz:      PCSZ ;
                                                                                            pfd_desc: PFD_DESC): BOOL;

      (* fd_type definition *)

      CONST DBE_FD_DESC_SYSTEM     = 00001H;
      CONST DBE_FD_DESC_PUBLIC     = 00002H;
      CONST DBE_FD_DESC_PRIVATE    = 00004H;

      (* System menu item number ID in MENUITEM for DBCS unique function *)
      CONST SC_DBE_IME                = 08018H;
      CONST SC_DBE_IMESEPARATOR       = 08019H;

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\os2nls.hm ------------- *)
<* END *>


(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmwin.hm ------------- *)

(* ------------- Include file: .\hm\pmgpi.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMGPI.H
*
* OS/2 Presentation Manager GPI constants; types and function declarations
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1992
*
* ===========================================================================
*
* The folowing symbols are used in this file for conditional sections.
*
*   CONST:                To include:
*
*   INCL_GPI                Include all of the GPI
*   INCL_GPIBITMAPS         Bitmaps and Pel Operations
*   INCL_GPICONTROL         Basic PS control
*   INCL_GPICORRELATION     Picking; Boundary and Correlation
*   INCL_GPIDEFAULTS        Default Primitive Attributes
*   INCL_GPIERRORS          defined if INCL_ERRORS defined
*   INCL_GPILCIDS           Phyical and Logical Fonts with Lcids
*   INCL_GPILOGCOLORTABLE   Logical Color Tables
*   INCL_GPIMETAFILES       MetaFiles
*   INCL_GPIPATHS           Paths and Clipping with Paths
*   INCL_GPIPOLYGON         Polygons
*   INCL_GPIPRIMITIVES      Drawing Primitives and Primitive Attributes
*   INCL_GPIREGIONS         Regions and Clipping with Regions
*   INCL_GPISEGEDITING      Segment Editing via Elements
*   INCL_GPISEGMENTS        Segment Control and Drawing
*   INCL_GPITRANSFORMS      Transform and Transform Conversion
*
* There is a symbol used in this file called INCL_DDIDEFS. This is used to
* include only the definitions for the DDI. The programmer using the GPI
* can ignore this symbol
*
* There is a symbol used in this file called INCL_SAADEFS. This is used to
* include only the definitions for the SAA. The programmer using the GPI
* can ignore this symbol
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)


<* NEW GPI_INCLUDED + *>


<* IF DEFINED (INCL_GPI)  THEN *>
   <* NEW INCL_GPIBITMAPS + *>
   <* NEW INCL_GPICONTROL + *>
   <* NEW INCL_GPICORRELATION + *>
   <* NEW INCL_GPIDEFAULTS + *>
   <* NEW INCL_GPILCIDS + *>
   <* NEW INCL_GPILOGCOLORTABLE + *>
   <* NEW INCL_GPIMETAFILES + *>
   <* NEW INCL_GPIPATHS + *>
   <* NEW INCL_GPIPOLYGON + *>
   <* NEW INCL_GPIPRIMITIVES + *>
   <* NEW INCL_GPIREGIONS + *>
   <* NEW INCL_GPISEGEDITING + *>
   <* NEW INCL_GPISEGMENTS + *>
   <* NEW INCL_GPITRANSFORMS + *>
<* END *>


<* IF DEFINED (INCL_ERRORS)  THEN *>
   <* NEW INCL_GPIERRORS + *>
<* END *>


<* IF DEFINED (INCL_DDIDEFS)  THEN *>
   <* NEW INCL_GPIBITMAPS + *>
   <* NEW INCL_GPIERRORS + *>
   <* NEW INCL_GPILCIDS + *>
   <* NEW INCL_GPILOGCOLORTABLE + *>
   <* NEW INCL_GPIPATHS + *>
   <* NEW INCL_GPIPOLYGON + *>
   <* NEW INCL_GPIPRIMITIVES + *>
   <* NEW INCL_GPIREGIONS + *>
   <* NEW INCL_GPITRANSFORMS + *>
<* END *>


<* IF DEFINED (INCL_SAADEFS)  THEN *>
   <* NEW INCL_GPIBITMAPS + *>
   <* NEW INCL_GPICONTROL + *>
   <* NEW INCL_GPICORRELATION + *>
   <* NEW INCL_GPIERRORS + *>
   <* NEW INCL_GPILCIDS + *>
   <* NEW INCL_GPILOGCOLORTABLE + *>
   <* NEW INCL_GPIMETAFILES + *>
   <* NEW INCL_GPIPATHS + *>
   <* NEW INCL_GPIPOLYGON + *>
   <* NEW INCL_GPIPRIMITIVES + *>
   <* NEW INCL_GPIREGIONS + *>
   <* NEW INCL_GPISEGEDITING + *>
   <* NEW INCL_GPISEGMENTS + *>
   <* NEW INCL_GPITRANSFORMS + *>
<* END *>

(* General GPI return values *)
CONST GPI_ERROR                   =    0;
CONST GPI_OK                      =    1;
CONST GPI_ALTERROR                =  (-1);

(* fixed point number - implicit binary point between 2 and 3 hex digits *)
TYPE  FIXED  = LONG;    (* fx *)
TYPE  PFIXED = POINTER TO FIXED;

(* fixed point number - implicit binary point between 1st and 2nd hex digits *)
TYPE  FIXED88 = USHORT;  (* fx88 *)

(* fixed point signed number - implicit binary point between bits 14 and 13. *)
(*                             Bit 15 is the sign bit.                       *)
(*                             Thus 1.0 is represented by 16384 (= 04000)     *)
(*                             and -1.0 is represented by -16384 (= 0c000)    *)
TYPE  FIXED114 = USHORT; (* fx114 *)

(* make FIXED number from SHORT integer part and USHORT fractional part *)
--CONST MAKEFIXED(intpart;fractpart) MAKELONG(fractpart;intpart)
(* extract fractional part from a fixed quantity *)
--CONST FIXEDFRAC(fx)                (LOUSHORT(fx))
(* extract integer part from a fixed quantity *)
--CONST FIXEDINT(fx)                 ((SHORT)HIUSHORT(fx))

(* structure for size parameters e.g. for GpiCreatePS *)
TYPE SIZEL = RECORD           (* sizl *)
      cx:  LONG;
      cy:  LONG;
END;
TYPE PSIZEL = POINTER TO SIZEL;

(* return code on GpiQueryLogColorTable;GpiQueryRealColors and GpiQueryPel *)
CONST CLR_NOINDEX                =  (-254);

<* IF DEFINED (INCL_GPICONTROL) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>

      (* units for GpiCreatePS and others *)
      CONST PU_ARBITRARY               = 00004H;
      CONST PU_PELS                    = 00008H;
      CONST PU_LOMETRIC                = 0000CH;
      CONST PU_HIMETRIC                = 00010H;
      CONST PU_LOENGLISH               = 00014H;
      CONST PU_HIENGLISH               = 00018H;
      CONST PU_TWIPS                   = 0001CH;

      (* format for GpiCreatePS *)
      CONST GPIF_DEFAULT               =   0H;
      CONST GPIF_SHORT                 = 00100H;
      CONST GPIF_LONG                  = 00200H;


      (* PS type for GpiCreatePS *)
      CONST GPIT_NORMAL                  = 0;
      CONST GPIT_MICRO                 = 01000H;


      (* implicit associate flag for GpiCreatePS *)
      CONST GPIA_NOASSOC                 = 0;
      CONST GPIA_ASSOC                 = 04000H;

      (* PS Fill type for GpiCreatePS defect: 61035 RickT Add exclusive fill *)
      CONST GPIM_AREAEXCL              = 08000H;


   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            (* return error for GpiQueryDevice *)
            CONST HDC_ERROR               = HDC(LONG(-1));
   <* END *>

      (* common GPICONTROL functions *)

      PROCEDURE [APIENTRY] GpiCreatePS(hab:     HAB;
                                                            hdc:       HDC;
                                                            psizlSize: PSIZEL;
                                                            flOptions: ULONG ): HPS;

      PROCEDURE [APIENTRY] GpiDestroyPS(hps: HPS ): BOOL;

      PROCEDURE [APIENTRY] GpiAssociate(hps: HPS;
                                                              hdc:   HDC ): BOOL;

      PROCEDURE [APIENTRY] GpiRestorePS(hps: HPS;
                                                              lPSid: LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiSavePS(hps: HPS ): LONG;

      PROCEDURE [APIENTRY] GpiErase(hps: HPS ): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            PROCEDURE [APIENTRY] GpiQueryDevice(hps: HPS): HDC;
   <* END *>

<* END *>
<* IF DEFINED (INCL_GPICONTROL)  THEN *>

      (* options for GpiResetPS *)
      CONST GRES_ATTRS                 = 00001H;
      CONST GRES_SEGMENTS              = 00002H;
      CONST GRES_ALL                   = 00004H;

      (* option masks for PS options used by GpiQueryPs *)
      CONST PS_UNITS                   = 000FCH;
      CONST PS_FORMAT                  = 00F00H;
      CONST PS_TYPE                    = 01000H;
      CONST PS_MODE                    = 02000H;
      CONST PS_ASSOCIATE               = 04000H;
      CONST PS_NORESET                 = 08000H;


      (* error context returned by GpiErrorSegmentData *)
      CONST GPIE_SEGMENT                 = 0;
      CONST GPIE_ELEMENT                 = 1;
      CONST GPIE_DATA                    = 2;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            (* control parameter for GpiSetDrawControl *)
            CONST DCTL_ERASE                    =  1;
            CONST DCTL_DISPLAY                  =  2;
            CONST DCTL_BOUNDARY                 =  3;
            CONST DCTL_DYNAMIC                  =  4;
            CONST DCTL_CORRELATE                =  5;

            (* constants for GpiSet/QueryDrawControl *)
            CONST DCTL_ERROR                    = -1;
            CONST DCTL_OFF                      =  0;
            CONST DCTL_ON                       =  1;

            (* constants for GpiSet/QueryStopDraw *)
            CONST SDW_ERROR                    =-1;
            CONST SDW_OFF                      = 0;
            CONST SDW_ON                       = 1;

   <* END *>

      (* drawing for GpiSet/QueryDrawingMode *)
      CONST DM_ERROR                       = 0;
      CONST DM_DRAW                        = 1;
      CONST DM_RETAIN                      = 2;
      CONST DM_DRAWANDRETAIN               = 3;

      (*** other GPICONTROL functions *)

      PROCEDURE [APIENTRY] GpiResetPS(hps:     HPS;
                                                          flOptions: ULONG ): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


            PROCEDURE [APIENTRY] GpiSetPS(hps:     HPS;
                                                            psizlsize: PSIZEL;
                                                            flOptions: ULONG ): BOOL;

   <* END *>


      PROCEDURE [APIENTRY] GpiQueryPS(hps: HPS;
                                                            psizlSize: PSIZEL ): ULONG;

      PROCEDURE [APIENTRY] GpiErrorSegmentData(hps:      HPS;
                                                                              plSegment: PLONG;
                                                                              plContext: PLONG ): LONG;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


            PROCEDURE [APIENTRY] GpiQueryDrawControl(hps:    HPS;
                                                                                  lControl: LONG ): LONG;

            PROCEDURE [APIENTRY] GpiSetDrawControl(hps:     HPS;
                                                                              lControl:  LONG;
                                                                              lValue:    LONG ): BOOL;

   <* END *>


      PROCEDURE [APIENTRY] GpiQueryDrawingMode(hps: HPS ): LONG;

      PROCEDURE [APIENTRY] GpiSetDrawingMode(hps:  HPS;
                                                                        lMode:  LONG ): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


            PROCEDURE [APIENTRY] GpiQueryStopDraw(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetStopDraw(hps:  HPS;
                                                                        lValue: LONG ): BOOL;

   <* END *>

<* END *>
<* IF DEFINED (INCL_GPICORRELATION)  THEN *>

      (* options for GpiSetPickApertureSize *)
      CONST PICKAP_DEFAULT               = 0;
      CONST PICKAP_REC                   = 2;

      (* type of correlation for GpiCorrelateChain *)
      CONST PICKSEL_VISIBLE              = 0;
      CONST PICKSEL_ALL                  = 1;

      (* return code to indicate correlate hit(s) *)
      CONST GPI_HITS                     =  2;

      (*** picking;  correlation and boundary functions *)

      PROCEDURE [APIENTRY] GpiCorrelateChain(hps:     HPS;
                                                                        lType:     LONG;
                                                                        pptlPick:  PPOINTL;
                                                                        lMaxHits:  LONG;
                                                                        lMaxDepth: LONG;
                                                                        pl2:       PLONG ): LONG;

      PROCEDURE [APIENTRY] GpiQueryTag(hps: HPS;
                                                            plTag: PLONG ): BOOL;

      PROCEDURE [APIENTRY] GpiSetTag(hps: HPS;
                                                        lTag:  LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQueryPickApertureSize(hps:     HPS;
                                                                                      psizlSize: PSIZEL ): BOOL;

      PROCEDURE [APIENTRY] GpiSetPickApertureSize(hps:     HPS;
                                                                                  lOptions:  LONG;
                                                                                  psizlSize: PSIZEL ): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            PROCEDURE [APIENTRY] GpiQueryPickAperturePosition(hps:     HPS;
                                                                                                    pptlPoint: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiSetPickAperturePosition(hps:    HPS;
                                                                                                pptlPick: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryBoundaryData(hps:        HPS;
                                                                                    prclBoundary: PRECTL ): BOOL;

            PROCEDURE [APIENTRY] GpiResetBoundaryData(hps: HPS ): BOOL;

   <* END *>


      PROCEDURE [APIENTRY] GpiCorrelateFrom(hps:     HPS;
                                                                    lFirstSegment:   LONG;
                                                                    lLastSegment:    LONG;
                                                                    lType:      LONG;
                                                                    pptlPick:   PPOINTL;
                                                                    lMaxHits:   LONG;
                                                                    lMaxDepth:  LONG;
                                                                    plSegTag:   PLONG ): LONG;

      PROCEDURE [APIENTRY] GpiCorrelateSegment(hps:    HPS;
                                                                          lSegment:  LONG;
                                                                          lType:     LONG;
                                                                          pptlPick:  PPOINTL;
                                                                          lMaxHits:  LONG;
                                                                          lMaxDepth: LONG;
                                                                          alSegTag:  PLONG ): LONG;

<* END *>
<* IF DEFINED (INCL_GPISEGMENTS)  THEN *>

      (* data formats for GpiPutData and GpiGetData *)
      CONST DFORM_NOCONV                 = 0;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            CONST DFORM_S370SHORT              =  1;
            CONST DFORM_PCSHORT                =  2;
            CONST DFORM_PCLONG                 =  4;

   <* END *>

      (* segment attributes used by GpiSet/QuerySegmentAttrs and others *)
      CONST ATTR_ERROR                  = (-1);
      CONST ATTR_DETECTABLE             =   1;
      CONST ATTR_VISIBLE                =   2;
      CONST ATTR_CHAINED                =   6;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            CONST ATTR_DYNAMIC                  = 8;

   <* END *>

      CONST ATTR_FASTCHAIN               =  9;
      CONST ATTR_PROP_DETECTABLE         = 10;
      CONST ATTR_PROP_VISIBLE            = 11;

      (* attribute on/off values *)
      CONST ATTR_OFF                     = 0;
      CONST ATTR_ON                      = 1;

      (* segment priority used by GpiSetSegmentPriority and others *)
      CONST LOWER_PRI                   = (-1);
      CONST HIGHER_PRI                  =   1;

      (*** segment control functions *)

      PROCEDURE [APIENTRY] GpiOpenSegment(hps:   HPS;
                                                                lSegment: LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiCloseSegment(hps: HPS ): BOOL;

      PROCEDURE [APIENTRY] GpiDeleteSegment(hps: HPS;
                                                                    lSegid: LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQueryInitialSegmentAttrs(hps:     HPS;
                                                                                          lAttribute: LONG ): LONG;

      PROCEDURE [APIENTRY] GpiSetInitialSegmentAttrs(hps:     HPS;
                                                                                      lAttribute: LONG;
                                                                                      lValue:     LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQuerySegmentAttrs(hps:     HPS;
                                                                            lSegid:     LONG;
                                                                            lAttribute: LONG ): LONG;

      PROCEDURE [APIENTRY] GpiSetSegmentAttrs(hps:      HPS;
                                                                        lSegid:      LONG;
                                                                        lAttribute:  LONG;
                                                                        lValue:      LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQuerySegmentPriority(hps:    HPS;
                                                                                  lRefSegid: LONG;
                                                                                  lOrder:    LONG ): LONG;

      PROCEDURE [APIENTRY] GpiSetSegmentPriority(hps:    HPS;
                                                                              lSegid:    LONG;
                                                                              lRefSegid: LONG;
                                                                              lOrder:    LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiDeleteSegments(hps:        HPS;
                                                                      lFirstSegment: LONG;
                                                                      lLastSegment:  LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQuerySegmentNames(hps:      HPS;
                                                                            lFirstSegid: LONG;
                                                                            lLastSegid:  LONG;
                                                                            lMax:        LONG;
                                                                            alSegids:    PLONG ): LONG;

      (*** draw functions for segments *)
      PROCEDURE [APIENTRY] GpiGetData(hps:   HPS;
                                                        lSegid:   LONG;
                                                        plOffset: PLONG;
                                                        lFormat:  LONG;
                                                        lLength:  LONG;
                                                        pbData:   PBYTE ): LONG;

      PROCEDURE [APIENTRY] GpiPutData(hps:  HPS;
                                                        lFormat: LONG;
                                                        plCount: PLONG;
                                                        pbData:  PBYTE ): LONG;

      PROCEDURE [APIENTRY] GpiDrawChain(hps: HPS ): BOOL;

      PROCEDURE [APIENTRY] GpiDrawFrom(hps:        HPS;
                                                          lFirstSegment: LONG;
                                                          lLastSegment:  LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiDrawSegment(hps:    HPS;
                                                                lSegment:  LONG ): BOOL;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


            PROCEDURE [APIENTRY] GpiDrawDynamics(hps: HPS ): BOOL;

            PROCEDURE [APIENTRY] GpiRemoveDynamics(hps:      HPS;
                                                                            lFirstSegid: LONG;
                                                                            lLastSegid:  LONG ): BOOL;

   <* END *>

<* END *>
<* IF DEFINED (INCL_GPISEGEDITING)  THEN *>

      (* edit modes used by GpiSet/QueryEditMode *)
      CONST SEGEM_ERROR                      = 0;
      CONST SEGEM_INSERT                     = 1;
      CONST SEGEM_REPLACE                    = 2;

      (*** segment editing by element functions *)

      PROCEDURE [APIENTRY] GpiBeginElement(hps:   HPS;
                                                                    lType:   LONG;
                                                                    pszDesc: PCSZ ): BOOL;

      PROCEDURE [APIENTRY] GpiEndElement(hps: HPS ): BOOL;

      PROCEDURE [APIENTRY] GpiLabel(hps:   HPS;
                                                      lLabel:  LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiElement(hps:   HPS;
                                                          lType:   LONG;
                                                          pszDesc: PCSZ;
                                                          lLength: LONG;
                                                          pbData:  PBYTE ): LONG;

      PROCEDURE [APIENTRY] GpiQueryElement(hps:      HPS;
                                                                    lOff:       LONG;
                                                                    lMaxLength: LONG;
                                                                    pbData:     PBYTE ): LONG;

      PROCEDURE [APIENTRY] GpiDeleteElement(hps: HPS ): BOOL;

      PROCEDURE [APIENTRY] GpiDeleteElementRange(hps:         HPS;
                                                                                lFirstElement: LONG;
                                                                                lLastElement:  LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiDeleteElementsBetweenLabels(hps:        HPS;
                                                                                                  lFirstLabel:  LONG;
                                                                                                  lLastLabel:   LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQueryEditMode(hps: HPS ): LONG;

      PROCEDURE [APIENTRY] GpiSetEditMode(hps: HPS;
                                                                  lMode: LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQueryElementPointer(hps: HPS ): LONG;

      PROCEDURE [APIENTRY] GpiSetElementPointer(hps:    HPS;
                                                                              lElement: LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiOffsetElementPointer(hps:   HPS;
                                                                                    loffset: LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQueryElementType(hps:   HPS;
                                                                            plType:  PLONG;
                                                                            lLength: LONG;
                                                                            pszData: PCSZ ): LONG;

      PROCEDURE [APIENTRY] GpiSetElementPointerAtLabel(hps:  HPS;
                                                                                            lLabel: LONG ): BOOL;

<* END *>
<* IF DEFINED (INCL_GPITRANSFORMS)  THEN *>

      (* co-ordinates space for GpiConvert *)
      CONST CVTC_WORLD                    = 1;
      CONST CVTC_MODEL                    = 2;
      CONST CVTC_DEFAULTPAGE              = 3;
      CONST CVTC_PAGE                     = 4;
      CONST CVTC_DEVICE                   = 5;

      (* type of transformation for GpiSetSegmentTransformMatrix *)
      CONST TRANSFORM_REPLACE            = 0;
      CONST TRANSFORM_ADD                = 1;
      CONST TRANSFORM_PREEMPT            = 2;

      (* transform matrix *)
      TYPE MATRIXLF = RECORD       (* matlf *)
            fxM11: FIXED;
            fxM12: FIXED;
            lM13:  LONG;
            fxM21: FIXED;
            fxM22: FIXED;
            lM23:  LONG;
            lM31:  LONG;
            lM32:  LONG;
            lM33:  LONG;
      END;
      TYPE PMATRIXLF = POINTER TO MATRIXLF;

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>


            (*** transform and transform conversion functions *)
            PROCEDURE [APIENTRY] GpiQuerySegmentTransformMatrix(hps:    HPS;
                                                                                                        lSegid:   LONG;
                                                                                                        lCount:   LONG;
                                                                                                        pmatlfArray: PMATRIXLF ): BOOL;

            PROCEDURE [APIENTRY] GpiSetSegmentTransformMatrix(hps:    HPS;
                                                                                                    lSegid:   LONG;
                                                                                                    lCount:   LONG;
                                                                                                    pmatlfarray: PMATRIXLF;
                                                                                                    lOptions: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiConvert(hps:  HPS;
                                                                lSrc:   LONG;
                                                                lTarg:  LONG;
                                                                lCount: LONG;
                                                                aptlPoints: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiConvertWithMatrix(hps:       HPS;
                                                                                    lCountp:     LONG;
                                                                                    aptlPoints:  PPOINTL;
                                                                                    lCount:      LONG;
                                                                                    pmatlfArray: PMATRIXLF ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryModelTransformMatrix(hps:   HPS;
                                                                                                    lCount:  LONG;
                                                                                                    pmatlfArray: PMATRIXLF ): BOOL;

            PROCEDURE [APIENTRY] GpiSetModelTransformMatrix(hps:       HPS;
                                                                                                lCount:      LONG;
                                                                                                pmatlfArray: PMATRIXLF;
                                                                                                lOptions:    LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiCallSegmentMatrix(hps:       HPS;
                                                                                    lSegment:    LONG;
                                                                                    lCount:      LONG;
                                                                                    pmatlfArray: PMATRIXLF;
                                                                                    lOptions:    LONG ): LONG;

            PROCEDURE [APIENTRY] GpiQueryDefaultViewMatrix(hps:       HPS;
                                                                                              lCount:      LONG;
                                                                                              pmatlfArray: PMATRIXLF ): BOOL;

            PROCEDURE [APIENTRY] GpiSetDefaultViewMatrix(hps:       HPS;
                                                                                          lCount:      LONG;
                                                                                          pmatlfarray: PMATRIXLF;
                                                                                          lOptions:    LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryPageViewport(hps:        HPS;
                                                                                    prclViewport: PRECTL ): BOOL;

            PROCEDURE [APIENTRY] GpiSetPageViewport(hps:        HPS;
                                                                                prclViewport: PRECTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryViewingTransformMatrix(hps:       HPS;
                                                                                                        lCount:      LONG;
                                                                                                        pmatlfArray: PMATRIXLF ): BOOL;

            PROCEDURE [APIENTRY] GpiSetViewingTransformMatrix(hps:       HPS;
                                                                                                    lCount:      LONG;
                                                                                                    pmatlfArray: PMATRIXLF;
                                                                                                    lOptions:    LONG ): BOOL;

            (*** transform helper routines *)
            PROCEDURE [APIENTRY] GpiTranslate(hps: HPS;
                                                                  pmatlf: PMATRIXLF;
                                                                  l:      LONG;
                                                                  ppl:    PPOINTL): BOOL;

            PROCEDURE [APIENTRY] GpiScale(hps: HPS;
                                                          pmatlf: PMATRIXLF;
                                                          l:      LONG;
                                                          pfix:   PFIXED;
                                                          ppl:    PPOINTL): BOOL;

            PROCEDURE [APIENTRY] GpiRotate(hps: HPS;
                                                            pmatlf:  PMATRIXLF;
                                                            l:       LONG;
                                                            fix:     FIXED;
                                                            ppl:     PPOINTL): BOOL;

            (*** general clipping functions *)
            PROCEDURE [APIENTRY] GpiSetGraphicsField(hps:    HPS;
                                                                                prclField: PRECTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryGraphicsField(hps:    HPS;
                                                                                    prclField: PRECTL ): BOOL;

            PROCEDURE [APIENTRY] GpiSetViewingLimits(hps:     HPS;
                                                                                prclLimits: PRECTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryViewingLimits(hps:     HPS;
                                                                                    prclLimits: PRECTL ): BOOL;

   <* END *>

<* END *>
<* IF DEFINED (INCL_GPIPATHS)  THEN *>

      (* modes for GpiModifyPath *)
      CONST MPATH_STROKE                 =  6;

      (* modes for GpiFillPath *)
      CONST FPATH_ALTERNATE              = 0;
      CONST FPATH_WINDING                = 2;
      CONST FPATH_INCL                   = 0;
      CONST FPATH_EXCL                   = 8;

      (* modes for GpiSetClipPath *)
      CONST SCP_ALTERNATE                 = 0;
      CONST SCP_WINDING                   = 2;
      CONST SCP_AND                       = 4;
      CONST SCP_RESET                     = 0;
      CONST SCP_INCL                      = 0;
      CONST SCP_EXCL                      = 8;

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>

            (*** Path and Clip Path functions *)

            PROCEDURE [APIENTRY] GpiBeginPath(hps: HPS;
                                                                    lPath: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiEndPath(hps: HPS): BOOL;

            PROCEDURE [APIENTRY] GpiCloseFigure(hps: HPS ): BOOL;

            PROCEDURE [APIENTRY] GpiModifyPath(hps: HPS;
                                                                      lPath: LONG;
                                                                      lMode: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiFillPath(hps:    HPS;
                                                                  lPath:    LONG;
                                                                  lOptions: LONG ): LONG;

            PROCEDURE [APIENTRY] GpiSetClipPath(hps: HPS;
                                                                        lPath: LONG;
                                                                        lOptions: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiOutlinePath(hps: HPS;
                                                                        lPath: LONG;
                                                                        lOptions: LONG ): LONG;

            PROCEDURE [APIENTRY] GpiPathToRegion(GpiH:   HPS;
                                                                          lPath:    LONG;
                                                                          lOptions: LONG ): HRGN;

      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


                  PROCEDURE [APIENTRY] GpiStrokePath(hps:     HPS;
                                                                            lPath:     LONG;
                                                                            flOptions: ULONG ): LONG;

      <* END *>

   <* END *>

<* END *>
<* IF DEFINED (INCL_GPILOGCOLORTABLE)  THEN *>

   <* IF NOT DEFINED (INCL_GPIBITMAPS)  THEN *>
      <* NEW INCL_GPIBITMAPS + *>
   <* END *>

      (* options for GpiCreateLogColorTable and others *)
      CONST LCOL_RESET                   = 00001H;
      CONST LCOL_REALIZABLE              = 00002H;
      CONST LCOL_PURECOLOR               = 00004H;
      CONST LCOL_OVERRIDE_DEFAULT_COLORS = 00008H;
      CONST LCOL_REALIZED                = 00010H;

      (* format of logical lColor table for GpiCreateLogColorTable and others *)
      CONST LCOLF_DEFAULT                = 0;
      CONST LCOLF_INDRGB                 = 1;
      CONST LCOLF_CONSECRGB              = 2;
      CONST LCOLF_RGB                    = 3;
      CONST LCOLF_PALETTE                = 4;

      (* options for GpiQueryRealColors and others *)
      CONST LCOLOPT_REALIZED           = 00001H;
      CONST LCOLOPT_INDEX              = 00002H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            (* return codes from GpiQueryLogColorTable to indicate it is in RGB mode *)
            CONST QLCT_ERROR                  = (-1);
            CONST QLCT_RGB                    = (-2);

            (* GpiQueryLogColorTable index returned for colors not explicitly loaded *)
            CONST QLCT_NOTLOADED              = (-1);

   <* END *>

      (* return codes for GpiQueryColorData *)
      CONST QCD_LCT_FORMAT               = 0;
      CONST QCD_LCT_LOINDEX              = 1;
      CONST QCD_LCT_HIINDEX              = 2;
      CONST QCD_LCT_OPTIONS              = 3;

      (* Palette manager return values *)
      CONST PAL_ERROR                    =(-1);

      (* color flags for GpiCreatePalette and others *)
      CONST PC_RESERVED                   = 001H;
      CONST PC_EXPLICIT                   = 002H;
      CONST PC_NOCOLLAPSE                 = 004H;

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>

            (*** logical lColor table functions *)

            PROCEDURE [APIENTRY] GpiCreateLogColorTable(hps:   HPS;
                                                                                        flOptions: ULONG;
                                                                                        lFormat: LONG;
                                                                                        lStart:  LONG;
                                                                                        lCount:  LONG;
                                                                                        alTable: PLONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryColorData(hps:   HPS;
                                                                              lCount:  LONG;
                                                                              alArray: PLONG ): BOOL;

      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


                  PROCEDURE [APIENTRY] GpiQueryLogColorTable(hps:      HPS;
                                                                                            flOptions:  ULONG;
                                                                                            lStart:     LONG;
                                                                                            lCount:     LONG;
                                                                                            alArray:    PLONG ): LONG;

      <* END *>


            PROCEDURE [APIENTRY] GpiQueryRealColors(hps:     HPS;
                                                                                flOptions: ULONG;
                                                                                lStart:    LONG;
                                                                                lCount:    LONG;
                                                                                alColors:  PLONG ): LONG;

            PROCEDURE [APIENTRY] GpiQueryNearestColor(hps:      HPS;
                                                                                    flOptions:  ULONG;
                                                                                    lRgbIn:     LONG ):  LONG;

            PROCEDURE [APIENTRY] GpiQueryColorIndex(hps:     HPS;
                                                                                flOptions: ULONG;
                                                                                lRgbColor: LONG ): LONG;

            PROCEDURE [APIENTRY] GpiQueryRGBColor(hps:       HPS;
                                                                            flOptions:   ULONG;
                                                                            lColorIndex: LONG ): LONG;

      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

                  (*Palette manager functions *)

                  PROCEDURE [APIENTRY] GpiCreatePalette(hab:    HAB;
                                                                                flOptions: ULONG;
                                                                                ulFormat:  ULONG;
                                                                                ulCount:   ULONG;
                                                                                aulTable:  PULONG ): HPAL;

                  PROCEDURE [APIENTRY] GpiDeletePalette(hpal: HPAL ): BOOL;

                  PROCEDURE [APIENTRY] GpiSelectPalette(hps: HPS;
                                                                                hpal:   HPAL ): HPAL;

                  PROCEDURE [APIENTRY] GpiAnimatePalette(hpal:   HPAL;
                                                                                  ulFormat:  ULONG;
                                                                                  ulStart:   ULONG;
                                                                                  ulCount:   ULONG;
                                                                                  aulTable:  PULONG ): LONG;

                  PROCEDURE [APIENTRY] GpiSetPaletteEntries(hpal:  HPAL;
                                                                                        ulFormat: ULONG;
                                                                                        ulStart:  ULONG;
                                                                                        ulCount:  ULONG;
                                                                                        aulTable: PULONG ): BOOL;

                  PROCEDURE [APIENTRY] GpiQueryPalette(hps: HPS ): HPAL;

                  PROCEDURE [APIENTRY] GpiQueryPaletteInfo(hpal:   HPAL;
                                                                                      hps:       HPS;
                                                                                      flOptions: ULONG;
                                                                                      ulStart:   ULONG;
                                                                                      ulCount:   ULONG;
                                                                                      aulArray:  PULONG ): LONG;

      <* END *>

   <* END *>

<* END *>
<* IF (DEFINED (INCL_GPIPRIMITIVES) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>

      (* default color table indices *)

      CONST CLR_FALSE                =    (-5);
      CONST CLR_TRUE                 =    (-4);

      CONST CLR_ERROR                =  (-255);
      CONST CLR_DEFAULT              =    (-3);
      CONST CLR_WHITE                =    (-2);
      CONST CLR_BLACK                =    (-1);
      CONST CLR_BACKGROUND           =      0;
      CONST CLR_BLUE                 =      1;
      CONST CLR_RED                  =      2;
      CONST CLR_PINK                 =      3;
      CONST CLR_GREEN                =      4;
      CONST CLR_CYAN                 =      5;
      CONST CLR_YELLOW               =      6;
      CONST CLR_NEUTRAL              =      7;

      CONST CLR_DARKGRAY             =      8;
      CONST CLR_DARKBLUE             =      9;
      CONST CLR_DARKRED              =     10;
      CONST CLR_DARKPINK             =     11;
      CONST CLR_DARKGREEN            =     12;
      CONST CLR_DARKCYAN             =     13;
      CONST CLR_BROWN                =     14;
      CONST CLR_PALEGRAY             =     15;

      (* rgb colors *)
      CONST RGB_ERROR                =  (-255);
      CONST RGB_BLACK              = 000000000H;
      CONST RGB_BLUE               = 0000000FFH;
      CONST RGB_GREEN              = 00000FF00H;
      CONST RGB_CYAN               = 00000FFFFH;
      CONST RGB_RED                = 000FF0000H;
      CONST RGB_PINK               = 000FF00FFH;
      CONST RGB_YELLOW             = 000FFFF00H;
      CONST RGB_WHITE              = 000FFFFFFH;

      (* control flags used by GpiBeginArea *)
      CONST BA_NOBOUNDARY                =  0;
      CONST BA_BOUNDARY                = 00001H;


      CONST BA_ALTERNATE                 =  0;
      CONST BA_WINDING                 = 00002H;

      CONST BA_INCL                      =  0;
      CONST BA_EXCL                      =  8;


      (* fill options for GpiBox/GpiFullArc *)
      CONST DRO_FILL                      = 1;
      CONST DRO_OUTLINE                   = 2;
      CONST DRO_OUTLINEFILL               = 3;

      (* basic pattern symbols *)
      CONST PATSYM_ERROR                 =(-1);
      CONST PATSYM_DEFAULT               =  0;
      CONST PATSYM_DENSE1                =  1;
      CONST PATSYM_DENSE2                =  2;
      CONST PATSYM_DENSE3                =  3;
      CONST PATSYM_DENSE4                =  4;
      CONST PATSYM_DENSE5                =  5;
      CONST PATSYM_DENSE6                =  6;
      CONST PATSYM_DENSE7                =  7;
      CONST PATSYM_DENSE8                =  8;
      CONST PATSYM_VERT                  =  9;
      CONST PATSYM_HORIZ                 = 10;
      CONST PATSYM_DIAG1                 = 11;
      CONST PATSYM_DIAG2                 = 12;
      CONST PATSYM_DIAG3                 = 13;
      CONST PATSYM_DIAG4                 = 14;
      CONST PATSYM_NOSHADE               = 15;
      CONST PATSYM_SOLID                 = 16;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST PATSYM_HALFTONE            =   17;
   <* END *>
      CONST PATSYM_HATCH                 = 18;
      CONST PATSYM_DIAGHATCH             = 19;
      CONST PATSYM_BLANK                 = 64;

      (* lcid values for GpiSet/QueryPattern and others *)
      CONST LCID_ERROR                   =(-1);
      CONST LCID_DEFAULT                 =  0;

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>


            (*** global primitive functions *)
            PROCEDURE [APIENTRY] GpiSetColor(hps:  HPS;
                                                                  lColor: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryColor(hps: HPS ): LONG;

            (*** line primitive functions *)

            PROCEDURE [APIENTRY] GpiBox(hps:     HPS;
                                                        lControl:  LONG;
                                                        pptlPoint: PPOINTL;
                                                        lHRound:   LONG;
                                                        lVRound:   LONG ): LONG;

            PROCEDURE [APIENTRY] GpiMove(hps:     HPS;
                                                          pptlPoint: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiLine(hps:        HPS;
                                                          pptlEndPoint: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiPolyLine(hps:      HPS;
                                                                  lCount:     LONG;
                                                                  aptlPoints: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiPolyLineDisjoint(hps:      HPS;
                                                                                  lCount:     LONG;
                                                                                  aptlPoints: PPOINTL ): LONG;

            (*** area primitive functions *)
            PROCEDURE [APIENTRY] GpiSetPattern(hps:   HPS;
                                                                      lPatternSymbol: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryPattern(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiBeginArea(hps:     HPS;
                                                                    flOptions: ULONG ): BOOL;

            PROCEDURE [APIENTRY] GpiEndArea(hps: HPS ): LONG;

            (*** character primitive functions *)
            PROCEDURE [APIENTRY] GpiCharString(hps:     HPS;
                                                                      lCount:    LONG;
                                                                      pchString: PCH ): LONG;

            PROCEDURE [APIENTRY] GpiCharStringAt(hps:     HPS;
                                                                          pptlPoint: PPOINTL;
                                                                          lCount:    LONG;
                                                                          pchString: PCH ): LONG;

   <* END *>

<* END *>
<* IF DEFINED (INCL_GPIPRIMITIVES)  THEN *>

      (* mode for GpiSetAttrMode *)
      CONST AM_ERROR                     =(-1);
      CONST AM_PRESERVE                  =  0;
      CONST AM_NOPRESERVE                =  1;

      (* foreground mixes *)
      CONST FM_ERROR                     =(-1);
      CONST FM_DEFAULT                   =  0;
      CONST FM_OR                        =  1;
      CONST FM_OVERPAINT                 =  2;
      CONST FM_LEAVEALONE                =  5;

      CONST FM_XOR                       =  4;
      CONST FM_AND                       =  6;
      CONST FM_SUBTRACT                  =  7;
      CONST FM_MASKSRCNOT                =  8;
      CONST FM_ZERO                      =  9;
      CONST FM_NOTMERGESRC               = 10;
      CONST FM_NOTXORSRC                 = 11;
      CONST FM_INVERT                    = 12;
      CONST FM_MERGESRCNOT               = 13;
      CONST FM_NOTCOPYSRC                = 14;
      CONST FM_MERGENOTSRC               = 15;
      CONST FM_NOTMASKSRC                = 16;
      CONST FM_ONE                       = 17;


      (* background mixes *)
      CONST BM_ERROR                     =(-1);
      CONST BM_DEFAULT                   =  0;
      CONST BM_OR                        =  1;
      CONST BM_OVERPAINT                 =  2;
      CONST BM_LEAVEALONE                =  5;

      CONST BM_XOR                       =  4;
      CONST BM_AND                       =  6;
      CONST BM_SUBTRACT                  =  7;
      CONST BM_MASKSRCNOT                =  8;
      CONST BM_ZERO                      =  9;
      CONST BM_NOTMERGESRC               = 10;
      CONST BM_NOTXORSRC                 = 11;
      CONST BM_INVERT                    = 12;
      CONST BM_MERGESRCNOT               = 13;
      CONST BM_NOTCOPYSRC                = 14;
      CONST BM_MERGENOTSRC               = 15;
      CONST BM_NOTMASKSRC                = 16;
      CONST BM_ONE                       = 17;
      CONST BM_SRCTRANSPARENT            = 18;
      CONST BM_DESTTRANSPARENT           = 19;



      (* basic line type styles *)
      CONST LINETYPE_ERROR               =(-1);
      CONST LINETYPE_DEFAULT             =  0;
      CONST LINETYPE_DOT                 =  1;
      CONST LINETYPE_SHORTDASH           =  2;
      CONST LINETYPE_DASHDOT             =  3;
      CONST LINETYPE_DOUBLEDOT           =  4;
      CONST LINETYPE_LONGDASH            =  5;
      CONST LINETYPE_DASHDOUBLEDOT       =  6;
      CONST LINETYPE_SOLID               =  7;
      CONST LINETYPE_INVISIBLE           =  8;
   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>
            CONST LINETYPE_ALTERNATE        =     9;
   <* END *>

      (* cosmetic line widths *)
      CONST LINEWIDTH_ERROR             = (-1);
      CONST LINEWIDTH_DEFAULT            =  0;
      CONST LINEWIDTH_NORMAL       = 000010000H;  (* MAKEFIXED(1;0) *)
      CONST LINEWIDTH_THICK        = 000020000H;  (* MAKEFIXED(2;0) *)

      (* actual line widths *)
      CONST LINEWIDTHGEOM_ERROR          =(-1);

      (* line end styles *)
      CONST LINEEND_ERROR                =(-1);
      CONST LINEEND_DEFAULT              =  0;
      CONST LINEEND_FLAT                 =  1;
      CONST LINEEND_SQUARE               =  2;
      CONST LINEEND_ROUND                =  3;

      (* line join styles *)
      CONST LINEJOIN_ERROR               =(-1);
      CONST LINEJOIN_DEFAULT             =  0;
      CONST LINEJOIN_BEVEL               =  1;
      CONST LINEJOIN_ROUND               =  2;
      CONST LINEJOIN_MITRE               =  3;

      (* character directions *)
      CONST CHDIRN_ERROR                 =(-1);
      CONST CHDIRN_DEFAULT               =  0;
      CONST CHDIRN_LEFTRIGHT             =  1;
      CONST CHDIRN_TOPBOTTOM             =  2;
      CONST CHDIRN_RIGHTLEFT             =  3;
      CONST CHDIRN_BOTTOMTOP             =  4;

      (* character text alignments *)
      CONST TA_NORMAL_HORIZ     = 00001H;
      CONST TA_LEFT             = 00002H;
      CONST TA_CENTER           = 00003H;
      CONST TA_RIGHT            = 00004H;
      CONST TA_STANDARD_HORIZ   = 00005H;
      CONST TA_NORMAL_VERT      = 00100H;
      CONST TA_TOP              = 00200H;
      CONST TA_HALF             = 00300H;
      CONST TA_BASE             = 00400H;
      CONST TA_BOTTOM           = 00500H;
      CONST TA_STANDARD_VERT    = 00600H;

      (* character modes *)
      CONST CM_ERROR                     =(-1);
      CONST CM_DEFAULT                   =  0;
      CONST CM_MODE1                     =  1;
      CONST CM_MODE2                     =  2;
      CONST CM_MODE3                     =  3;

      (* basic marker symbols *)
      CONST MARKSYM_ERROR                =(-1);
      CONST MARKSYM_DEFAULT              =  0;
      CONST MARKSYM_CROSS                =  1;
      CONST MARKSYM_PLUS                 =  2;
      CONST MARKSYM_DIAMOND              =  3;
      CONST MARKSYM_SQUARE               =  4;
      CONST MARKSYM_SIXPOINTSTAR         =  5;
      CONST MARKSYM_EIGHTPOINTSTAR       =  6;
      CONST MARKSYM_SOLIDDIAMOND         =  7;
      CONST MARKSYM_SOLIDSQUARE          =  8;
      CONST MARKSYM_DOT                  =  9;
      CONST MARKSYM_SMALLCIRCLE          = 10;
      CONST MARKSYM_BLANK                = 64;

      (* formatting options for GpiCharStringPosAt *)
      CONST CHS_OPAQUE                 = 00001H;
      CONST CHS_VECTOR                 = 00002H;
      CONST CHS_LEAVEPOS               = 00008H;
      CONST CHS_CLIP                   = 00010H;
      CONST CHS_UNDERSCORE             = 00200H;
      CONST CHS_STRIKEOUT              = 00400H;

      (* bundle codes for GpiSetAttributes and GpiQueryAttributes *)
      CONST PRIM_LINE                     = 1;
      CONST PRIM_CHAR                     = 2;
      CONST PRIM_MARKER                   = 3;
      CONST PRIM_AREA                     = 4;
      CONST PRIM_IMAGE                    = 5;

      (* line bundle mask bits *)
      CONST LBB_COLOR                  = 00001H;
      CONST LBB_BACK_COLOR             = 00002H;
      CONST LBB_MIX_MODE               = 00004H;
      CONST LBB_BACK_MIX_MODE          = 00008H;
      CONST LBB_WIDTH                  = 00010H;
      CONST LBB_GEOM_WIDTH             = 00020H;
      CONST LBB_TYPE                   = 00040H;
      CONST LBB_END                    = 00080H;
      CONST LBB_JOIN                   = 00100H;

      (* character bundle mask bits *)
      CONST CBB_COLOR                  = 00001H;
      CONST CBB_BACK_COLOR             = 00002H;
      CONST CBB_MIX_MODE               = 00004H;
      CONST CBB_BACK_MIX_MODE          = 00008H;
      CONST CBB_SET                    = 00010H;
      CONST CBB_MODE                   = 00020H;
      CONST CBB_BOX                    = 00040H;
      CONST CBB_ANGLE                  = 00080H;
      CONST CBB_SHEAR                  = 00100H;
      CONST CBB_DIRECTION              = 00200H;
      CONST CBB_TEXT_ALIGN             = 00400H;
      CONST CBB_EXTRA                  = 00800H;
      CONST CBB_BREAK_EXTRA            = 01000H;

      (* marker bundle mask bits *)
      CONST MBB_COLOR                  = 00001H;
      CONST MBB_BACK_COLOR             = 00002H;
      CONST MBB_MIX_MODE               = 00004H;
      CONST MBB_BACK_MIX_MODE          = 00008H;
      CONST MBB_SET                    = 00010H;
      CONST MBB_SYMBOL                 = 00020H;
      CONST MBB_BOX                    = 00040H;

      (* pattern bundle mask bits *)
      CONST ABB_COLOR                  = 00001H;
      CONST ABB_BACK_COLOR             = 00002H;
      CONST ABB_MIX_MODE               = 00004H;
      CONST ABB_BACK_MIX_MODE          = 00008H;
      CONST ABB_SET                    = 00010H;
      CONST ABB_SYMBOL                 = 00020H;
      CONST ABB_REF_POINT              = 00040H;

      (* image bundle mask bits *)
      CONST IBB_COLOR                  = 00001H;
      CONST IBB_BACK_COLOR             = 00002H;
      CONST IBB_MIX_MODE               = 00004H;
      CONST IBB_BACK_MIX_MODE          = 00008H;

      (* structure for GpiSetArcParams and GpiQueryArcParams *)
      TYPE ARCPARAMS = RECORD      (* arcp *)
            lP:    LONG;
            lQ:    LONG;
            lR:    LONG;
            lS:    LONG;
      END;
      TYPE PARCPARAMS = POINTER TO ARCPARAMS;

      (* variation of SIZE used for FIXEDs *)
      TYPE SIZEF = RECORD         (* sizfx *)
            cx: FIXED;
            cy: FIXED;
      END;
      TYPE PSIZEF = POINTER TO SIZEF;

      (* structure for gradient parameters e.g. for GpiSetCharAngle *)
      TYPE GRADIENTL = RECORD       (* gradl *)
            x:     LONG;
            y:     LONG;
      END;
      TYPE PGRADIENTL = POINTER TO GRADIENTL;

      (* line bundle for GpiSetAttributes and GpiQueryAttributes *)
      TYPE LINEBUNDLE = RECORD      (* lbnd *)
            lColor:            LONG;
            lBackColor:        LONG;
            usMixMode:         USHORT;
            usBackMixMode:     USHORT;
            fxWidth:           FIXED;
            lGeomWidth:        LONG;
            usType:            USHORT;
            usEnd:             USHORT;
            usJoin:            USHORT;
            usReserved:        USHORT;
      END;
      TYPE PLINEBUNDLE = POINTER TO LINEBUNDLE;

      (* character bundle for GpiSetAttributes and GpiQueryAttributes *)
      TYPE CHARBUNDLE = RECORD      (* cbnd *)
            lColor:         LONG;
            lBackColor:     LONG;
            usMixMode:      USHORT;
            usBackMixMode:  USHORT;
            usSet:          USHORT;
            usPrecision:    USHORT;
            sizfxCell:      SIZEF;
            ptlAngle:       POINTL;
            ptlShear:       POINTL;
            usDirection:    USHORT;
            usTextAlign:    USHORT;
            fxExtra:        FIXED;
            fxBreakExtra:   FIXED;
      END;
      TYPE PCHARBUNDLE = POINTER TO CHARBUNDLE;

      (* marker bundle for GpiSetAttributes and GpiQueryAttributes *)
      TYPE MARKERBUNDLE = RECORD
            lColor:        LONG;
            lBackColor:    LONG;
            usMixMode:     USHORT;
            usBackMixMode: USHORT;
            usSet:         USHORT;
            usSymbol:      USHORT;
            sizfxCell:     SIZEF;
      END;
      TYPE PMARKERBUNDLE = POINTER TO MARKERBUNDLE;

      (* pattern bundle for GpiSetAttributes and GpiQueryAttributes *)
      TYPE AREABUNDLE = RECORD   (* pbnd *)
            lColor:         LONG;
            lBackColor:     LONG;
            usMixMode:      USHORT;
            usBackMixMode:  USHORT;
            usSet:          USHORT;
            usSymbol:       USHORT;
            ptlRefPoint :   POINTL;
      END;
      TYPE PAREABUNDLE = POINTER TO AREABUNDLE;

      (* image bundle for GpiSetAttributes and GpiQueryAttributes *)
      TYPE IMAGEBUNDLE = RECORD     (* ibmd *)
            lColor:        LONG;
            lBackColor:    LONG;
            usMixMode:     USHORT;
            usBackMixMode: USHORT;
      END;
      TYPE PIMAGEBUNDLE = POINTER TO IMAGEBUNDLE;

      (* pointer to any bundle used by GpiSet/QueryAttrs *)
      TYPE PBUNDLE = PVOID;

      (* array indices for GpiQueryTextBox *)
      CONST TXTBOX_TOPLEFT               =  0;
      CONST TXTBOX_BOTTOMLEFT            =  1;
      CONST TXTBOX_TOPRIGHT              =  2;
      CONST TXTBOX_BOTTOMRIGHT           =  3;
      CONST TXTBOX_CONCAT                =  4;
      (* array count for GpiQueryTextBox *)
      CONST TXTBOX_COUNT                 =  5;

      (* return codes for GpiPtVisible *)
      CONST PVIS_ERROR                   =  0;
      CONST PVIS_INVISIBLE               =  1;
      CONST PVIS_VISIBLE                 =  2;

      (* return codes for GpiRectVisible *)
      CONST RVIS_ERROR                   =  0;
      CONST RVIS_INVISIBLE               =  1;
      CONST RVIS_PARTIAL                 =  2;
      CONST RVIS_VISIBLE                 =  3;

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>


            (*** attribute mode functions *)
            PROCEDURE [APIENTRY] GpiSetAttrMode(hps:  HPS;
                                                                        lMode:  LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryAttrMode(hps: HPS ): LONG;
            (*** bundle primitive functions *)
            PROCEDURE [APIENTRY] GpiSetAttrs(hps:      HPS;
                                                                  lPrimType:  LONG;
                                                                  flAttrMask: ULONG;
                                                                  flDefMask:  ULONG;
                                                                  ppbunAttrs: PBUNDLE ): BOOL;
      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


                  PROCEDURE [APIENTRY] GpiQueryAttrs(hps:      HPS;
                                                                            lPrimType:  LONG;
                                                                            flAttrMask: ULONG;
                                                                            ppbunAttrs: PBUNDLE ): LONG;

      <* END *>


            (*** global primitive functions *)
            PROCEDURE [APIENTRY] GpiSetBackColor(hps:  HPS;
                                                                          lColor: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryBackColor(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetMix(hps:    HPS;
                                                              lMixMode: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryMix(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetBackMix(hps:    HPS;
                                                                      lMixMode: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryBackMix(hps: HPS ): LONG;

            (*** line primitive functions *)
            PROCEDURE [APIENTRY] GpiSetLineType(hps:     HPS;
                                                                        lLineType: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryLineType(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetLineWidth(hps:       HPS;
                                                                          fxLineWidth: FIXED ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryLineWidth(hps: HPS ): FIXED;

            PROCEDURE [APIENTRY] GpiSetLineWidthGeom(hps:      HPS;
                                                                                  lLineWidth: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryLineWidthGeom(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetLineEnd(hps:    HPS;
                                                                      lLineEnd: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryLineEnd(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetLineJoin(hps:     HPS;
                                                                        lLineJoin: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryLineJoin(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetCurrentPosition(hps:     HPS;
                                                                                      pptlPoint: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCurrentPosition(hps:     HPS;
                                                                                          pptlPoint: PPOINTL ): BOOL;

            (*** arc primitive functions *)
            PROCEDURE [APIENTRY] GpiSetArcParams(hps: HPS;
                                                                          parcpArcParams: PARCPARAMS ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryArcParams(hps:          HPS;
                                                                              parcpArcParams: PARCPARAMS ): BOOL;

            PROCEDURE [APIENTRY] GpiPointArc(hps: HPS;
                                                                  pptl2: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiFullArc(hps:        HPS;
                                                                lControl:     LONG;
                                                                fxMultiplier: FIXED ): LONG;

            PROCEDURE [APIENTRY] GpiPartialArc(hps:         HPS;
                                                                      pptlCenter:    PPOINTL;
                                                                      fxMultiplier:  FIXED;
                                                                      fxStartAngle:  FIXED;
                                                                      fxSweepAngle:  FIXED ): LONG;

            PROCEDURE [APIENTRY] GpiPolyFillet(hps:      HPS;
                                                                      lCount:     LONG;
                                                                      aptlPoints: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiPolySpline(hps:      HPS;
                                                                      lCount:     LONG;
                                                                      aptlPoints: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiPolyFilletSharp(hps:       HPS;
                                                                                lCount:      LONG;
                                                                                aptlPoints:  PPOINTL;
                                                                                afxPoints:   PFIXED ): LONG;

            (*** area primitive functions *)
            PROCEDURE [APIENTRY] GpiSetPatternSet(hps: HPS;
                                                                            lSet:  LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryPatternSet(hps: HPS): LONG;

            PROCEDURE [APIENTRY] GpiSetPatternRefPoint(hps:        HPS;
                                                                                      pptlRefPoint: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryPatternRefPoint(hps:        HPS;
                                                                                          pptlRefPoint: PPOINTL ): BOOL;

            (*** character primitive functions *)
            PROCEDURE [APIENTRY] GpiQueryCharStringPos(hps:         HPS;
                                                                                      flOptions:     ULONG;
                                                                                      lCount:        LONG;
                                                                                      pchString:     PCH;
                                                                                      alXincrements: PLONG;
                                                                                      aptlPositions: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharStringPosAt(hps:         HPS;
                                                                                          pptlStart:     PPOINTL;
                                                                                          flOptions:     ULONG;
                                                                                          lCount:        LONG;
                                                                                          pchString:     PCH;
                                                                                          alXincrements: PLONG;
                                                                                          aptlPositions: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryTextBox(hps:      HPS;
                                                                          lCount1:    LONG;
                                                                          pchString:  PCH;
                                                                          lCount2:    LONG;
                                                                          aptlPoints: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryDefCharBox(hps:     HPS;
                                                                                psizlSize: PSIZEL ): BOOL;

            PROCEDURE [APIENTRY] GpiSetCharSet(hps: HPS;
                                                                      llcid: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharSet(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetCharBox(hps:     HPS;
                                                                      psizfxBox: PSIZEF ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharBox(hps:      HPS;
                                                                          psizfxSize: PSIZEF ): BOOL;

            PROCEDURE [APIENTRY] GpiSetCharAngle(hps:       HPS;
                                                                          pgradlAngle: PGRADIENTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharAngle(hps:       HPS;
                                                                              pgradlAngle: PGRADIENTL ): BOOL;

            PROCEDURE [APIENTRY] GpiSetCharShear(hps:     HPS;
                                                                          pptlAngle: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharShear(hps:     HPS;
                                                                              pptlShear: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiSetCharDirection(hps:      HPS;
                                                                                  lDirection: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharDirection(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetCharMode(hps: HPS;
                                                                        lMode: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharMode(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiSetTextAlignment(hps:  HPS;
                                                                                  lHoriz: LONG;
                                                                                  lVert:  LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryTextAlignment(hps:   HPS;
                                                                                      plHoriz: PLONG;
                                                                                      plVert:  PLONG ): BOOL;

            PROCEDURE [APIENTRY] GpiCharStringPos(hps:     HPS;
                                                                            prclRect:  PRECTL;
                                                                            flOptions: ULONG;
                                                                            lCount:    LONG;
                                                                            pchString: PCH;
                                                                            alAdx:     PLONG ): LONG;

            PROCEDURE [APIENTRY] GpiCharStringPosAt(hps:     HPS;
                                                                                pptlStart: PPOINTL;
                                                                                prclRect:  PRECTL;
                                                                                flOptions: ULONG;
                                                                                lCount:    LONG;
                                                                                pchString: PCH;
                                                                                alAdx:     PLONG ): LONG;

            PROCEDURE [APIENTRY] GpiSetCharExtra(hps: HPS;
                                                                          Extra: FIXED  ): BOOL;

            PROCEDURE [APIENTRY] GpiSetCharBreakExtra(hps:      HPS;
                                                                                    BreakExtra: FIXED  ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharExtra(hps: HPS;
                                                                              Extra: PFIXED ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryCharBreakExtra(hps:      HPS;
                                                                                        BreakExtra: PFIXED ): BOOL;

            (*** marker primitive functions  *)
            PROCEDURE [APIENTRY] GpiMarker(hps:     HPS;
                                                              pptlPoint: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiPolyMarker(hps:      HPS;
                                                                      lCount:     LONG;
                                                                      aptlPoints: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiSetMarker(hps:   HPS;
                                                                    lSymbol: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiSetMarkerBox(hps:      HPS;
                                                                          psizfxSize: PSIZEF ): BOOL;

            PROCEDURE [APIENTRY] GpiSetMarkerSet(hps: HPS;
                                                                          lSet:  LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryMarker(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiQueryMarkerBox(hps:      HPS;
                                                                              psizfxSize: PSIZEF ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryMarkerSet(hps: HPS ): LONG;

            (*** image primitive functions *)
            PROCEDURE [APIENTRY] GpiImage(hps:          HPS;
                                                            lFormat:        LONG;
                                                            psizlImageSize: PSIZEL;
                                                            lLength:        LONG;
                                                            pbData:         PBYTE ): LONG;

            (*** miscellaneous primitive functions *)
            PROCEDURE [APIENTRY] GpiPop(hps:  HPS;
                                                        lCount: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiPtVisible(hps:     HPS;
                                                                    pptlPoint: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiRectVisible(hps:  HPS;
                                                                        prclRectangle: PRECTL ): LONG;

            PROCEDURE [APIENTRY] GpiComment(hps:   HPS;
                                                                lLength: LONG;
                                                                pbData:  PBYTE ): BOOL;

   <* END *>

<* END *>
<* IF DEFINED (INCL_GPILCIDS)  THEN *>

      (* return codes from GpiCreateLogFont *)
      CONST FONT_DEFAULT                  = 1;
      CONST FONT_MATCH                    = 2;

      (* lcid type for GpiQuerySetIds *)
      CONST LCIDT_FONT                    = 6;

      CONST LCIDT_BITMAP                  = 7;

      (* constant used to delete all lcids by GpiDeleteSetId *)
      CONST LCID_ALL                     =(-1);

      (* kerning data returned by GpiQueryKerningPairs *)
      TYPE KERNINGPAIRS = RECORD    (* krnpr *)
            sFirstChar:     SHORT;
            sSecondChar:    SHORT;
            lKerningAmount: LONG;
      END;
      TYPE PKERNINGPAIRS = POINTER TO KERNINGPAIRS;

      (* data required by GpiQueryFaceString *)
      TYPE FACENAMEDESC = RECORD    (* fnd *)
            usSize:        USHORT;
            usWeightClass: USHORT;
            usWidthClass:  USHORT;
            usReserved:    USHORT;
            flOptions:     ULONG;
      END;
      TYPE PFACENAMEDESC = POINTER TO FACENAMEDESC;

      (* FACENAMEDESC 'WeightClass' options for GpiQueryFaceString *)
      CONST FWEIGHT_DONT_CARE   =  0;
      CONST FWEIGHT_ULTRA_LIGHT =  1;
      CONST FWEIGHT_EXTRA_LIGHT =  2;
      CONST FWEIGHT_LIGHT       =  3;
      CONST FWEIGHT_SEMI_LIGHT  =  4;
      CONST FWEIGHT_NORMAL      =  5;
      CONST FWEIGHT_SEMI_BOLD   =  6;
      CONST FWEIGHT_BOLD        =  7;
      CONST FWEIGHT_EXTRA_BOLD  =  8;
      CONST FWEIGHT_ULTRA_BOLD  =  9;

      (* FACENAMEDESC 'WidthClass' options for GpiQueryFaceString *)
      CONST FWIDTH_DONT_CARE       =0;
      CONST FWIDTH_ULTRA_CONDENSED =1;
      CONST FWIDTH_EXTRA_CONDENSED =2;
      CONST FWIDTH_CONDENSED       =3;
      CONST FWIDTH_SEMI_CONDENSED  =4;
      CONST FWIDTH_NORMAL          =5;
      CONST FWIDTH_SEMI_EXPANDED   =6;
      CONST FWIDTH_EXPANDED        =7;
      CONST FWIDTH_EXTRA_EXPANDED  =8;
      CONST FWIDTH_ULTRA_EXPANDED  =9;

      (* FACENAMEDESC 'options' for GpiQueryFaceString *)
      CONST FTYPE_ITALIC            = 00001H;
      CONST FTYPE_ITALIC_DONT_CARE  = 00002H;
      CONST FTYPE_OBLIQUE           = 00004H;
      CONST FTYPE_OBLIQUE_DONT_CARE = 00008H;
      CONST FTYPE_ROUNDED           = 00010H;
      CONST FTYPE_ROUNDED_DONT_CARE = 00020H;

      (* actions for GpiQueryFontAction *)
      CONST QFA_PUBLIC    =  1;
      CONST QFA_PRIVATE   =  2;
      CONST QFA_ERROR     =  GPI_ALTERROR;

      (* options for GpiQueryFonts *)
      CONST QF_PUBLIC                  = 00001H;
      CONST QF_PRIVATE                 = 00002H;
      CONST QF_NO_GENERIC              = 00004H;
      CONST QF_NO_DEVICE               = 00008H;

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            (* font file descriptions for GpiQueryFontFileDescriptions *)
            TYPE FFDESCS  = ARRAY [0..1],[0..FACESIZE-1] OF CHAR; (* ffdescs *)
            TYPE PFFDESCS = POINTER TO FFDESCS;
            TYPE FFDESCS2 = RECORD   (* ffdescs2 *)
                  cbLength:         ULONG;
                  cbFacenameOffset: ULONG;
                  abFamilyName:     ARRAY [0..0] OF BYTE;
            END;
            TYPE PFFDESCS2 = POINTER TO FFDESCS2;

   <* END *>

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>

            (*** physical and logical font functions *)

            PROCEDURE [APIENTRY] GpiCreateLogFont(hps:     HPS;
                                                                            pName:     PSTR8;
                                                                            lLcid:     LONG;
                                                                            pfatAttrs: PFATTRS ): LONG;

            PROCEDURE [APIENTRY] GpiDeleteSetId(hps: HPS;
                                                                        lLcid: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiLoadFonts(hab:       HAB;
                                                                    pszFilename: PCSZ ): BOOL;

            PROCEDURE [APIENTRY] GpiUnloadFonts(hab:       HAB;
                                                                        pszFilename: PCSZ ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryFonts(hps:          HPS;
                                                                      flOptions:      ULONG;
                                                                      pszFacename:    PCSZ;
                                                                      plReqFonts:     PLONG;
                                                                      lMetricsLength: LONG;
                                                                      afmMetrics:     PFONTMETRICS ): LONG;

            PROCEDURE [APIENTRY] GpiQueryFontMetrics(hps:     HPS;
                                                                                  lMetricsLength: LONG;
                                                                                  pfmMetrics:     PFONTMETRICS ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryKerningPairs(hps:      HPS;
                                                                                    lCount:     LONG;
                                                                                    akrnprData: PKERNINGPAIRS ): LONG;

            PROCEDURE [APIENTRY] GpiQueryWidthTable(hps:      HPS;
                                                                                lFirstChar: LONG;
                                                                                lCount:     LONG;
                                                                                alData:     PLONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryNumberSetIds(hps: HPS ): LONG;

            PROCEDURE [APIENTRY] GpiQuerySetIds(hps:   HPS;
                                                                        lCount:  LONG;
                                                                        alTypes: PLONG;
                                                                        aNames:  PSTR8;
                                                                        allcids: PLONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryFaceString(PS:              HPS;
                                                                                FamilyName:        PCSZ;
                                                                                attrs:             PFACENAMEDESC;
                                                                                length:            LONG;
                                                                                CompoundFaceName:  PCSZ ): ULONG;

            PROCEDURE [APIENTRY] GpiQueryLogicalFont(PS:   HPS;
                                                                                  lcid:   LONG;
                                                                                  name:   PSTR8;
                                                                                  attrs:  PFATTRS;
                                                                                  length: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryFontAction(anchor: HAB;
                                                                                options:  ULONG ): ULONG;

            PROCEDURE [APIENTRY] GpiLoadPublicFonts(hab: HAB;
                                                                                pcsz: PCSZ): BOOL;

            PROCEDURE [APIENTRY] GpiUnloadPublicFonts(hab: HAB;
                                                                                    pcsz: PCSZ): BOOL;

      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

                  PROCEDURE [APIENTRY] GpiSetCp(hps:        HPS;
                                                                      ulCodePage: ULONG ): BOOL;

                  PROCEDURE [APIENTRY] GpiQueryCp(hps: HPS ): ULONG;

                  PROCEDURE [APIENTRY] GpiQueryFullFontFileDescs(hab:         HAB;
                                                                                                        pszFilename: PCSZ;
                                                                                                        plCount:     PLONG;
                                                                                                        pNames:      PVOID;
                                                                                                        plNamesBuffLength: PLONG ): LONG;

                  PROCEDURE [APIENTRY] GpiQueryFontFileDescriptions(hab:           HAB;
                                                                                                              pszFilename:   PCSZ;
                                                                                                              plCount:       PLONG;
                                                                                                              affdescsNames: PFFDESCS ): LONG;

      <* END *>

   <* END *>

<* END *>

<* IF (DEFINED (INCL_GPIBITMAPS) OR NOT DEFINED (INCL_NOCOMMON) ) THEN *>
      (* raster operations defined for GpiBitBlt *)
      CONST ROP_SRCCOPY                = 000CCH;
      CONST ROP_SRCPAINT               = 000EEH;
      CONST ROP_SRCAND                 = 00088H;
      CONST ROP_SRCINVERT              = 00066H;
      CONST ROP_SRCERASE               = 00044H;
      CONST ROP_NOTSRCCOPY             = 00033H;
      CONST ROP_NOTSRCERASE            = 00011H;
      CONST ROP_MERGECOPY              = 000C0H;
      CONST ROP_MERGEPAINT             = 000BBH;
      CONST ROP_PATCOPY                = 000F0H;
      CONST ROP_PATPAINT               = 000FBH;
      CONST ROP_PATINVERT              = 0005AH;
      CONST ROP_DSTINVERT              = 00055H;
      CONST ROP_ZERO                   = 00000H;
      CONST ROP_ONE                    = 000FFH;

      (* Blt options for GpiBitBlt *)
      CONST BBO_OR                       =  0;
      CONST BBO_AND                      =  1;
      CONST BBO_IGNORE                   =  2;
      CONST BBO_PAL_COLORS               =  4;
      CONST BBO_NO_COLOR_INFO            =  8;

      (* Fill options for GpiFloodFill *)
      CONST FF_BOUNDARY                  =  0;
      CONST FF_SURFACE                   =  1;

      (* error return for GpiSetBitmap *)
      CONST HBM_ERROR           = HBITMAP(LONG(-1));

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>
            (*** bitmap and pel functions *)

            PROCEDURE [APIENTRY] GpiBitBlt(hpsTarget:   HPS;
                                                                    hpsSource:  HPS;
                                                                    lCount:     LONG;
                                                                    aptlPoints: PPOINTL;
                                                                    lRop:       LONG;
                                                                    flOptions:  ULONG ): LONG;

            PROCEDURE [APIENTRY] GpiDeleteBitmap(hbm: HBITMAP ): BOOL;

            PROCEDURE [APIENTRY] GpiLoadBitmap(hps:       HPS;
                                                                            Resource: HMODULE;
                                                                            idBitmap: ULONG;
                                                                            lWidth:   LONG;
                                                                            lHeight:  LONG ): HBITMAP;

            PROCEDURE [APIENTRY] GpiSetBitmap(hps:  HPS;
                                                                          hbm: HBITMAP ): HBITMAP;

            PROCEDURE [APIENTRY] GpiWCBitBlt(hpsTarget:   HPS;
                                                                        hbmSource:  HBITMAP;
                                                                        lCount:     LONG;
                                                                        aptlPoints: PPOINTL;
                                                                        lRop:       LONG;
                                                                        flOptions:  ULONG ): LONG;

   <* END *>

<* END *>

<* IF DEFINED (INCL_GPIBITMAPS)  THEN *>

      (*** include bitmap structures and file formats *************************)
   
(* ------------- Include file: .\hm\pmbitmap.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMBITMAP.H
*
* OS/2 Presentation Manager Bit Map, Icon and Pointer type declarations.
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* This is the file format structure for Bit Maps, Pointers and Icons
* as stored in the resource file of a PM application.
*
* Notes on file format:
*
* Each BITMAPFILEHEADER entry is immediately followed by the color table
* for the bit map bits it references.
* Icons and Pointers contain two BITMAPFILEHEADERs for each ARRAYHEADER
* item.  The first one is for the ANDXOR mask, the second is for the
* COLOR mask.  All offsets are absolute based on the start of the FILE.
*
* For OS/2 Version 2.0 and later BITMAPFILEHEADER2 and the other '2'
* versions of each structure are recommended. Use the non-2 versions
* of each structure if compatibility with OS/2 Version 1.X is required.
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)

<* IF NOT DEFINED(PMBITMAP_INCLUDED) THEN *>
      (* XLATON *)
   <* NEW PMBITMAP_INCLUDED + *>

      (* XLATOFF *)
      -- #pragma pack(1)          (* pack on wordboundary *)
      (* XLATON *)

      (* bitmap parameterization used by GpiCreateBitmap and others *)
      TYPE BITMAPINFOHEADER = RECORD        (* bmp *)
            cbFix:     ULONG;
            cx:        USHORT;
            cy:        USHORT;
            cPlanes:   USHORT;
            cBitCount: USHORT;
      END;
      TYPE PBITMAPINFOHEADER = POINTER TO BITMAPINFOHEADER;

      (* RGB data for _BITMAPINFO struct *)
      TYPE RGB = RECORD             (* rgb *)
            bBlue:  BYTE;
            bGreen: BYTE;
            bRed:   BYTE;
      END;

      (* bitmap data used by GpiSetBitmapBits and others *)
      TYPE BITMAPINFO = RECORD      (* bmi *)
            cbFix:     ULONG;
            cx:        USHORT;
            cy:        USHORT;
            cPlanes:   USHORT;
            cBitCount: USHORT;
            argbColor: ARRAY [0..0] OF RGB;
      END;
      TYPE PBITMAPINFO = POINTER TO BITMAPINFO;

      (* Constants for compression/decompression command *)

      CONST CBD_COMPRESSION    = 1;
      CONST CBD_DECOMPRESSION  = 2;
      CONST CBD_BITS           = 0;

      (* Flags for compression/decompression option *)

      CONST CBD_COLOR_CONVERSION   = 000000001H;

      (* Compression scheme in the ulCompression field of the bitmapinfo structure *)

      CONST BCA_UNCOMP         = 0;
      CONST BCA_HUFFMAN1D      = 3;
      CONST BCA_RLE4           = 2;
      CONST BCA_RLE8           = 1;
      CONST BCA_RLE24          = 4;

      CONST BRU_METRIC         = 0;

      CONST BRA_BOTTOMUP       = 0;

      CONST BRH_NOTHALFTONED   = 0;
      CONST BRH_ERRORDIFFUSION = 1;
      CONST BRH_PANDA          = 2;
      CONST BRH_SUPERCIRCLE    = 3;

      CONST BCE_PALETTE        = (-1);
      CONST BCE_RGB            = 0;

      TYPE BITMAPINFOHEADER2 = RECORD       (* bmp2  *)
            cbFix:             ULONG; (*  Length of structure                    *)
            cx:                ULONG; (*  Bit-map width in pels                  *)
            cy:                ULONG; (*  Bit-map height in pels                 *)
            cPlanes:           USHORT; (*  Number of bit planes                   *)
            cBitCount:         USHORT; (*  Number of bits per pel within a plane  *)
            ulCompression:     ULONG; (*  Compression scheme used to store the bitmap *)
            cbImage:           ULONG; (*  Length of bit-map storage data in bytes*)
            cxResolution:      ULONG; (*  x resolution of target device          *)
            cyResolution:      ULONG; (*  y resolution of target device          *)
            cclrUsed:          ULONG; (*  Number of color indices used           *)
            cclrImportant:     ULONG; (*  Number of important color indices      *)
            usUnits:           USHORT; (*  Units of measure                       *)
            usReserved:        USHORT; (*  Reserved                               *)
            usRecording:       USHORT; (*  Recording algorithm                    *)
            usRendering:       USHORT; (*  Halftoning algorithm                   *)
            cSize1:            ULONG; (*  Size value 1                           *)
            cSize2:            ULONG; (*  Size value 2                           *)
            ulColorEncoding:   ULONG; (*  Color encoding                         *)
            ulIdentifier:      ULONG; (*  Reserved for application use           *)
      END;
      TYPE PBITMAPINFOHEADER2 = POINTER TO BITMAPINFOHEADER2;

      TYPE RGB2 = RECORD        (* rgb2 *)
            bBlue:               BYTE; (* Blue component of the color definition *)
            bGreen:              BYTE; (* Green component of the color definition*)
            bRed:                BYTE; (* Red component of the color definition  *)
            fcOptions:           BYTE; (* Reserved, must be zero                 *)
      END;
      TYPE PRGB2 = POINTER TO RGB2;

      TYPE BITMAPINFO2 = RECORD     (* bmi2 *)
            cbFix:             ULONG; (* Length of fixed portion of structure   *)
            cx:                ULONG; (* Bit-map width in pels                  *)
            cy:                ULONG; (* Bit-map height in pels                 *)
            cPlanes:           USHORT; (* Number of bit planes                   *)
            cBitCount:         USHORT; (* Number of bits per pel within a plane  *)
            ulCompression:     ULONG; (* Compression scheme used to store the bitmap *)
            cbImage:           ULONG; (* Length of bit-map storage data in bytes*)
            cxResolution:      ULONG; (* x resolution of target device          *)
            cyResolution:      ULONG; (* y resolution of target device          *)
            cclrUsed:          ULONG; (* Number of color indices used           *)
            cclrImportant:     ULONG; (* Number of important color indices      *)
            usUnits:           USHORT; (* Units of measure                       *)
            usReserved:        USHORT; (* Reserved                               *)
            usRecording:       USHORT; (* Recording algorithm                    *)
            usRendering:       USHORT; (* Halftoning algorithm                   *)
            cSize1:            ULONG; (* Size value 1                           *)
            cSize2:            ULONG; (* Size value 2                           *)
            ulColorEncoding:   ULONG; (* Color encoding                         *)
            ulIdentifier:      ULONG; (* Reserved for application use           *)
            argbColor:         ARRAY [0..0] OF RGB2; (* Color definition record   *)
      END;
      TYPE PBITMAPINFO2 = POINTER TO BITMAPINFO2;

      TYPE BITMAPFILEHEADER = RECORD   (* bfh *)
            usType:   USHORT;
            cbSize:   ULONG;
            xHotspot: SHORT;
            yHotspot: SHORT;
            offBits:  ULONG;
            bmp:      BITMAPINFOHEADER;
      END;
      TYPE PBITMAPFILEHEADER = POINTER TO BITMAPFILEHEADER;

      TYPE BITMAPARRAYFILEHEADER = RECORD      (* bafh *)
            usType:    USHORT;
            cbSize:    ULONG;
            offNext:   ULONG;
            cxDisplay: USHORT;
            cyDisplay: USHORT;
            bfh:       BITMAPFILEHEADER;
      END;
      TYPE PBITMAPARRAYFILEHEADER = POINTER TO BITMAPARRAYFILEHEADER;

      TYPE BITMAPFILEHEADER2 = RECORD   (* bfh2 *)
            usType:   USHORT;
            cbSize:   ULONG;
            xHotspot: SHORT;
            yHotspot: SHORT;
            offBits:  ULONG;
            bmp2:     BITMAPINFOHEADER2;
      END;
      TYPE PBITMAPFILEHEADER2 = POINTER TO BITMAPFILEHEADER2;

      TYPE BITMAPARRAYFILEHEADER2 = RECORD   (* bafh2 *)
            usType:    USHORT;
            cbSize:    ULONG;
            offNext:   ULONG;
            cxDisplay: USHORT;
            cyDisplay: USHORT;
            bfh2:      BITMAPFILEHEADER2;
      END;
      TYPE PBITMAPARRAYFILEHEADER2 = POINTER TO BITMAPARRAYFILEHEADER2;

      (*************************************************************************
      * These are the identifying values that go in the usType field of the
      * BITMAPFILEHEADER(2) and BITMAPARRAYFILEHEADER(2).
      * (BFT_ => Bit map File Type)
      *************************************************************************)
      CONST BFT_ICON         =  04349H;   (* 'IC' *)
      CONST BFT_BMAP         =  04d42H;   (* 'BM' *)
      CONST BFT_POINTER      =  05450H;   (* 'PT' *)
      CONST BFT_COLORICON    =  04943H;   (* 'CI' *)
      CONST BFT_COLORPOINTER =  05043H;   (* 'CP' *)
      CONST BFT_BITMAPARRAY  =  04142H;   (* 'BA' *)

      (* XLATOFF *)
      --#pragma pack()         (* reset to default packing *)
      (* XLATON *)

<* END *>

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmbitmap.hm ------------- *)

      (* usage flags for GpiCreateBitmap *)
      CONST CBM_INIT        = 00004H;

      (* error return code for GpiSet/QueryBitmapBits *)
      CONST BMB_ERROR                  =  (-1);

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>

            (*** bitmap and pel functions *)

            PROCEDURE [APIENTRY] GpiCreateBitmap(hps: HPS;
                                                                              pbmpNew: PBITMAPINFOHEADER2;
                                                                              flOptions: ULONG;
                                                                              pbInitData: PBYTE;
                                                                              pbmiInfoTable: PBITMAPINFO2 ): HBITMAP;

            PROCEDURE [APIENTRY] GpiSetBitmapBits(hps: HPS;
                                                                                lScanStart: LONG;
                                                                                lScans: LONG;
                                                                                pbBuffer: PBYTE;
                                                                                pbmiInfoTable: PBITMAPINFO2 ): LONG;

            PROCEDURE [APIENTRY] GpiSetBitmapDimension(hbm: HBITMAP;
                                                                                          psizlBitmapDimension: PSIZEL ): BOOL;

            PROCEDURE [APIENTRY] GpiSetBitmapId(hps: HPS;
                                                                            hbm: HBITMAP;
                                                                            lLcid: LONG ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryBitmapBits(hps: HPS;
                                                                                    lScanStart: LONG;
                                                                                    lScans: LONG;
                                                                                    pbBuffer: PBYTE;
                                                                                    pbmiInfoTable: PBITMAPINFO2 ): LONG;

            PROCEDURE [APIENTRY] GpiQueryBitmapDimension(hbm: HBITMAP;
                                                                                              psizlBitmapDimension: PSIZEL ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryBitmapHandle(hps: HPS;
                                                                                        lLcid: LONG ): HBITMAP;

            PROCEDURE [APIENTRY] GpiQueryBitmapParameters(hbm: HBITMAP;
                                                                                                pbmpData: PBITMAPINFOHEADER ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryBitmapInfoHeader(hbm: HBITMAP;
                                                                                                pbmpData: PBITMAPINFOHEADER2 ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryDeviceBitmapFormats(hps: HPS;
                                                                                                      lCount: LONG;
                                                                                                      alArray: PLONG ): BOOL;

            PROCEDURE [APIENTRY] GpiSetPel(hps: HPS;
                                                                  pptlPoint: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiQueryPel(hps: HPS;
                                                                      pptlPoint: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiFloodFill(hps: HPS;
                                                                        lOptions: LONG;
                                                                        lColor: LONG ): LONG;

            PROCEDURE [APIENTRY] GpiDrawBits(hps: HPS;
                                                                      pBits: PVOID;
                                                                      pbmiInfoTable: PBITMAPINFO2;
                                                                      lCount: LONG;
                                                                      aptlPoints: PPOINTL;
                                                                      lRop: LONG;
                                                                      flOptions: ULONG ): LONG;

   <* END *>


<* END *>

<* IF DEFINED (INCL_GPIREGIONS)  THEN *>

      (* options for GpiCombineRegion *)
      CONST CRGN_OR                      =  1;
      CONST CRGN_COPY                    =  2;
      CONST CRGN_XOR                     =  4;
      CONST CRGN_AND                     =  6;
      CONST CRGN_DIFF                    =  7;

      (* usDirection of returned region data for GpiQueryRegionRects *)
      CONST RECTDIR_LFRT_TOPBOT          =  1;
      CONST RECTDIR_RTLF_TOPBOT          =  2;
      CONST RECTDIR_LFRT_BOTTOP          =  3;
      CONST RECTDIR_RTLF_BOTTOP          =  4;

      (* control data for GpiQueryRegionRects *)
      TYPE RGNRECT = RECORD         (* rgnrc *)
            ircStart:    ULONG;
            crc:         ULONG;
            crcReturned: ULONG;
            ulDirection: ULONG;
      END;
      TYPE PRGNRECT = POINTER TO RGNRECT;

      (* return code to indicate type of region for GpiCombineRegion and others *)
      CONST RGN_ERROR                    =  0;
      CONST RGN_NULL                     =  1;
      CONST RGN_RECT                     =  2;
      CONST RGN_COMPLEX                  =  3;

      (* return codes for GpiPtInRegion *)
      CONST PRGN_ERROR                   =  0;
      CONST PRGN_OUTSIDE                 =  1;
      CONST PRGN_INSIDE                  =  2;

      (* return codes for GpiRectInRegion *)
      CONST RRGN_ERROR                   =  0;
      CONST RRGN_OUTSIDE                 =  1;
      CONST RRGN_PARTIAL                 =  2;
      CONST RRGN_INSIDE                  =  3;

      (* return codes for GpiEqualRegion *)
      CONST EQRGN_ERROR                  =  0;
      CONST EQRGN_NOTEQUAL               =  1;
      CONST EQRGN_EQUAL                  =  2;

      (* error return code for GpiSetRegion *)
      CONST HRGN_ERROR             =  HRGN(LONG(-1));

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>


            (*** main region functions *)
            PROCEDURE [APIENTRY] GpiCombineRegion(hps: HPS;
                                                                            hrgnDest: HRGN;
                                                                            hrgnSrc1: HRGN;
                                                                            hrgnSrc2: HRGN;
                                                                            lMode: LONG ): LONG;

            PROCEDURE [APIENTRY] GpiCreateRegion(hps: HPS;
                                                                          lCount: LONG;
                                                                          arclRectangles: PRECTL ): HRGN;

            PROCEDURE [APIENTRY] GpiDestroyRegion(hps: HPS;
                                                                            hrgn: HRGN ): BOOL;

            PROCEDURE [APIENTRY] GpiEqualRegion(hps: HPS;
                                                                        hrgnSrc1: HRGN;
                                                                        hrgnSrc2: HRGN ): LONG;

            PROCEDURE [APIENTRY] GpiOffsetRegion(hps: HPS;
                                                                          Hrgn: HRGN;
                                                                          pptlOffset: PPOINTL ): BOOL;

            PROCEDURE [APIENTRY] GpiPaintRegion(hps: HPS;
                                                                        hrgn: HRGN ): LONG;

            PROCEDURE [APIENTRY] GpiFrameRegion(hps: HPS;
                                                                        hrgn: HRGN;
                                                                        thickness: PSIZEL ): LONG;

            PROCEDURE [APIENTRY] GpiPtInRegion(hps: HPS;
                                                                      hrgn: HRGN;
                                                                      pptlPoint: PPOINTL ): LONG;

            PROCEDURE [APIENTRY] GpiQueryRegionBox(hps: HPS;
                                                                              hrgn: HRGN;
                                                                              prclBound: PRECTL ): LONG;

            PROCEDURE [APIENTRY] GpiQueryRegionRects(hps: HPS;
                                                                                  hrgn: HRGN;
                                                                                  prclBound: PRECTL;
                                                                                  prgnrcControl: PRGNRECT;
                                                                                  prclRect: PRECTL ): BOOL;

            PROCEDURE [APIENTRY] GpiRectInRegion(hps: HPS;
                                                                          hrgn: HRGN;
                                                                          prclRect: PRECTL ): LONG;

            PROCEDURE [APIENTRY] GpiSetRegion(hps: HPS;
                                                                    hrgn: HRGN;
                                                                    lcount: LONG;
                                                                    arclRectangles: PRECTL ): BOOL;

            (*** clip region functions *)
            PROCEDURE [APIENTRY] GpiSetClipRegion(hps: HPS;
                                                                            hrgn: HRGN;
                                                                            phrgnOld: PHRGN ): LONG;

      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


                  PROCEDURE [APIENTRY] GpiQueryClipRegion(hps: HPS ): HRGN;

                  PROCEDURE [APIENTRY] GpiQueryClipBox(hps: HPS;
                                                                                prclBound: PRECTL ): LONG;

      <* END *>


            PROCEDURE [APIENTRY] GpiExcludeClipRectangle(hps: HPS;
                                                                                          prclRectangle: PRECTL ): LONG;

            PROCEDURE [APIENTRY] GpiIntersectClipRectangle(hps: HPS;
                                                                                              prclRectangle: PRECTL ): LONG;

      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>


                  PROCEDURE [APIENTRY] GpiOffsetClipRegion(hps: HPS;
                                                                                        pptlPoint: PPOINTL ): LONG;

      <* END *>

   <* END *>

<* END *>
<* IF DEFINED (INCL_GPIMETAFILES)  THEN *>

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>

            (* constants for index values of options array for GpiPlayMetaFile *)
            CONST PMF_SEGBASE                  =  0;
            CONST PMF_LOADTYPE                 =  1;
            CONST PMF_RESOLVE                  =  2;
            CONST PMF_LCIDS                    =  3;
            CONST PMF_RESET                    =  4;
            CONST PMF_SUPPRESS                 =  5;
            CONST PMF_COLORTABLES              =  6;
            CONST PMF_COLORREALIZABLE          =  7;
            CONST PMF_DEFAULTS                 =  8;
            CONST PMF_DELETEOBJECTS            =  9;

            (* options for GpiPlayMetaFile *)
            CONST RS_DEFAULT                   =  0;
            CONST RS_NODISCARD                 =  1;
            CONST LC_DEFAULT                   =  0;
            CONST LC_NOLOAD                    =  1;
            CONST LC_LOADDISC                  =  3;
            CONST LT_DEFAULT                   =  0;
            CONST LT_NOMODIFY                  =  1;
            CONST LT_ORIGINALVIEW              =  4;
            CONST RES_DEFAULT                  =  0;
            CONST RES_NORESET                  =  1;
            CONST RES_RESET                    =  2;
            CONST SUP_DEFAULT                  =  0;
            CONST SUP_NOSUPPRESS               =  1;
            CONST SUP_SUPPRESS                 =  2;
            CONST CTAB_DEFAULT                 =  0;
            CONST CTAB_NOMODIFY                =  1;
            CONST CTAB_REPLACE                 =  3;
            CONST CTAB_REPLACEPALETTE          =  4;
            CONST CREA_DEFAULT                 =  0;
            CONST CREA_REALIZE                 =  1;
            CONST CREA_NOREALIZE               =  2;
            CONST CREA_DOREALIZE               =  3;

      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

                  CONST DDEF_DEFAULT                 =  0;
                  CONST DDEF_IGNORE                  =  1;
                  CONST DDEF_LOADDISC                =  3;
                  CONST DOBJ_DEFAULT                 =  0;
                  CONST DOBJ_NODELETE                =  1;
                  CONST DOBJ_DELETE                  =  2;
                  CONST RSP_DEFAULT                  =  0;
                  CONST RSP_NODISCARD                =  1;

      <* END *>

            (*** MetaFile functions *)

            PROCEDURE [APIENTRY] GpiCopyMetaFile(hmf: HMF ): HMF;

            PROCEDURE [APIENTRY] GpiDeleteMetaFile(hmf: HMF ): BOOL;

            PROCEDURE [APIENTRY] GpiLoadMetaFile(hab: HAB;
                                                                          pszFilename: PCSZ ): HMF;

            PROCEDURE [APIENTRY] GpiPlayMetaFile(hps: HPS;
                                                                          hmf: HMF;
                                                                          lCount1: LONG;
                                                                          alOptarray: PLONG;
                                                                          plSegCount: PLONG;
                                                                          lCount2: LONG;
                                                                          pszDesc: PCSZ ): LONG;

            PROCEDURE [APIENTRY] GpiQueryMetaFileBits(hmf: HMF;
                                                                                    lOffset: LONG;
                                                                                    lLength: LONG;
                                                                                    pbData: PBYTE ): BOOL;

            PROCEDURE [APIENTRY] GpiQueryMetaFileLength(hmf: HMF ): LONG;

            PROCEDURE [APIENTRY] GpiSaveMetaFile(hmf: HMF;
                                                                          pszFilename: PCSZ ): BOOL;

      <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

                  PROCEDURE [APIENTRY] GpiSetMetaFileBits(hmf: HMF;
                                                                                      lOffset: LONG;
                                                                                      lLength: LONG;
                                                                                      pbBuffer: PBYTE ): BOOL;
      <* END *>

   <* END *>

<* END *>

<* IF DEFINED (INCL_GPIDEFAULTS)  THEN *>

      (*** default functions *)

      PROCEDURE [APIENTRY] GpiQueryDefArcParams(hps: HPS;
                                                                              parcpArcParams: PARCPARAMS ): BOOL;

      PROCEDURE [APIENTRY] GpiQueryDefAttrs(hps: HPS;
                                                                      lPrimType: LONG;
                                                                      flAttrMask: ULONG;
                                                                      ppbunAttrs: PBUNDLE ): BOOL;

      PROCEDURE [APIENTRY] GpiQueryDefTag(hps: HPS;
                                                                  plTag: PLONG ): BOOL;

      PROCEDURE [APIENTRY] GpiQueryDefViewingLimits(hps: HPS;
                                                                                      prclLimits: PRECTL ): BOOL;

      PROCEDURE [APIENTRY] GpiSetDefArcParams(hps: HPS;
                                                                          parcpArcParams: PARCPARAMS ): BOOL;

      PROCEDURE [APIENTRY] GpiSetDefAttrs(hps: HPS;
                                                                  lPrimType: LONG;
                                                                  flAttrMask: ULONG;
                                                                  ppbunAttrs: PBUNDLE ): BOOL;

      PROCEDURE [APIENTRY] GpiSetDefTag(hps: HPS;
                                                              lTag: LONG ): BOOL;

      PROCEDURE [APIENTRY] GpiSetDefViewingLimits(hps: HPS;
                                                                                  prclLimits: PRECTL ): BOOL;


<* END *>

<* IF DEFINED (INCL_GPIPOLYGON)  THEN *>
      TYPE POLYGON = RECORD  (* plygn *)
            ulPoints: ULONG;
            aPointl:  PPOINTL;
      END;
      TYPE PPOLYGON = POINTER TO POLYGON;

      TYPE POLYSET = RECORD  (* plyst *)
            ulPolys:    ULONG;
            aPolygon:   ARRAY [0..0] OF POLYGON;
      END;
      TYPE PPOLYSET = POINTER TO POLYSET;

      (* control flags used by GpiPolygons *)
      CONST POLYGON_NOBOUNDARY                =  0;
      CONST POLYGON_BOUNDARY                = 00001H;

      CONST POLYGON_ALTERNATE                 =  0;
      CONST POLYGON_WINDING                 = 00002H;

      CONST POLYGON_INCL                      =  0;
      CONST POLYGON_EXCL                    = 00008H;

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>

            PROCEDURE [APIENTRY] GpiPolygons(hps: HPS;
                                                                ulCount: ULONG;
                                                                paplgn: PPOLYGON;
                                                                flOptions: ULONG;
                                                                flModel: ULONG ): LONG;

   <* END *>
<* END *>

<* IF DEFINED (INCL_GPIERRORS)  THEN *>
   
(* ------------- Include file: .\hm\pmerr.hm ------------- *)
(* ------------- This file we'll include late. EOF. --------------- *)

<* END *>


(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmgpi.hm ------------- *)

(* ------------- Include file: .\hm\pmdev.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMDEV.H
*
* OS/2 Presentation Manager Device Context constants; types and
* function declarations
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1992
*
* ===========================================================================
*
* The following symbols are used in this file for conditional sections.
*
*   CONST:                To include:
*
*   INCL_DEVERRORS          error definitions
*   INCL_DEV                Dev APIs and structures
*
* There is a symbol used in this file called INCL_DDIDEFS. This is used to
* include only the definitions for the DDI. The programmer using the GPI
* can ignore this symbol
*
* There is a symbol used in this file called INCL_SAADEFS. This is used to
* include only the definitions for the SAA. The programmer using the GPI
* can ignore this symbol
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)


<* NEW DEV_INCLUDED + *>


<* IF DEFINED (INCL_ERRORS)  THEN *>
   <* NEW INCL_DEVERRORS + *>
<* END *>

<* IF DEFINED (INCL_DDIDEFS)  THEN *>
   <* NEW INCL_DEV + *>
<* END *>

<* IF DEFINED (INCL_SAADEFS)  THEN *>
   <* NEW INCL_DEV + *>
<* END *>

<* IF DEFINED (INCL_DEV) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>

      (* General DEV return values *)
      CONST DEV_ERROR                     =  0;
      CONST DEV_OK                        =  1;

      (* DC type for DevOpenDC *)
      CONST OD_QUEUED                     =  2;
      CONST OD_DIRECT                     =  5;
      CONST OD_INFO                       =  6;
      CONST OD_METAFILE                   =  7;
      CONST OD_MEMORY                     =  8;
      CONST OD_METAFILE_NOQUERY           =  9;

      (* codes for DevQueryCaps *)
      CONST CAPS_FAMILY                   =  0;
      CONST CAPS_IO_CAPS                  =  1;
      CONST CAPS_TECHNOLOGY               =  2;
      CONST CAPS_DRIVER_VERSION           =  3;
      CONST CAPS_WIDTH                    =  4;      (* pels            *)
      CONST CAPS_HEIGHT                   =  5;      (* pels            *)
      CONST CAPS_WIDTH_IN_CHARS           =  6;
      CONST CAPS_HEIGHT_IN_CHARS          =  7;
      CONST CAPS_HORIZONTAL_RESOLUTION    =  8;      (* pels per meter  *)
      CONST CAPS_VERTICAL_RESOLUTION      =  9;      (* pels per meter  *)
      CONST CAPS_CHAR_WIDTH              =  10;      (* pels            *)
      CONST CAPS_CHAR_HEIGHT             =  11;      (* pels            *)
      CONST CAPS_SMALL_CHAR_WIDTH        =  12;      (* pels            *)
      CONST CAPS_SMALL_CHAR_HEIGHT       =  13;      (* pels            *)
      CONST CAPS_COLORS                  =  14;
      CONST CAPS_COLOR_PLANES            =  15;
      CONST CAPS_COLOR_BITCOUNT          =  16;
      CONST CAPS_COLOR_TABLE_SUPPORT     =  17;
      CONST CAPS_MOUSE_BUTTONS           =  18;
      CONST CAPS_FOREGROUND_MIX_SUPPORT  =  19;
      CONST CAPS_BACKGROUND_MIX_SUPPORT  =  20;
      CONST CAPS_DEVICE_WINDOWING        =  31;
      CONST CAPS_ADDITIONAL_GRAPHICS     =  32;
      CONST CAPS_VIO_LOADABLE_FONTS      =  21;
      CONST CAPS_WINDOW_BYTE_ALIGNMENT   =  22;
      CONST CAPS_BITMAP_FORMATS          =  23;
      CONST CAPS_RASTER_CAPS             =  24;
      CONST CAPS_MARKER_HEIGHT           =  25;      (* pels            *)
      CONST CAPS_MARKER_WIDTH            =  26;      (* pels            *)
      CONST CAPS_DEVICE_FONTS            =  27;
      CONST CAPS_GRAPHICS_SUBSET         =  28;
      CONST CAPS_GRAPHICS_VERSION        =  29;
      CONST CAPS_GRAPHICS_VECTOR_SUBSET  =  30;
      CONST CAPS_PHYS_COLORS             =  33;
      CONST CAPS_COLOR_INDEX             =  34;
      CONST CAPS_GRAPHICS_CHAR_WIDTH     =  35;
      CONST CAPS_GRAPHICS_CHAR_HEIGHT    =  36;
      CONST CAPS_HORIZONTAL_FONT_RES     =  37;
      CONST CAPS_VERTICAL_FONT_RES       =  38;
      CONST CAPS_DEVICE_FONT_SIM         =  39;
      CONST CAPS_LINEWIDTH_THICK         =  40;
      CONST CAPS_DEVICE_POLYSET_POINTS   =  41;

      (* Constants for CAPS_IO_CAPS *)
      CONST CAPS_IO_DUMMY                =   1;
      CONST CAPS_IO_SUPPORTS_OP          =   2;
      CONST CAPS_IO_SUPPORTS_IP          =   3;
      CONST CAPS_IO_SUPPORTS_IO          =   4;

      (* Constants for CAPS_TECHNOLOGY *)
      CONST CAPS_TECH_UNKNOWN            =   0;
      CONST CAPS_TECH_VECTOR_PLOTTER     =   1;
      CONST CAPS_TECH_RASTER_DISPLAY     =   2;
      CONST CAPS_TECH_RASTER_PRINTER     =   3;
      CONST CAPS_TECH_RASTER_CAMERA      =   4;
      CONST CAPS_TECH_POSTSCRIPT         =   5;

      (* Constants for CAPS_COLOR_TABLE_SUPPORT *)
      CONST CAPS_COLTABL_RGB_8           =   1;
      CONST CAPS_COLTABL_RGB_8_PLUS      =   2;
      CONST CAPS_COLTABL_TRUE_MIX        =   4;
      CONST CAPS_COLTABL_REALIZE         =   8;

      (* Constants for CAPS_FOREGROUND_MIX_SUPPORT *)
      CONST CAPS_FM_OR                   =   1;
      CONST CAPS_FM_OVERPAINT            =   2;
      CONST CAPS_FM_XOR                  =   8;
      CONST CAPS_FM_LEAVEALONE           =  16;
      CONST CAPS_FM_AND                  =  32;
      CONST CAPS_FM_GENERAL_BOOLEAN      =  64;

      (* Constants for CAPS_BACKGROUND_MIX_SUPPORT *)
      CONST CAPS_BM_OR                   =   1;
      CONST CAPS_BM_OVERPAINT            =   2;
      CONST CAPS_BM_XOR                  =   8;
      CONST CAPS_BM_LEAVEALONE           =  16;
      CONST CAPS_BM_AND                  =  32;
      CONST CAPS_BM_GENERAL_BOOLEAN      =  64;
      CONST CAPS_BM_SRCTRANSPARENT       = 128;
      CONST CAPS_BM_DESTTRANSPARENT      = 256;

      (* Constants for CAPS_DEVICE_WINDOWING *)
      CONST CAPS_DEV_WINDOWING_SUPPORT   =   1;

      (* Constants for CAPS_ADDITIONAL_GRAPHICS *)
      CONST CAPS_VDD_DDB_TRANSFER         =   1;
      CONST CAPS_GRAPHICS_KERNING_SUPPORT =   2;
      CONST CAPS_FONT_OUTLINE_DEFAULT     =   4;
      CONST CAPS_FONT_IMAGE_DEFAULT       =   8;
      (* bits represented by values 16L and 32L are reserved *)
      CONST CAPS_SCALED_DEFAULT_MARKERS   =  64;
      CONST CAPS_COLOR_CURSOR_SUPPORT     = 128;
      CONST CAPS_PALETTE_MANAGER          = 256;
      CONST CAPS_COSMETIC_WIDELINE_SUPPORT= 512;
      CONST CAPS_DIRECT_FILL            =  1024;
      CONST CAPS_REBUILD_FILLS          =  2048;
      CONST CAPS_CLIP_FILLS             =  000001000H; (* 4096L  *)
      CONST CAPS_ENHANCED_FONTMETRICS   =  000002000H; (* 8192L  *)
      CONST CAPS_TRANSFORM_SUPPORT      =  000004000H; (* 16384L *)

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            (* Constants for CAPS_WINDOW_BYTE_ALIGNMENT *)
            CONST CAPS_BYTE_ALIGN_REQUIRED      =  0;
            CONST CAPS_BYTE_ALIGN_RECOMMENDED   =  1;
            CONST CAPS_BYTE_ALIGN_NOT_REQUIRED  =  2;
   <* END *>

      (* Constants for CAPS_RASTER_CAPS *)
      CONST CAPS_RASTER_BITBLT           =   1;
      CONST CAPS_RASTER_BANDING          =   2;
      CONST CAPS_RASTER_BITBLT_SCALING   =   4;
      CONST CAPS_RASTER_SET_PEL          =  16;
      CONST CAPS_RASTER_FONTS            =  32;
      CONST CAPS_RASTER_FLOOD_FILL       =  64;

   <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>

            PROCEDURE [APIENTRY] DevOpenDC(hab: HAB;
                                                            lType: LONG;
                                                            pszToken: PCSZ;
                                                            lCount: LONG;
                                                            pdopData: PDEVOPENDATA;
                                                            hdcComp: HDC ): HDC;

            PROCEDURE [APIENTRY] DevCloseDC(hdc: HDC ): HMF;

            PROCEDURE [APIENTRY] DevQueryCaps(hdc: HDC;
                                                                    lStart: LONG;
                                                                    lCount: LONG;
                                                                    alArray: PLONG ): BOOL;
   <* END *>

<* END *>

<* IF DEFINED (INCL_DEV)  THEN *>

   <* IF NOT DEFINED (INCL_SAADEFS)  THEN *>

            (* structures for DEVESC_QUERYVIOCELLSIZES *)
            TYPE VIOSIZECOUNT = RECORD   (* vios *)
                  maxcount: LONG;
                  count:    LONG;
            END;
            TYPE VPIOSIZECOUNT = POINTER TO VIOSIZECOUNT;

            TYPE VIOFONTCELLSIZE = RECORD   (* viof *)
                  cx: LONG;
                  cy: LONG;
            END;
            TYPE PVIOFONTCELLSIZE = POINTER TO VIOFONTCELLSIZE;

            (* structure for DEVESC_GETSCALINGFACTOR *)
            TYPE SFACTORS = RECORD   (* sfactors *)
                  x: LONG;
                  y: LONG;
            END;
            TYPE PSFACTORS = POINTER TO SFACTORS;

            (* structure for DEVESC_NEXTBAND *)
            TYPE BANDRECT = RECORD   (* bandrect *)
                  xleft:   LONG;
                  ybottom: LONG;
                  xright:  LONG;
                  ytop:    LONG;
            END;
            TYPE PBANDRECT = POINTER TO BANDRECT;

            (* return codes for DevEscape *)
            CONST DEVESC_ERROR               =   (-1);
            CONST DEVESC_NOTIMPLEMENTED      =     0;

            (* codes for DevEscape *)
            CONST DEVESC_QUERYESCSUPPORT     =     0;
            CONST DEVESC_GETSCALINGFACTOR    =     1;
            CONST DEVESC_QUERYVIOCELLSIZES   =     2;
            CONST DEVESC_GETCP               =  8000;

            CONST DEVESC_STARTDOC            =  8150;
            CONST DEVESC_ENDDOC              =  8151;
            CONST DEVESC_NEXTBAND            =  8152;
            CONST DEVESC_ABORTDOC            =  8153;

            CONST DEVESC_NEWFRAME            = 16300;
            CONST DEVESC_DRAFTMODE           = 16301;
            CONST DEVESC_FLUSHOUTPUT         = 16302;
            CONST DEVESC_RAWDATA             = 16303;
            CONST DEVESC_SETMODE             = 16304;

            CONST DEVESC_DBE_FIRST           = 24450;
            CONST DEVESC_DBE_LAST            = 24455;

            (* DevEscape codes for adding extra space to character strings *)
            CONST DEVESC_CHAR_EXTRA          = 16998;
            CONST DEVESC_BREAK_EXTRA         = 16999;

            (* codes for DevEscape PM_Q_ESC spool files *)
            CONST DEVESC_STD_JOURNAL         = 32600;

            (* structure for DEVESC_SETMODE *)
            TYPE ESCMODE = RECORD    (* em *)
                  mode:     ULONG;
                  modedata: ARRAY [0..0] OF BYTE;
            END;
            TYPE PESCMODE = POINTER TO ESCMODE;

            (* return codes for DevPostDeviceModes *)
            CONST DPDM_ERROR                 =   (-1);
            CONST DPDM_NONE                  =     0;

            (* codes for DevPostDeviceModes *)
            CONST DPDM_POSTJOBPROP           =     0;
            CONST DPDM_CHANGEPROP            =     1;
            CONST DPDM_QUERYJOBPROP          =     2;

            (* string types for DevQueryDeviceNames *)
            TYPE STR16  = ARRAY [0..15] OF CHAR;     (* str16 *)
            TYPE PSTR16 = POINTER TO STR16;
            TYPE STR32  = ARRAY [0..31] OF CHAR;     (* str32 *)
            TYPE PSTR32 = POINTER TO STR32;
            TYPE STR64  = ARRAY [0..63] OF CHAR;     (* str64 *)
            TYPE PSTR64 = POINTER TO STR64;

            (* return code for DevQueryHardcopyCaps *)
            CONST DQHC_ERROR                 =   (-1);

            (* codes for DevQueryHardcopyCaps *)
            CONST HCAPS_CURRENT              =     1;
            CONST HCAPS_SELECTABLE           =     2;

            (* structure for DevQueryHardcopyCaps *)
            TYPE HCINFO = RECORD          (* hci *)
                  szFormname:   ARRAY [0..31] OF CHAR;
                  cx:           LONG;
                  cy:           LONG;
                  xLeftClip:    LONG;
                  yBottomClip:  LONG;
                  xRightClip:   LONG;
                  yTopClip:     LONG;
                  xPels:        LONG;
                  yPels:        LONG;
                  flAttributes: LONG;
            END;
            TYPE PHCINFO = POINTER TO HCINFO;

            (* Device Context Functions *)
      <* IF NOT DEFINED (INCL_DDIDEFS)  THEN *>

                  PROCEDURE [APIENTRY] DevEscape(hdc: HDC;
                                                                    lCode: LONG;
                                                                    lInCount: LONG;
                                                                    pbInData: PBYTE;
                                                                    plOutCount: PLONG;
                                                                    pbOutData: PBYTE ): LONG;

                  PROCEDURE [APIENTRY] DevQueryDeviceNames(hab: HAB;
                                                                                        pszDriverName: PCSZ;
                                                                                        pldn: PLONG;
                                                                                        aDeviceName: PSTR32;
                                                                                        aDeviceDesc: PSTR64;
                                                                                        pldt: PLONG;
                                                                                        aDataType: PSTR16 ): BOOL;

                  PROCEDURE [APIENTRY] DevQueryHardcopyCaps(hdc: HDC;
                                                                                          lStartForm: LONG;
                                                                                          lForms: LONG;
                                                                                          phciHcInfo: PHCINFO ): LONG;

                  PROCEDURE [APIENTRY] DevPostDeviceModes(hab: HAB;
                                                                                      pdrivDriverData : PDRIVDATA;
                                                                                      pszDriverName: PCSZ;
                                                                                      pszDeviceName: PCSZ;
                                                                                      pszName: PCSZ;
                                                                                      flOptions: ULONG ): LONG;

      <* END *>
   <* END *>
<* END *>

<* IF DEFINED (INCL_DEVERRORS)  THEN *>
      (* AAB error codes for the DEV - same as GPI errors at present *)
<* END *>

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmdev.hm ------------- *)

(* ------------- Include file: .\hm\pmwp.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMWP.H
*
* OS/2 Presentation Manager Workplace include file.
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1992
*
* ===========================================================================
*
* The folowing symbols are used in this file for conditional sections.
*
*   CONST:                To include:
*
*   INCL_WINWORKPLACE       All of Workplace Shell
*   INCL_WPCLASS            Workplace object class API's
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)

(* NOINC *)
<* IF NOT DEFINED (PMWP_INCLUDED)  THEN *>
      (* INC *)
   <* NEW PMWP_INCLUDED + *>

   <* IF DEFINED (INCL_WINWORKPLACE)  THEN *>
      <* NEW INCL_WPCLASS + *>
   <* END *>

      (*** Common types *******************************************************)

      TYPE HOBJECT = LHANDLE ;

      (*** Object management calls ********************************************)
   <* IF DEFINED (INCL_WPCLASS) OR NOT DEFINED (INCL_NOCOMMON)  THEN *>
            (*** Standard object classes *****************************************)


            CONST CCHMAXCLASS       =       3;     (* Length of a classname     *)

            CONST QC_First          =       0;     (* Codes for OA_QueryContent *)
            CONST QC_Next           =       1;
            CONST QC_Last           =       2;
            CONST QC_FIRST          =    QC_First;
            CONST QC_NEXT           =    QC_Next;
            CONST QC_LAST           =    QC_Last;

            (*** An object's appearance (icon or bitmap or outline) **************)

            TYPE OBJECTIMAGE = RECORD    (* oimg *)
                  hptrObject: HPOINTER ;
            END;
            TYPE POBJECTIMAGE = POINTER TO OBJECTIMAGE;

            (*** Class info structure returned by WinEnumObjectClasses ***********)
            TYPE POBJCLASS = POINTER TO OBJCLASS;
            TYPE OBJCLASS = RECORD        (* ocls *)
                  pNext:        POBJCLASS;           (* Null for the last structure.. *)
                  pszClassName: PSZ;                 (* Class name                    *)
                  pszModName:   PSZ;                 (* Module name                   *)
            END;


            (*** Workplace object management functions ***************************)

            PROCEDURE [APIENTRY] WinRegisterObjectClass(pszClassName: PCSZ ;
                                                                                      pszModName: PCSZ ): BOOL ;

            PROCEDURE [APIENTRY] WinDeregisterObjectClass(pszClassName: PCSZ ): BOOL ;

            PROCEDURE [APIENTRY] WinReplaceObjectClass(pszOldClassName: PCSZ ;
                                                                                    pszNewClassName: PCSZ ;
                                                                                    fReplace: BOOL ): BOOL ;

            PROCEDURE [APIENTRY] WinEnumObjectClasses(pObjClass: POBJCLASS ;
                                                                                  pulSize: PULONG ): BOOL ;

            PROCEDURE [APIENTRY] WinCreateObject(pszClassName: PCSZ ;
                                                                              pszTitle: PCSZ ;
                                                                              pszSetupString: PCSZ ;
                                                                              pszLocation: PCSZ ;
                                                                              ulFlags : ULONG ): HOBJECT ;
            CONST CO_FAILIFEXISTS    = 0;
            CONST CO_REPLACEIFEXISTS = 1;
            CONST CO_UPDATEIFEXISTS  = 2;

            PROCEDURE [APIENTRY] WinSetObjectData(hObject: HOBJECT ;
                                                                          pszSetupString: PCSZ ): BOOL ;

            PROCEDURE [APIENTRY] WinDestroyObject(hObject: HOBJECT ): BOOL ;

            PROCEDURE [APIENTRY] WinQueryObject(pszObjectID: PCSZ ): HOBJECT ;

   <* END *>

      (*** Error codes ********************************************************)
   <* NEW INCL_WPERRORS + *>
      --#include <pmerr.h>

      (*** Object settings notebook page insertion structure ******************)

      TYPE PAGEINFO = RECORD    (* pginf *)
            cb:                 ULONG   ;
            hwndPage:           HWND    ;
            pfnwp:              PFNWP   ;
            resid:              ULONG   ;
            pCreateParams:      PVOID   ;
            dlgid:              USHORT  ;
            usPageStyleFlags:   USHORT  ;
            usPageInsertFlags:  USHORT  ;
            usSettingsFlags:    USHORT  ;
            pszName:            PSZ     ;
            idDefaultHelpPanel: USHORT  ;
            usReserved2:        USHORT  ;
            pszHelpLibraryName: PSZ     ;
            pHelpSubtable:      PUSHORT ; (* PHELPSUBTABLE when PMHELP.H is included*)
            hmodHelpSubtable:   HMODULE ;
            ulPageInsertId:     ULONG   ;
      END;
      TYPE PPAGEINFO = POINTER TO PAGEINFO;

      CONST  SETTINGS_PAGE_NUMBERS   =  001H;

      (*** Utility apis +******************************************************)

   <* IF NOT DEFINED (INCL_NOCOMMON)  THEN *>
            TYPE ICONPOS = RECORD    (* icp *)
                  ptlIcon:    POINTL;                                (*  Location *)
                  szIdentity: ARRAY [0..0] OF CHAR;       (* Object identity string *)
            END;
            TYPE PICONPOS = POINTER TO ICONPOS;

            (*********************************************************************)
      <* IF DEFINED (INCL_WINPOINTERS)  THEN *>
                  PROCEDURE [APIENTRY] WinSetFileIcon(pszFileName: PCSZ ;
                                                                            pIcnInfo: PICONINFO ): BOOL ;
      <* END *>
            PROCEDURE [APIENTRY] WinFreeFileIcon(hptr: HPOINTER ): BOOL ;

            PROCEDURE [APIENTRY] WinLoadFileIcon(pszFileName: PCSZ ;
                                                                                fPrivate: BOOL ): HPOINTER ;

            PROCEDURE [APIENTRY] WinStoreWindowPos(pszAppName: PCSZ ;
                                                                            pszKeyName: PCSZ ;
                                                                            hwnd: HWND ): BOOL ;

            PROCEDURE [APIENTRY] WinRestoreWindowPos(pszAppName: PCSZ ;
                                                                                pszKeyName: PCSZ ;
                                                                                hwnd: HWND ): BOOL ;

            PROCEDURE [APIENTRY] WinShutdownSystem(hab: HAB ;
                                                                            hmq: HMQ ): BOOL ;
   <* END *>

      (* NOINC *)
<* END *>
(* INC *)

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmwp.hm ------------- *)

<* IF DEFINED(__NEWER_DEFINED_NAME) THEN *> (* it was '#if' 0 in the source text *)
<* IF DEFINED (INCL_AVIO)  THEN *>
   
(* ------------- Include file: .\hm\pmavio.hm ------------- *)
<* IF DEFINED(__NEWER_DEFINED_NAME) THEN *> (* it was '#if' 0 in the source text *)
(****************************** Module Header ******************************\
*
* Module Name: PMAVIO.H
*
* OS/2 Presentation Manager AVIO constants; types and function declarations
*
* Copyright (c) International Business Machines Corporation 1981; 1988-1992
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)

<* NEW AVIO_INCLUDED + *>


TYPE HVPS  = USHORT;             (* hpvs *)
TYPE PHVPS = POINTER TO HVPS;    (* phpvs *)

PROCEDURE [APIENTRY16] VIO16ASSOCIATE(hdc: HDC ;
                                                                hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16CREATELOGFONT(pfatattrs: PFATTRS ;
                                                                        llcid: LONG ;
                                                                        pName: PSTR8 ;
                                                                        hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16CREATEPS(phvps: PHVPS ;
                                                              sdepth: SHORT ;
                                                              swidth: SHORT ;
                                                              sFormat: SHORT ;
                                                              sAttrs: SHORT ;
                                                              hvpsReserved: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16DELETESETID(llcid: LONG ;
                                                                    hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16DESTROYPS(hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16GETDEVICECELLSIZE(psHeight: PSHORT ;
                                                                                psWidth: PSHORT ;
                                                                                hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16GETORG(psRow: PSHORT ;
                                                          psColumn: PSHORT ;
                                                          hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16QUERYFONTS(plRemfonts: PLONG ;
                                                                  afmMetrics: PFONTMETRICS ;
                                                                  lMetricsLength: LONG ;
                                                                  plFonts: PLONG ;
                                                                  pszFacename: PSZ ;
                                                                  flOptions: ULONG ;
                                                                  hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16QUERYSETIDS(allcids: PLONG ;
                                                                    pNames: PSTR8 ;
                                                                    alTypes: PLONG ;
                                                                    lcount: LONG ;
                                                                    hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16SETDEVICECELLSIZE(sHeight: SHORT ;
                                                                                sWidth: SHORT ;
                                                                                hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16SETORG(sRow: SHORT ;
                                                          sColumn: SHORT ;
                                                          hvps: HVPS ): USHORT  ;

PROCEDURE [APIENTRY16] VIO16SHOWPS(sDepth: SHORT ;
                                                          sWidth: SHORT ;
                                                          soffCell: SHORT ;
                                                          hvps: HVPS ): USHORT  ;

(************************ Public Function *******************************
* WinDefAVioWindowProc -- Default message processing for AVio PS's
************************************************************************)
(* mp1 and mp2 are defined as ULONG because MPARAM is a pointer type and *)
(* 32-bit compilers will thunk pointer types passed to 16-bit routines.  *)
(* This is not what is desired for WM_SIZE processing so we will declare *)
(* the function with ULONGs; non-pointer types.                          *)

PROCEDURE [APIENTRY16] WIN16DEFAVIOWINDOWPROC(hwnd: HWND ;
                                                                                msg: USHORT ;
                                                                                mp1: ULONG ;
                                                                                mp2: ULONG ): MRESULT ;

CONST Vio16Associate        = VIO16ASSOCIATE;
CONST Vio16CreateLogFont    = VIO16CREATELOGFONT;
CONST Vio16CreatePS         = VIO16CREATEPS;
CONST Vio16DeleteSetId      = VIO16DELETESETID;
CONST Vio16DestroyPS        = VIO16DESTROYPS;
CONST Vio16GetDeviceCellSize= VIO16GETDEVICECELLSIZE;
CONST Vio16GetOrg           = VIO16GETORG;
CONST Vio16QueryFonts       = VIO16QUERYFONTS;
CONST Vio16QuerySetIds      = VIO16QUERYSETIDS;
CONST Vio16SetDeviceCellSize= VIO16SETDEVICECELLSIZE;
CONST Vio16SetOrg           = VIO16SETORG;
CONST Vio16ShowPS           = VIO16SHOWPS;
CONST Win16DefAVioWindowProc= WIN16DEFAVIOWINDOWPROC;

CONST VioAssociate          = VIO16ASSOCIATE;
CONST VioCreateLogFont      = VIO16CREATELOGFONT;
CONST VioCreatePS           = VIO16CREATEPS;
CONST VioDeleteSetId        = VIO16DELETESETID;
CONST VioDestroyPS          = VIO16DESTROYPS;
CONST VioGetDeviceCellSize  = VIO16GETDEVICECELLSIZE;
CONST VioGetOrg             = VIO16GETORG;
CONST VioQueryFonts         = VIO16QUERYFONTS;
CONST VioQuerySetIds        = VIO16QUERYSETIDS;
CONST VioSetDeviceCellSize  = VIO16SETDEVICECELLSIZE;
CONST VioSetOrg             = VIO16SETORG;
CONST VioShowPS             = VIO16SHOWPS;
CONST WinDefAVioWindowProc  = WIN16DEFAVIOWINDOWPROC;

(**************************** end of file **********************************)
<* END *>

(* ------------- End of file:  .\hm\pmavio.hm ------------- *)
<* END *>
<* END *>

<* IF DEFINED (INCL_SPL)  THEN *>
   
(* ------------- Include file: .\hm\pmspl.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMSPL.H
*
* OS/2 Presentation Manager Spooler constants, types and function declarations
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1993
*
* ===========================================================================
*
* The following symbols are used in this file for conditional sections.
*
*   CONST:                To include:
*
*   INCL_SPLERRORS          defined if INCL_ERRORS defined
*   INCL_SPLFSE             file system emulation calls
*   INCL_SPLDOSPRINT        DosPrint APIs
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)

<* IF NOT DEFINED (PMSPL_INCLUDED)  THEN *>
      (* XLATON *)
   <* NEW PMSPL_INCLUDED + *>



      (* XLATOFF *)
      (* XLATON *)

      (*** if error definitions are required then allow Spooler errors ********)
   <* IF DEFINED (INCL_ERRORS)  THEN *>
      <* NEW INCL_SPLERRORS + *>
   <* END *>

      (*** Names of various OS2SYS.INI spooler variables **********************)

      CONST SPL_INI_SPOOLER       =  "PM_SPOOLER"                ;
      CONST SPL_INI_QUEUE         =  "PM_SPOOLER_QUEUE"          ;
      CONST SPL_INI_PRINTER       =  "PM_SPOOLER_PRINTER"        ;
      CONST SPL_INI_PRINTERDESCR  =  "PM_SPOOLER_PRINTER_DESCR"  ;
      CONST SPL_INI_QUEUEDESCR    =  "PM_SPOOLER_QUEUE_DESCR"    ;
      CONST SPL_INI_QUEUEDD       =  "PM_SPOOLER_QUEUE_DD"       ;
      CONST SPL_INI_QUEUEDDDATA   =  "PM_SPOOLER_QUEUE_DDDATA"   ;

      (*** General SPL return values ******************************************)
      CONST SPL_ERROR   =  0;
      CONST SPL_OK      =  1;

      (*** handle to a spool file *********************************************)
      TYPE HSPL = LHANDLE;               (* hspl *)

      (* Used in recording of PM_Q_STD data via SplStdxxx calls *)
      TYPE HSTD  = LHANDLE;               (* hstd *)
      TYPE PHSTD = POINTER TO HSTD;

      (*** spooler manager open data ******************************************)
      TYPE PQMOPENDATA = POINTER TO PSZ;       (* pqmdop *)


      (*** Spooler Queue Processor interface **********************************)

      (* control codes for SplQpControl *)
      CONST SPLC_ABORT    = 1;
      CONST SPLC_PAUSE    = 2;
      CONST SPLC_CONTINUE = 3;

      (* flag defines for optional SplQpQueryFlags           *)
      (* set this to allow spooler to bypass Queue Processor *)
      (* for PM_Q_RAW jobs.  This allows print while a job   *)
      (* is still spooling.                                  *)
      CONST QP_RAWDATA_BYPASS = 000000001H;

      (*** handle to a spooler queue processor ********************************)
      TYPE HPROC = LHANDLE;              (* hproc *)

      (*** spooler processor open data ****************************************)
      TYPE PQPOPENDATA = POINTER TO PSZ;       (* pqpdop *)

      (*** Spooler Queue Processor interface **********************************)
      (* API's exported by Queue Processor DLL's                              *)
      PROCEDURE [EXPENTRY] SplQpOpen(cData: LONG;
      pQPDataIn: PQPOPENDATA ): HPROC ;

      PROCEDURE [EXPENTRY] SplQpPrint(hproc: HPROC;
      pszFileName: PCSZ): BOOL  ;

      PROCEDURE [EXPENTRY] SplQpClose(hproc: HPROC ): BOOL  ;

      PROCEDURE [EXPENTRY] SplQpControl(hproc: HPROC;
      cmdCode: LONG  ): BOOL  ;

      PROCEDURE [EXPENTRY] SplQpQueryDt(pcDataType: PLONG;
      paszDataTypes: PPCSZ): BOOL  ;

      PROCEDURE [EXPENTRY] SplQpInstall(hwnd: HWND ): BOOL  ;

      (* The next API is optionally exported by Queue Processors *)
      (* The flags may be set to QP_RAWDATA_BYPASS to allow the  *)
      (* spooler to print the job while spooling, bypassing this *)
      (* queue processor                                         *)

      PROCEDURE [EXPENTRY] SplQpQueryFlags(pulFlags: PULONG ): BOOL  ;

      (*************************************************************************
      * There are two definitions governing the QpOpen data block :-
      * 1) the original  QPOPENDATA, which is used as
      *    an array of PSZ and has a list of associated QPDAT defines
      *    for accessing elements of the array. This has been extended
      *    from 6 to 12 elements. The last element is a numeric type
      *    and cannot satisfactorily be accessed via array indexing.
      *
      * 2) a new SQPOPENDATA structure (see below)
      *
      * The old defn has been retained to support existing QProcs.
      *
      *************************************************************************)

      (*** Definition for elements within the PQPOPENDATA block ***************)
      CONST QPDAT_ADDRESS     =0;
      CONST QPDAT_DRIVER_NAME =1;
      CONST QPDAT_DRIVER_DATA =2;
      CONST QPDAT_DATA_TYPE   =3;
      CONST QPDAT_COMMENT     =4;
      CONST QPDAT_PROC_PARAMS =5;
      CONST QPDAT_SPL_PARAMS  =6;     (* SplQmOpen Spooler params **       *)
      CONST QPDAT_NET_PARAMS  =7;     (* SplQmOpen Network params **       *)
      CONST QPDAT_DOC_NAME    =8;     (* SplQmStartDoc name       **       *)
      CONST QPDAT_QUEUE_NAME  =9;     (* Queue name for job       **       *)
      CONST QPDAT_TOKEN      =10;     (* SplQmOpen token name     **       *)
      CONST QPDAT_JOBID      =11;     (* SQM job identity         **       *)

      TYPE SQPOPENDATA = RECORD      (* SplQpOpenData *)
            pszLogAddress:    PSZ;
            pszDriverName:    PSZ;
            pdriv:            PDRIVDATA;
            pszDataType:      PSZ;
            pszComment:       PSZ;
            pszProcParams:    PSZ;
            pszSpoolParams:   PSZ;
            pszNetworkParams: PSZ;
            pszDocName:       PSZ;
            pszQueueName:     PSZ;
            pszToken:         PSZ;
            idJobId:          USHORT;
      END;
      TYPE PSQPOPENDATA = POINTER TO SQPOPENDATA; (* ptr to SQPOPENDATA *)


      (*************************************************************************
      *** Error information and return codes
      *************************************************************************)

      (* Error information for SplMessageBox *)
      CONST SPLINFO_QPERROR     =  00001H;
      CONST SPLINFO_DDERROR     =  00002H;
      CONST SPLINFO_SPLERROR    =  00004H;
      CONST SPLINFO_OTHERERROR  =  00080H;
      CONST SPLINFO_INFORMATION =  00100H;
      CONST SPLINFO_WARNING     =  00200H;
      CONST SPLINFO_ERROR       =  00400H;
      CONST SPLINFO_SEVERE      =  00800H;
      CONST SPLINFO_USERINTREQD =  01000H;

      (* Error Data for SplMessageBox *)
      CONST SPLDATA_PRINTERJAM  =  00001H;
      CONST SPLDATA_FORMCHGREQD =  00002H;
      CONST SPLDATA_CARTCHGREQD =  00004H;
      CONST SPLDATA_PENCHGREQD  =  00008H;
      CONST SPLDATA_DATAERROR   =  00010H;
      CONST SPLDATA_UNEXPECTERROR= 00020H;
      CONST SPLDATA_OTHER       =  08000H;

      (* return code for fSplStdQueryLength *)
      CONST SSQL_ERROR = (-1);

   <* IF DEFINED (INCL_SPLERRORS)  THEN *>
      
(* ------------- Include file: .\hm\pmerr.hm ------------- *)
(* ------------- This file we'll include late. EOF. --------------- *)

   <* END *>

      TYPE SPLERR = SYSTEM.CARD32;

   <* IF DEFINED (INCL_SPLDOSPRINT)  THEN *>
            (* length for character arrays in structs (excluding zero terminator) *)
            CONST CNLEN         =  15;            (* Computer name length      *)
            CONST UNLEN         =  20;            (* Maximum user name length  *)
            CONST QNLEN         =  12;            (* Queue name maximum length *)
            CONST PDLEN         =   8;            (* Print destination length  *)
            CONST DTLEN         =   9;            (* Spool file data type      *)
            (* e.g. PM_Q_STD,PM_Q_RAW    *)
            CONST QP_DATATYPE_SIZE      =  15;    (* returned by SplQpQueryDt  *)
            CONST DRIV_DEVICENAME_SIZE  =  31;    (* see DRIVDATA struc        *)
            CONST DRIV_NAME_SIZE        =   8;    (* name of device driver     *)
            CONST PRINTERNAME_SIZE      =  32;    (* max printer name length   *)
            CONST FORMNAME_SIZE         =  31;    (* max form name length      *)
            CONST MAXCOMMENTSZ          =  48;    (* queue comment length      *)

            TYPE DRIVPROPS = RECORD     (* dprop *)
                  pszKeyName: PSZ;
                  cbBuf:      ULONG;
                  pBuf:       PVOID;
            END;
            TYPE PDRIVPROPS  = POINTER TO DRIVPROPS;
            TYPE NPDRIVPROPS = POINTER TO DRIVPROPS;

            TYPE PRJINFO = RECORD     (* prj1 *)
                  uJobId:       USHORT;
                  szUserName:   ARRAY [0..UNLEN] OF CHAR;
                  pad_1:        CHAR;
                  szNotifyName: ARRAY [0..CNLEN] OF CHAR;
                  szDataType:   ARRAY [0..DTLEN] OF CHAR;
                  pszParms:     PSZ;
                  uPosition:    USHORT;
                  fsStatus:     USHORT;
                  pszStatus:    PSZ;
                  ulSubmitted:  ULONG;
                  ulSize:       ULONG;
                  pszComment:   PSZ;
            END;
            TYPE PPRJINFO  = POINTER TO PRJINFO;
            TYPE NPPRJINFO = POINTER TO PRJINFO;

            TYPE PRJINFO2 = RECORD     (* prj2 *)
                  uJobId:       USHORT;
                  uPriority:    USHORT;
                  pszUserName:  PSZ;
                  uPosition:    USHORT;
                  fsStatus:     USHORT;
                  ulSubmitted:  ULONG;
                  ulSize:       ULONG;
                  pszComment:   PSZ;
                  pszDocument:  PSZ;
            END;
            TYPE PPRJINFO2  = POINTER TO PRJINFO2;
            TYPE NPPRJINFO2 = POINTER TO PRJINFO2;

            TYPE PRJINFO3 = RECORD     (* prj *)
                  uJobId:         USHORT;
                  uPriority:      USHORT;
                  pszUserName:    PSZ;
                  uPosition:      USHORT;
                  fsStatus:       USHORT;
                  ulSubmitted:    ULONG;
                  ulSize:         ULONG;
                  pszComment:     PSZ;
                  pszDocument:    PSZ;
                  pszNotifyName:  PSZ;
                  pszDataType:    PSZ;
                  pszParms:       PSZ;
                  pszStatus:      PSZ;
                  pszQueue:       PSZ;
                  pszQProcName:   PSZ;
                  pszQProcParms:  PSZ;
                  pszDriverName:  PSZ;
                  pDriverData:    PDRIVDATA;
                  pszPrinterName: PSZ;
            END;
            TYPE PPRJINFO3  = POINTER TO PRJINFO3;
            TYPE NPPRJINFO3 = POINTER TO PRJINFO3;

            TYPE PRDINFO = RECORD      (* prd1 *)
                  szName:       ARRAY [0..PDLEN] OF CHAR;
                  szUserName:   ARRAY [0..UNLEN] OF CHAR;
                  uJobId:       USHORT;
                  fsStatus:     USHORT;
                  pszStatus:    PSZ;
                  time:         USHORT;
            END;
            TYPE PPRDINFO  = POINTER TO PRDINFO;
            TYPE NPPRDINFO = POINTER TO PRDINFO;

            TYPE PRDINFO3 = RECORD     (* prd *)
                  pszPrinterName:  PSZ;
                  pszUserName:     PSZ;
                  pszLogAddr:      PSZ;
                  uJobId:          USHORT;
                  fsStatus:        USHORT;
                  pszStatus:       PSZ;
                  pszComment:      PSZ;
                  pszDrivers:      PSZ;
                  time:            USHORT;
                  usTimeOut:       USHORT;
            END;
            TYPE PPRDINFO3  = POINTER TO PRDINFO3;
            TYPE NPPRDINFO3 = POINTER TO PRDINFO3;

            TYPE PRQINFO = RECORD     (* prq1 *)
                  szName:           ARRAY [0..QNLEN] OF CHAR;
                  pad_1:            CHAR;
                  uPriority:        USHORT;
                  uStartTime:       USHORT;
                  uUntilTime:       USHORT;
                  pszSepFile:       PSZ;
                  pszPrProc:        PSZ;
                  pszDestinations:  PSZ;
                  pszParms:         PSZ;
                  pszComment:       PSZ;
                  fsStatus:         USHORT;
                  cJobs:            USHORT;
            END;
            TYPE PPRQINFO  = POINTER TO PRQINFO;
            TYPE NPPRQINFO = POINTER TO PRQINFO;

            TYPE PRQINFO3 = RECORD    (* prq *)
                  pszName:         PSZ;
                  uPriority:       USHORT;
                  uStartTime:      USHORT;
                  uUntilTime:      USHORT;
                  fsType:          USHORT;
                  pszSepFile:      PSZ;
                  pszPrProc:       PSZ;
                  pszParms:        PSZ;
                  pszComment:      PSZ;
                  fsStatus:        USHORT;
                  cJobs:           USHORT;
                  pszPrinters:     PSZ;
                  pszDriverName:   PSZ;
                  pDriverData:     PDRIVDATA;
            END;
            TYPE PPRQINFO3  = POINTER TO PRQINFO3;
            TYPE NPPRQINFO3 = POINTER TO PRQINFO3;

            TYPE PRQINFO6 = RECORD    (* prq6 *)
                  pszName:           PSZ;
                  uPriority:         USHORT;
                  uStartTime:        USHORT;
                  uUntilTime:        USHORT;
                  fsType:            USHORT;
                  pszSepFile:        PSZ;
                  pszPrProc:         PSZ;
                  pszParms:          PSZ;
                  pszComment:        PSZ;
                  fsStatus:          USHORT;
                  cJobs:             USHORT;
                  pszPrinters:       PSZ;
                  pszDriverName:     PSZ;
                  pDriverData:       PDRIVDATA;
                  pszRemoteComputerName: PSZ;
                  pszRemoteQueueName: PSZ;
            END;
            TYPE PPRQINFO6  = POINTER TO PRQINFO6;
            TYPE NPPRQINFO6 = POINTER TO PRQINFO6;

            (*
            * structure for DosPrintJobGetId
            *)
            TYPE PRIDINFO = RECORD    (* prjid *)
                  uJobId:         USHORT;
                  szComputerName: ARRAY [0..CNLEN] OF CHAR;
                  szQueueName:    ARRAY [0..QNLEN] OF CHAR;
                  pad_1:          CHAR;
            END;
            TYPE PPRIDINFO  = POINTER TO PRIDINFO;
            TYPE NPPRIDINFO = POINTER TO PRIDINFO;

            (*
            * structure for DosPrintDriverEnum
            *)
            TYPE PRDRIVINFO = RECORD   (* prdid *)
                  szDrivName: ARRAY [0..DRIV_NAME_SIZE+1+DRIV_DEVICENAME_SIZE] OF CHAR;
            END;
            TYPE PPRDRIVINFO  = POINTER TO PRDRIVINFO;
            TYPE NPPRDRIVINFO = POINTER TO PRDRIVINFO;

            (*
            * structure for DosPrintQProcessorEnum
            *)
            TYPE PRQPROCINFO = RECORD   (* prqp *)
                  szQProcName: ARRAY [0..QNLEN] OF CHAR;
            END;
            TYPE PPRQPROCINFO  = POINTER TO PRQPROCINFO;
            TYPE NPPRQPROCINFO = POINTER TO PRQPROCINFO;

            (*
            * structure for DosPrintPortEnum Level 0
            *)
            TYPE PRPORTINFO = RECORD   (* prpo *)
                  szPortName: ARRAY [0..PDLEN] OF CHAR;
            END;
            TYPE PPRPORTINFO  = POINTER TO PRPORTINFO;
            TYPE NPPRPORTINFO = POINTER TO PRPORTINFO;

            (*
            * structure for DosPrintPortEnum Level 1
            *)
            TYPE PRPORTINFO1 = RECORD   (* prpo1 *)
                  pszPortName :           PSZ;
                  pszPortDriverName :     PSZ;
                  pszPortDriverPathName : PSZ;
            END;
            TYPE PPRPORTINFO1  = POINTER TO PRPORTINFO1;
            TYPE NPPRPORTINFO1 = POINTER TO PRPORTINFO1;


            (*** Values for parmnum in DosPrintQSetInfo/SplSetQueue  *************)
            CONST PRQ_PRIORITY_PARMNUM         =   2;
            CONST PRQ_STARTTIME_PARMNUM        =   3;
            CONST PRQ_UNTILTIME_PARMNUM        =   4;
            CONST PRQ_SEPARATOR_PARMNUM        =   5;
            CONST PRQ_PROCESSOR_PARMNUM        =   6;
            CONST PRQ_DESTINATIONS_PARMNUM     =   7;
            CONST PRQ_PARMS_PARMNUM            =   8;
            CONST PRQ_COMMENT_PARMNUM          =   9;
            CONST PRQ_TYPE_PARMNUM             =  10;
            CONST PRQ_PRINTERS_PARMNUM         =  12;
            CONST PRQ_DRIVERNAME_PARMNUM       =  13;
            CONST PRQ_DRIVERDATA_PARMNUM       =  14;
            CONST PRQ_REMOTE_COMPUTER_PARMNUM  =  15;
            CONST PRQ_REMOTE_QUEUE_PARMNUM     =  16;
            CONST PRQ_MAXPARMNUM               =  16;

            (*** Print Queue Priority ********************************************)
            CONST PRQ_MAX_PRIORITY             =   1;       (* highest priority *)
            CONST PRQ_DEF_PRIORITY             =   5;
            CONST PRQ_MIN_PRIORITY             =   9;       (* lowest priority  *)
            CONST PRQ_NO_PRIORITY              =   0;

            (*** Print queue status bitmask and values for level 1 ***************)
            CONST PRQ_STATUS_MASK              =   3;
            CONST PRQ_ACTIVE                   =   0;
            CONST PRQ_PAUSED                   =   1;       (* queue is held    *)
            CONST PRQ_ERROR                    =   2;
            CONST PRQ_PENDING                  =   3;       (* pending deletion *)

            (*** Print queue status bits for level 3 *****************************)
            CONST PRQ3_PAUSED                 =  01H;      (* queue is held    *)
            CONST PRQ3_PENDING                =  02H;      (* pending deletion *)

            (*** Print queue type bits for level 3 *******************************)
            CONST PRQ3_TYPE_RAW       =  00001H; (* spools printer-specific data *)
            CONST PRQ3_TYPE_BYPASS    =  00002H; (* allow print while spooling   *)
            CONST PRQ3_TYPE_APPDEFAULT=  00004H; (* set for Application default Q*)

            (*** Values for parmnum in DosPrintJobSetInfo/SplSetJob **************)
            CONST PRJ_NOTIFYNAME_PARMNUM     =   3;
            CONST PRJ_DATATYPE_PARMNUM       =   4;
            CONST PRJ_PARMS_PARMNUM          =   5;
            CONST PRJ_POSITION_PARMNUM       =   6;
            CONST PRJ_JOBFILEINUSE_PARMNUM   =   7;
            CONST PRJ_COMMENT_PARMNUM        =  11;
            CONST PRJ_DOCUMENT_PARMNUM       =  12;
            CONST PRJ_STATUSCOMMENT_PARMNUM  =  13;
            CONST PRJ_PRIORITY_PARMNUM       =  14;
            CONST PRJ_PROCPARMS_PARMNUM      =  16;
            CONST PRJ_DRIVERDATA_PARMNUM     =  18;
            CONST PRJ_MAXPARMNUM             =  18;

            (*** Bitmap masks for status field of PRJINFO. ***********************)
            (* 2-7 bits also used in device status *)
            CONST PRJ_QSTATUS     = 00003H;    (* Bits 0,1  *)
            CONST PRJ_DEVSTATUS   = 00ffcH;    (* 2-11 bits *)
            CONST PRJ_COMPLETE    = 00004H;    (* Bit 2     *)
            CONST PRJ_INTERV      = 00008H;    (* Bit 3     *)
            CONST PRJ_ERROR       = 00010H;    (* Bit 4     *)
            CONST PRJ_DESTOFFLINE = 00020H;    (* Bit 5     *)
            CONST PRJ_DESTPAUSED  = 00040H;    (* Bit 6     *)
            CONST PRJ_NOTIFY      = 00080H;    (* Bit 7     *)
            CONST PRJ_DESTNOPAPER = 00100H;    (* Bit 8     *)
            CONST PRJ_DESTFORMCHG = 00200H;    (* BIT 9     *)
            CONST PRJ_DESTCRTCHG  = 00400H;    (* BIT 10    *)
            CONST PRJ_DESTPENCHG  = 00800H;    (* BIT 11    *)
            CONST PRJ_JOBFILEINUSE= 04000H;    (* Bit 14    *)
            CONST PRJ_DELETED     = 08000H;    (* Bit 15    *)

            (*** Values of PRJ_QSTATUS bits in fsStatus field of PRJINFO. ********)
            CONST PRJ_QS_QUEUED              =   0;
            CONST PRJ_QS_PAUSED              =   1;
            CONST PRJ_QS_SPOOLING            =   2;
            CONST PRJ_QS_PRINTING            =   3;

            (*** Print Job Priority **********************************************)
            CONST PRJ_MAX_PRIORITY           =  99;         (* lowest priority  *)
            CONST PRJ_MIN_PRIORITY           =   1;         (* highest priority *)
            CONST PRJ_NO_PRIORITY            =   0;


            (*** Bitmap masks for status field of PRDINFO. ***********************)
            CONST PRD_STATUS_MASK     =  00003H;    (* Bits 0,1 *)
            CONST PRD_DEVSTATUS       =  00ffcH;    (* 2-11 bits *)

            (*** Values of PRD_STATUS_MASK bits in fsStatus field of PRDINFO. ****)
            CONST PRD_ACTIVE           =      0;
            CONST PRD_PAUSED           =      1;

            (*** Control codes used in DosPrintDestControl/SplControlDevice ******)
            CONST PRD_DELETE           =         0;
            CONST PRD_PAUSE            =         1;
            CONST PRD_CONT             =         2;
            CONST PRD_RESTART          =         3;

            (*** Values for parmnum in DosPrintDestSetInfo/SplSetDevice **********)
            CONST PRD_LOGADDR_PARMNUM  =    3 ;
            CONST PRD_COMMENT_PARMNUM  =    7 ;
            CONST PRD_DRIVERS_PARMNUM  =    8 ;
            CONST PRD_TIMEOUT_PARMNUM  =    10;

            (*** structure for SplEnumPrinter ************************************)
            TYPE PRINTERINFO = RECORD    (* prtin *)
                  flType:                  ULONG;
                  pszComputerName:         PSZ;
                  pszPrintDestinationName: PSZ;
                  pszDescription:          PSZ;
                  pszLocalName:            PSZ;
            END;
            TYPE PPRINTERINFO = POINTER TO PRINTERINFO;

            (*** Flags for flType in  PRINTERINFO and SplEnumPrinter *************)
            CONST    SPL_PR_QUEUE         =   000000001H; (* include queues *)
            CONST    SPL_PR_DIRECT_DEVICE =   000000002H; (* unattached devices *)
            CONST    SPL_PR_QUEUED_DEVICE =   000000004H; (* queued devices *)
            CONST    SPL_PR_LOCAL_ONLY    =   000000100H; (* exclude remote queues *)


   <* END *>

      (*********************************************************************)
      (*                      FUNCTION PROTOTYPES                          *)
      (*                                                                   *)
      (* In the case of the DosPrintxxx, the API is presented by new name  *)
      (* with the old name in parenthesis.                                 *)
      (*********************************************************************)

      PROCEDURE [APIENTRY] SplQmOpen(pszToken: PCSZ;
                                                      lCount: LONG;
                                                      pqmdopData: PQMOPENDATA ): HSPL ;

      PROCEDURE [APIENTRY] SplQmStartDoc(hspl: HSPL;
                                                              pszDocName: PCSZ ): BOOL ;
      PROCEDURE [APIENTRY] SplQmWrite(hspl: HSPL;
                                                        lCount: LONG;
                                                        pData: PVOID ): BOOL ;

      PROCEDURE [APIENTRY] SplQmEndDoc(hspl: HSPL ): BOOL ;

      PROCEDURE [APIENTRY] SplQmClose(hspl: HSPL ): BOOL ;

      PROCEDURE [APIENTRY] SplQmAbort(hspl: HSPL ): BOOL ;

      PROCEDURE [APIENTRY] SplQmAbortDoc(hspl: HSPL ): BOOL ;

      PROCEDURE [APIENTRY] SplMessageBox(pszLogAddr: PCSZ;
                                                                  fErrInfo: ULONG;
                                                                  fErrData: ULONG;
                                                                  pszText: PCSZ;
                                                                  pszCaption: PCSZ;
                                                                  idWindow: ULONG;
                                                                  fStyle: ULONG ): ULONG  ;

   <* IF DEFINED (INCL_SPLFSE)  THEN *>
            (* types HFILE, PHFILE are defined in bsedos.h *)
            (*** Direct Device File System Interface **************************)
            PROCEDURE [APIENTRY] PrtOpen(pszDeviceName: PCSZ;
                                                            phDevice: PHFILE;
                                                            pActionTaken: PULONG;
                                                            cbFileSize: ULONG;
                                                            uFileAttr: ULONG;
                                                            openFlag: ULONG;
                                                            openMode: ULONG;
                                                            reserved: ULONG): ULONG  ;

            PROCEDURE [APIENTRY] PrtClose(hDevice: HFILE ): ULONG  ;

            PROCEDURE [APIENTRY] PrtWrite(hDevice: HFILE;
                                                              pchData: PVOID;
                                                              cbData: ULONG;
                                                              pcbWritten: PULONG ): ULONG  ;

            PROCEDURE [APIENTRY] PrtDevIOCtl(pData: PVOID;
                                                                    pParms: PVOID;
                                                                    uFunction: ULONG;
                                                                    uCategory: ULONG;
                                                                    hDevice: HFILE ): ULONG  ;

            PROCEDURE [APIENTRY] PrtAbort(hDevice: HFILE );
   <* END *>

      PROCEDURE [APIENTRY] SplStdOpen(hdc: HDC ): BOOL ;

      PROCEDURE [APIENTRY] SplStdClose(hdc: HDC ): BOOL ;

      PROCEDURE [APIENTRY] SplStdStart(hdc: HDC ): BOOL ;

      PROCEDURE [APIENTRY] SplStdStop(hdc: HDC ): HSTD ;

      PROCEDURE [APIENTRY] SplStdDelete(hMetaFile: HSTD ): BOOL ;

      PROCEDURE [APIENTRY] SplStdGetBits(hMetaFile: HSTD;
                                                              offData: LONG;
                                                              cbData: LONG;
                                                              pchData: PCH  ): BOOL ;

      PROCEDURE [APIENTRY] SplStdQueryLength(hMetaFile: HSTD ): LONG ;


      (*              SplCreateDevice(DosPrintDestAdd) *)
      PROCEDURE [APIENTRY] SplCreateDevice(pszComputerName: PCSZ;
                                                                      ulLevel: ULONG;
                                                                      pBuf: PVOID;
                                                                      cbBuf: ULONG ): SPLERR ;

      (*              SplControlDevice(DosPrintDestControl) *)
      PROCEDURE [APIENTRY] SplControlDevice(pszComputerName: PCSZ;
                                                                        pszPortName: PCSZ;
                                                                        ulControl: ULONG ): SPLERR ;

      (*              SplDeleteDevice(DosPrintDestDel) *)
      PROCEDURE [APIENTRY] SplDeleteDevice(pszComputerName: PCSZ;
                                                                      pszPrintDeviceName: PCSZ ): SPLERR ;


      (*              SplEnumDevice(DosPrintDestEnum) *)
      PROCEDURE [APIENTRY] SplEnumDevice(pszComputerName: PCSZ;
                                                                  ulLevel: ULONG;
                                                                  pBuf: PVOID;
                                                                  cbBuf: ULONG;
                                                                  pcReturned: PULONG;
                                                                  pcTotal: PULONG;
                                                                  pcbNeeded: PULONG;
                                                                  pReserved: PVOID  ): SPLERR ;

      (*              SplQueryDevice(DosPrintDestGetInfo) *)
      PROCEDURE [APIENTRY] SplQueryDevice(pszComputerName: PCSZ;
                                                                    pszPrintDeviceName: PCSZ;
                                                                    ulLevel: ULONG;
                                                                    pBuf: PVOID;
                                                                    cbBuf: ULONG;
                                                                    pcbNeeded: PULONG ): SPLERR ;

      (*              SplSetDevice(DosPrintDestSetInfo) *)
      PROCEDURE [APIENTRY] SplSetDevice(pszComputerName: PCSZ;
                                                                pszPrintDeviceName: PCSZ;
                                                                ulLevel: ULONG;
                                                                pBuf: PVOID;
                                                                cbBuf: ULONG;
                                                                ulParmNum: ULONG ): SPLERR ;

      (*              SplReleaseJob(DosPrintJobContinue) *)
      PROCEDURE [APIENTRY] SplReleaseJob(pszComputerName: PCSZ;
                                                                  pszQueueName: PCSZ;
                                                                  ulJob: ULONG ): SPLERR ;

      (*              SplDeleteJob(DosPrintJobDel) *)
      PROCEDURE [APIENTRY] SplDeleteJob(pszComputerName: PCSZ;
                                                                pszQueueName: PCSZ;
                                                                ulJob: ULONG ): SPLERR ;

      (*              SplEnumJob(DosPrintJobEnum) *)
      PROCEDURE [APIENTRY] SplEnumJob(pszComputerName: PCSZ;
                                                            pszQueueName: PCSZ;
                                                            ulLevel: ULONG;
                                                            pBuf: PVOID;
                                                            cbBuf: ULONG;
                                                            pcReturned: PULONG;
                                                            pcTotal: PULONG;
                                                            pcbNeeded: PULONG;
                                                            pReserved: PVOID  ): SPLERR ;

      (*** See above for change to PRIDINFO datatype for this API. *********)

      (*              SplQueryJob(DosPrintJobGetInfo)  *)
      PROCEDURE [APIENTRY] SplQueryJob(pszComputerName: PCSZ;
                                                              pszQueueName: PCSZ;
                                                              ulJob: ULONG;
                                                              ulLevel: ULONG;
                                                              pBuf: PVOID;
                                                              cbBuf: ULONG;
                                                              pcbNeeded: PULONG ): SPLERR ;

      (*              SplHoldJob(DosPrintJobPause)   *)
      PROCEDURE [APIENTRY] SplHoldJob(pszComputerName: PCSZ;
                                                            pszQueueName: PCSZ;
                                                            ulJob: ULONG ): SPLERR ;

      (*              SplSetJob(DosPrintJobSetInfo)*)
      PROCEDURE [APIENTRY] SplSetJob(pszComputerName: PCSZ;
                                                          pszQueueName: PCSZ;
                                                          ulJob: ULONG;
                                                          ulLevel: ULONG;
                                                          pBuf: PVOID;
                                                          cbBuf: ULONG;
                                                          ulParmNum: ULONG ): SPLERR ;

      (*              SplCreateQueue(DosPrintQAdd) *)
      PROCEDURE [APIENTRY] SplCreateQueue(pszComputerName: PCSZ;
                                                                    ulLevel: ULONG;
                                                                    pBuf: PVOID;
                                                                    cbBuf: ULONG ): SPLERR ;

      (*              SplReleaseQueue(DosPrintQContinue) *)
      PROCEDURE [APIENTRY] SplReleaseQueue(pszComputerName: PCSZ;
                                                                      pszQueueName: PCSZ ): SPLERR ;


      (*              SplDeleteQueue(DosPrintQDel) *)
      PROCEDURE [APIENTRY] SplDeleteQueue(pszComputerName: PCSZ;
                                                                    pszQueueName: PCSZ ): SPLERR ;


      (*              SplEnumQueue(DosPrintQEnum) *)
      PROCEDURE [APIENTRY] SplEnumQueue(pszComputerName: PCSZ;
                                                                ulLevel: ULONG;
                                                                pBuf: PVOID;
                                                                cbBuf: ULONG;
                                                                pcReturned: PULONG;
                                                                pcTotal: PULONG;
                                                                pcbNeeded: PULONG;
                                                                pReserved: PVOID  ): SPLERR ;

      (*               SplQueryQueue(DosPrintQGetInfo) *)
      PROCEDURE [APIENTRY]  SplQueryQueue(pszComputerName: PCSZ;
                                                                    pszQueueName: PCSZ;
                                                                    ulLevel: ULONG;
                                                                    pBuf: PVOID;
                                                                    cbBuf: ULONG;
                                                                    pcbNeeded: PULONG ): SPLERR ;

      (*              SplHoldQueue(DosPrintQPause) *)
      PROCEDURE [APIENTRY] SplHoldQueue(pszComputerName: PCSZ;
                                                                pszQueueName: PCSZ ): SPLERR ;


      (*              SplPurgeQueue(DosPrintQPurge) *)
      PROCEDURE [APIENTRY] SplPurgeQueue(pszComputerName: PCSZ;
                                                                  pszQueueName: PCSZ ): SPLERR ;


      (*               SplSetQueue(DosPrintQSetInfo) *)
      PROCEDURE [APIENTRY]  SplSetQueue(pszComputerName: PCSZ;
                                                                pszQueueName: PCSZ;
                                                                ulLevel: ULONG;
                                                                pBuf: PVOID;
                                                                cbBuf: ULONG;
                                                                ulParmNum: ULONG ): SPLERR ;

      (*               SplEnumDriver(DosPrintDriverEnum) *)
      PROCEDURE [APIENTRY]  SplEnumDriver(pszComputerName: PCSZ;
                                                                    ulLevel: ULONG;
                                                                    pBuf: PVOID;
                                                                    cbBuf: ULONG;
                                                                    pcReturned: PULONG;
                                                                    pcTotal: PULONG;
                                                                    pcbNeeded: PULONG;
                                                                    pReserved: PVOID  ): SPLERR ;

      (*               SplEnumPort(DosPrintPortEnum) *)
      PROCEDURE [APIENTRY]  SplEnumPort(pszComputerName: PCSZ;
                                                                ulLevel: ULONG;
                                                                pBuf: PVOID;
                                                                cbBuf: ULONG;
                                                                pcReturned: PULONG;
                                                                pcTotal: PULONG;
                                                                pcbNeeded: PULONG;
                                                                pReserved: PVOID  ): SPLERR ;

      (*               SplEnumQueueProcessor(DosPrintQProcessorEnum) *)
      PROCEDURE [APIENTRY]  SplEnumQueueProcessor(pszComputerName: PCSZ;
                                                                                    ulLevel: ULONG;
                                                                                    pBuf: PVOID;
                                                                                    cbBuf: ULONG;
                                                                                    pcReturned: PULONG;
                                                                                    pcTotal: PULONG;
                                                                                    pcbNeeded: PULONG;
                                                                                    pReserved: PVOID  ): SPLERR ;


      PROCEDURE [APIENTRY] SplEnumPrinter(pszComputerName: PCSZ;
                                                                    uLevel: ULONG;
                                                                    flType: ULONG;
                                                                    pBuf: PVOID;
                                                                    cbbuf: ULONG;
                                                                    pcReturned: PULONG;
                                                                    pcTotal: PULONG;
                                                                    pcbNeeded: PULONG;
                                                                    pReserved: PVOID  ): SPLERR ;

      PROCEDURE [APIENTRY] SplCopyJob(pszSrcComputerName: PCSZ;
                                                            pszSrcQueueName: PCSZ;
                                                            ulSrcJob: ULONG;
                                                            pszTrgComputerName: PCSZ;
                                                            pszTrgQueueName: PCSZ;
                                                            pulTrgJob: PULONG): SPLERR ;


      CONST DosPrintDestControl    =   SplControlDevice   ;
      CONST DosPrintDestGetInfo    =   SplQueryDevice     ;
      CONST DosPrintDestEnum       =   SplEnumDevice      ;
      CONST DosPrintJobContinue    =   SplReleaseJob      ;
      CONST DosPrintJobPause       =   SplHoldJob         ;
      CONST DosPrintJobDel         =   SplDeleteJob       ;
      CONST DosPrintJobGetInfo     =   SplQueryJob        ;
      CONST DosPrintJobSetInfo     =   SplSetJob          ;
      CONST DosPrintJobEnum        =   SplEnumJob         ;
      CONST DosPrintQAdd           =   SplCreateQueue     ;
      CONST DosPrintQPause         =   SplHoldQueue       ;
      CONST DosPrintQContinue      =   SplReleaseQueue    ;
      CONST DosPrintQDel           =   SplDeleteQueue     ;
      CONST DosPrintQGetInfo       =   SplQueryQueue      ;
      CONST DosPrintQSetInfo       =   SplSetQueue        ;
      CONST DosPrintQEnum          =   SplEnumQueue       ;
      CONST DosPrintDestAdd        =   SplCreateDevice    ;
      CONST DosPrintDestSetInfo    =   SplSetDevice       ;
      CONST DosPrintDestDel        =   SplDeleteDevice    ;
      CONST DosPrintQPurge         =   SplPurgeQueue      ;
      CONST DosPrintDriverEnum     =   SplEnumDriver      ;
      CONST DosPrintQProcessorEnum =   SplEnumQueueProcessor;
      CONST DosPrintPortEnum       =   SplEnumPort        ;

<* END *>
(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmspl.hm ------------- *)
<* END *>

<* IF DEFINED (INCL_PIC)  THEN *>
   
(* ------------- Include file: .\hm\pmpic.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMPIC.H
*
* OS/2 Presentation Manager Picture functions include file.
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* Comments at the end of each typedef line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)

<* NEW PIC_INCLUDED + *>

(*** type of picture to print **********************************************)
CONST PIP_MF     =  1;
CONST PIP_PIF    =  2;

(*** type of conversion required *******************************************)
CONST PIC_PIFTOMET = 0;
CONST PIC_SSTOFONT = 2;

PROCEDURE [APIENTRY] PicPrint(hab: HAB;
                                              pszFilename: PCSZ;
                                              lType: LONG;
                                              pszParams: PCSZ ): BOOL;

PROCEDURE [APIENTRY] PicIchg(hab: HAB;
                                            pszFilename1: PCSZ;
                                            pszFilename2: PCSZ;
                                            lType: LONG ): BOOL;


(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmpic.hm ------------- *)
<* END *>

<* IF DEFINED (INCL_ORDERS)  THEN *>
   
(* ------------- Include file: .\hm\pmord.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMORD.H
*
* OS/2 include file which defines all the structures and constants
* that can be used to build or interpret GOCA orders for the GPI
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* The orders fall into 4 categories :-
*
* 1) 1-byte orders
*
* 2) 2-byte orders    - second byte contains the value
*
* 3) Long orders      - second byte gives the order length, subsequent bytes
*                       contain the values (up to 256 bytes long)
*
* 4) Very long orders - third and fourth bytes gives the order length,
*                       subsequent bytes contain the values (up to 64K long)
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)


<* NEW ORD_INCLUDED + *>

--#pragma pack(1)      (* pack on byte boundary *)

(***************************************************************************\
*
* Miscellaneous structures used in this file
*
\***************************************************************************)

(* form of RECTL with shorts instead of longs *)
TYPE RECT1S = RECORD        (* rcs *)
      xLeft:   SHORT;
      yBottom: SHORT;
      xRight:  SHORT;
      yTop:    SHORT;
END;

(* form of POINTL with 1 byte offsets instead of longs *)
TYPE ODPOINT = RECORD         (* odpt *)
      dx: CHAR;
      dy: CHAR;
END;

(* form of SIZEL with shorts instead of longs *)
TYPE SIZES = RECORD           (* sizs *)
      cx: SHORT;
      cy: SHORT;
END;


(* unsigned two-byte swapped integer *)
TYPE SWPUSHORT = RECORD       (* swpus *)
      HiByte: UCHAR;
      LoByte: UCHAR;
END;

(***************************************************************************\
*
* 1-byte orders
*
\***************************************************************************)

(* macro to tell whether this is a 1-byte order *)
--CONST BYTE_ORDER(oc)   ((oc)==OCODE_GNOP1 || (oc)==OCODE_GESD)

(* 1-byte order codes *)
CONST OCODE_GNOP1  =  000H;            (* No-operation                *)
CONST OCODE_GESD   =  0FFH;            (* End symbol definition       *)

(***************************************************************************\
*
* 2-byte orders
*
\***************************************************************************)

(* definitions to help determine whether an order code is a 2-byte order *)
CONST OCODE2_1     =  080H;
CONST OCODE2_2     =  088H;

--CONST SHORT_ORDER(oc)  ((((oc)^OCODE2_1)&OCODE2_2)==OCODE2_2)

(* General 2-byte order structure *)
TYPE ORDER = RECORD           (* ord *)
      idCode:  UCHAR;
      uchData: UCHAR;
END;

(* 2-byte order codes *)
CONST OCODE_GBAR    = 068H;            (* Begin area                  *)
CONST OCODE_GCFIG   = 07DH;            (* Close figure                *)
CONST OCODE_GEEL    = 049H;            (* End element                 *)
CONST OCODE_GEPTH   = 07FH;            (* End path                    *)
CONST OCODE_GEPROL  = 03EH;            (* End prologue                *)
CONST OCODE_GPOP    = 03FH;            (* Pop                         *)
CONST OCODE_GSBMX   = 00DH;            (* Set background mix          *)
CONST OCODE_GPSBMX  = 04DH;            (* Push & set b/g mix          *)
CONST OCODE_GSCD    = 03AH;            (* Set char direction          *)
CONST OCODE_GPSCD   = 07AH;            (* Push & set char direction   *)
CONST OCODE_GSCR    = 039H;            (* Set char precision          *)
CONST OCODE_GPSCR   = 079H;            (* Push & set char precision   *)
CONST OCODE_GSCS    = 038H;            (* Set char set                *)
CONST OCODE_GPSCS   = 078H;            (* Push & set char set         *)
CONST OCODE_GSCOL   = 00AH;            (* Set color                   *)
CONST OCODE_GPSCOL  = 04AH;            (* Push & set color            *)
CONST OCODE_GSLE    = 01AH;            (* Set line end                *)
CONST OCODE_GPSLE   = 05AH;            (* Push & set line end         *)
CONST OCODE_GSLJ    = 01BH;            (* Set line join               *)
CONST OCODE_GPSLJ   = 05BH;            (* Push & set line join        *)
CONST OCODE_GSLT    = 018H;            (* Set line type               *)
CONST OCODE_GPSLT   = 058H;            (* Push & set line type        *)
CONST OCODE_GSLW    = 019H;            (* Set line width              *)
CONST OCODE_GPSLW   = 059H;            (* Push & set line width       *)
CONST OCODE_GSMP    = 03BH;            (* Set marker precision        *)
CONST OCODE_GPSMP   = 07BH;            (* Push & set marker precision *)
CONST OCODE_GSMS    = 03CH;            (* Set marker set              *)
CONST OCODE_GPSMS   = 07CH;            (* Push & set marker set       *)
CONST OCODE_GSMT    = 029H;            (* Set marker symbol           *)
CONST OCODE_GPSMT   = 069H;            (* Push & set marker symbol    *)
CONST OCODE_GSMX    = 00CH;            (* Set mix                     *)
CONST OCODE_GPSMX   = 04CH;            (* Push & set mix              *)
CONST OCODE_GSPS    = 008H;            (* Set pattern set             *)
CONST OCODE_GPSPS   = 048H;            (* Push & set pattern set      *)
CONST OCODE_GSPT    = 028H;            (* Set pattern symbol          *)
CONST OCODE_GPSPT   = 009H;            (* Push & set pattern symbol   *)

(* constants for 2-byte orders *)

(* Begin area *)
CONST GBAR_RESERVED  = 080H;
CONST GBAR_BOUNDARY  = 0C0H;
CONST GBAR_NOBOUNDARY= 080H;
CONST GBAR_WINDING   = 0A0H;
CONST GBAR_ALTERNATE = 080H;

(* Set Character Precision *)
CONST GSCR_PRECISION = 00FH;

(***************************************************************************\
*
* Long orders
*
\***************************************************************************)

(* definitions to help determine whether an order code is a long order *)

CONST OCODE_VLONG   = 0FEH;

--CONST LONG_ORDER(oc) (!((oc)==OCODE_VLONG||BYTE_ORDER(oc)||SHORT_ORDER(oc)))

(* long order structure *)
CONST LORDER_ML = 253;
TYPE LORDER = RECORD          (* lord *)
      idCode:       UCHAR;
      uchLength:    UCHAR;
      uchData:      ARRAY [0..LORDER_ML-1] OF UCHAR;
END;

(* Long orders for which the length of data is normally zero *)
CONST OCODE_GEAR   =  060H;            (* End Area                    *)
CONST OCODE_GEIMG  =  093H;            (* End Image                   *)

(* Long orders for which the data is contained in a type already defined *)

(* Character String *)
CONST OCODE_GCCHST =  083H;            (* char string at curr posn    *)
CONST GCCHST_MC    =  255;              (* Max len of string in bytes  *)

CONST OCODE_GCHST  =  0C3H;            (* char string at given pos    *)
CONST GCHST_SMC    =  251;              (* Max len of string (S)       *)
CONST GCHST_LMC    =  247;              (* Max len of string (L)       *)

(* Character String Move *)
CONST OCODE_GCCHSTM=  0B1H;            (* char string move at c.p.    *)
CONST GCCHSTM_MC   =  255;              (* Max len of string in byte   *)

CONST OCODE_GCHSTM =  0F1H;            (* char string move at g.p.    *)
CONST GCHSTM_SMC   =  251;              (* Max len of string (S)       *)
CONST GCHSTM_LMC   =  247;              (* Max len of string (L)       *)

(* Comment *)
CONST OCODE_GCOMT  =  001H;            (* Comment                     *)
CONST GCOMT_ML     =  255;              (* Maximum len of comment data *)

(* Image *)
CONST OCODE_GIMD   =  092H;            (* Image data                  *)
CONST GIMD_ML      =  255;              (* Maximum len of image data   *)

(* Full Arc *)
CONST OCODE_GCFARC =  087H;            (* full arc at current posn    *)
CONST OCODE_GFARC  =  0C7H;            (* full arc at given posn      *)

(* Label *)
CONST OCODE_GLABL  =  0D3H;            (* Label                       *)

(* Set Current Position *)
CONST OCODE_GSCP   =  021H;            (* Set current position        *)
CONST OCODE_GPSCP  =  061H;            (* Push and set curr posn      *)

(* Bezier spline *)
CONST OCODE_GCBEZ  =  0A5H;            (* Bezier spline at curr pos   *)
CONST GCBEZ_SMB    =  21;               (* Max number of splines (S)   *)
CONST GCBEZ_LMB    =  10;               (* Max number of splines (L)   *)

CONST OCODE_GBEZ   =  0E5H;            (* Bezier spline at given pos  *)
CONST GBEZ_SMB     =  20;               (* Max number of splines (S)   *)
CONST GBEZ_LMB     =  10;               (* Max number of splines (L)   *)

(* Fillet *)
CONST OCODE_GCFLT  =  085H;            (* fillet at current posn      *)
CONST GCFLT_SMP    =  63;               (* Max number of points (S)    *)
CONST GCFLT_LMP    =  31;               (* Max number of points (L)    *)

CONST OCODE_GFLT   =  0C5H;            (* fillet at given position    *)
CONST GFLT_SMP     =  62;               (* Max number of points (S)    *)
CONST GFLT_LMP     =  30;               (* Max number of points (L)    *)

(* Polyline *)
CONST OCODE_GCLINE =  081H;            (* polyline at current posn    *)
CONST GCLINE_SMP   =  63;               (* Max number of points (S)    *)
CONST GCLINE_LMP   =  31;               (* Max number of points (L)    *)

CONST OCODE_GLINE  =  0C1H;            (* polyline at given posn      *)
CONST GLINE_SMP    =  62;               (* Max number of points (S)    *)
CONST GLINE_LMP    =  30;               (* Max number of points (L)    *)

(* Polymarker *)
CONST OCODE_GCMRK  =  082H;            (* marker at current posn      *)
CONST GCMRK_SMP    =  63;               (* Max number of points (S)    *)
CONST GCMRK_LMP    =  31;               (* Max number of points (L)    *)

CONST OCODE_GMRK   =  0C2H;            (* marker at given posn        *)
CONST GMRK_SMP     =  62;               (* Max number of points (S)    *)
CONST GMRK_LMP     =  30;               (* Max number of points (L)    *)

(* Relative Line *)
CONST OCODE_GCRLINE=  0A1H;            (* Relative line at curr pos   *)
CONST GCRLINE_MP   =  127;              (* Max number of points        *)

CONST OCODE_GRLINE =  0E1H;            (* Relative line at givn pos   *)
CONST GRLINE_SMP   =  125;              (* Max number of points (S)    *)
CONST GRLINE_LMP   =  123;              (* Max number of points (L)    *)

(* Set Background Color *)
CONST OCODE_GSBCOL  = 025H;            (* Set background color        *)
CONST OCODE_GPSBCOL = 065H;            (* Push and set b/g color      *)

(* Set Extended Color *)
CONST OCODE_GSECOL  = 026H;            (* Set extended color          *)
CONST OCODE_GPSECOL = 066H;            (* Push and set ext color      *)

(* Extended Color values *)
CONST SECOL_DEFAULT0=  00000H;
CONST SECOL_DEFAULT1=  0FF00H;
CONST SECOL_NEUTRAL =  0FF07H;
CONST SECOL_RESET   =  0FF08H;

(* Set Character Angle *)
CONST OCODE_GSCA    = 034H;            (* Set character angle         *)
CONST OCODE_GPSCA   = 074H;            (* Push and set char angle     *)

(* Set Character Shear *)
CONST OCODE_GSCH    = 035H;            (* Set character shear         *)
CONST OCODE_GPSCH   = 075H;            (* Push and set char shear     *)

(* Set Fractional Line Width *)
CONST OCODE_GSFLW   = 011H;            (* Set fractional line width   *)
CONST OCODE_GPSFLW  = 051H;            (* Push and set frac l width   *)

(* Set Pick Identifier *)
CONST OCODE_GSPIK   = 043H;            (* Set pick identifier         *)
CONST OCODE_GPSPIK  = 023H;            (* Push and set pick id        *)


(* Long Orders for which a structure can be defined for the data *)

(* Arc *)
CONST OCODE_GCARC   = 086H;            (* Arc at Current Position     *)
CONST OCODE_GARC    = 0C6H;            (* Arc at Given Position       *)

TYPE ORDERS_GCARC = RECORD    (* osgcarc *)
      ptInter: POINTS;
      ptEnd:   POINTS;
END;

TYPE ORDERL_GCARC = RECORD     (* olgcarc *)
      ptInter: POINTL;
      ptEnd:   POINTL;
END;

(* Begin Element *)
CONST OCODE_GBEL    = 0D2H;            (* Begin Element               *)

CONST GBEL_DL       = 251;
TYPE ORDER_GBEL = RECORD      (* ogbel *)
      lElementType: LONG;
      achDesc:      ARRAY [0..GBEL_DL-1] OF CHAR;
END;

(* Begin Image *)
CONST OCODE_GCBIMG  = 091H;            (* Begin Image at curr posn    *)
CONST OCODE_GBIMG   = 0D1H;            (* Begin Image at given posn   *)

TYPE ORDER_GCBIMG = RECORD    (* ogbimg *)
      uchFormat:     UCHAR;
      uchReserved:   UCHAR;
      cx:            SWPUSHORT;
      cy:            SWPUSHORT;
END;

(* Begin Path *)
CONST OCODE_GBPTH   = 0D0H;            (* Begin Path                  *)

TYPE ORDER_GBPTH = RECORD     (* ogbpth *)
      usReserved: USHORT;
      idPath:     LONG;
END;

(* Box *)
CONST OCODE_GCBOX   = 080H;            (* Box at current position     *)
CONST OCODE_GBOX    = 0C0H;            (* Box at given position       *)

TYPE ORDERS_GCBOX = RECORD    (* osgcbox *)
      fbFlags:      UCHAR;
      uchReserved:  UCHAR;
      ptCorner:     POINTS;
      hAxis:        SHORT;
      vAxis:        SHORT;
END;

TYPE ORDERL_GCBOX = RECORD     (* olgcbox *)
      fbFlags:       UCHAR;
      uchReserved:   UCHAR;
      ptCorner:      POINTL;
      hAxis:         LONG;
      vAxis:         LONG;
END;

CONST GCBOX_FILL    = 040H;
CONST GCBOX_BOUNDARY= 020H;

(* Call Segment *)
CONST OCODE_GCALLS  = 007H;            (* call segment                *)

TYPE ORDER_GCALLS = RECORD    (* ogcalls *)
      sReserved: USHORT;
      idSegment: LONG;
END;

(* Fill Path *)
CONST OCODE_GFPTH   = 0D7H;            (* Fill path                   *)
TYPE ORDER_GFPTH = RECORD    (* ogfpth *)
      fbFlags:      UCHAR;
      uchReserved:  UCHAR;
      idPath:       LONG;
END;

CONST GFPTH_ALTERNATE= 000H;
CONST GFPTH_WINDING  = 040H;
CONST GFPTH_MODIFY   = 020H;

(* Outline Path *)
CONST OCODE_GOPTH   = 0D4H;            (* Outline Path                *)
TYPE ORDER_GOPTH = RECORD    (* ogopth *)
      fbFlags:     UCHAR;
      uchReserved: UCHAR;
      idPath:      LONG;
END;

(* Modify Path *)
CONST OCODE_GMPTH= 0D8H;               (* modify path                 *)

TYPE ORDER_GMPTH = RECORD     (* ogmpth *)
      uchMode:      UCHAR;
      uchReserved:  UCHAR;
      idPath:       LONG;
END;

CONST GMPTH_STROKE   = 006H;

(* Partial Arc *)
CONST OCODE_GCPARC  = 0A3H;            (* Partial arc at curr posn    *)
CONST OCODE_GPARC   = 0E3H;            (* Partial arc at given posn   *)

TYPE ORDERS_GCPARC = RECORD   (* osgcparc *)
      ptCenter:         POINTS;
      ufx88Multiplier:  FIXED88;
      usStartAngle:     LONG;
      usSweepAngle:     LONG;
END;

TYPE ORDERL_GCPARC = RECORD   (* olgcparc *)
      ptCenter:       POINTL;
      ufxMultiplier:  FIXED;
      usStartAngle:   LONG;
      usSweepAngle:   LONG;
END;

(* Set Clip Path *)
CONST OCODE_GSCPTH  = 0B4H;            (* Set clip path               *)

TYPE ORDER_GSCPTH = RECORD    (* ogscpth *)
      fbFlags:       UCHAR;
      uchReserved:   UCHAR;
      idPath:        LONG;
END;

CONST GSCPTH_ALTERNATE= 000H;
CONST GSCPTH_WINDING  = 040H;
CONST GSCPTH_RESET    = 000H;
CONST GSCPTH_INTERSECT= 020H;

(* Set Arc Parameters *)
CONST OCODE_GSAP    = 022H;            (* Set arc parameters          *)
CONST OCODE_GPSAP   = 062H;            (* Push and set arc params     *)

TYPE ORDERS_GSAP = RECORD     (* osgsap *)
      p: SHORT;
      q: SHORT;
      r: SHORT;
      s: SHORT;
END;

TYPE ORDERL_GSAP = RECORD      (* olgsap *)
      p: LONG;
      q: LONG;
      r: LONG;
      s: LONG;
END;

(* Set Background Indexed Color *)
CONST OCODE_GSBICOL = 0A7H;            (* Set b/g indexed color       *)
CONST OCODE_GPSBICOL= 0E7H;            (* Push and set b/g ind color  *)
CONST OCODE_GSICOL  = 0A6H;            (* Set indexed color           *)
CONST OCODE_GPSICOL = 0E6H;            (* Push and set indexd color   *)

TYPE ORDER_GSBICOL = RECORD   (* ogbicol *)
      fbFlags:    UCHAR;
      auchColor:  ARRAY [0..2] OF UCHAR;
END;

CONST SICOL_SPECIFY = 000H;
CONST SICOL_SPECIAL = 040H;
CONST SICOL_DEFAULT = 080H;
CONST SICOL_BLACK   = 1;
CONST SICOL_WHITE   = 2;
CONST SICOL_ONES    = 4;
CONST SICOL_ZEROES  = 5;

(* Set Character Cell *)
CONST OCODE_GSCC    = 033H;            (* Set character cell          *)
CONST OCODE_GPSCC   = 003H;            (* Push and set char cell      *)

TYPE ORDERS_GSCC = RECORD     (* osgscc *)
      cxInt:        SHORT;
      cyInt:        SHORT;
      cxFract:      USHORT;
      cyFract:      USHORT;
      fbFlags:      UCHAR;
      uchReserved:  UCHAR;
END;

TYPE ORDERL_GSCC = RECORD     (* olgscc *)
      cxInt:        LONG;
      cyInt:        LONG;
      cxFract:      USHORT;
      cyFract:      USHORT;
      fbFlags:      UCHAR;
      uchReserved:  UCHAR;
END;

CONST GSCC_ZERODEF  = 000H;
CONST GSCC_ZEROZERO = 080H;

(* Set Marker Cell *)
CONST OCODE_GSMC    = 037H;            (* Set marker cell             *)
CONST OCODE_GPSMC   = 077H;            (* Push and set marker cell    *)

TYPE ORDERS_GSMC = RECORD     (* osgsmc *)
      cx:           SHORT;
      cy:           SHORT;
      fbFlags:      UCHAR;
      uchReserved:  UCHAR;
END;

TYPE ORDERL_GSMC = RECORD     (* olgsmc *)
      cx:           LONG;
      cy:           LONG;
      fbFlags:      UCHAR;
      uchReserved:  UCHAR;
END;

CONST GSMC_ZERODEF  = 000H;
CONST GSMC_ZEROZERO = 080H;

(* Set Pattern Reference Point *)
CONST OCODE_GSPRP   = 0A0H;            (* Set pattern ref point       *)
CONST OCODE_GPSPRP  = 0E0H;            (* Push and set patt ref pt    *)

TYPE ORDERS_GSPRP = RECORD     (* osgsprp *)
      fbFlags:     UCHAR;
      uchReserved: UCHAR;
      ptPos:       POINTS;
END;
TYPE ORDERL_GSPRP = RECORD    (* olgsprp *)
      fbFlags:     UCHAR;
      uchReserved: UCHAR;
      ptPos:       POINTL;
END;

CONST GSPRP_DEFAULT = 080H;
CONST GSPRP_SPECIFY = 000H;


(* Set Individual Attribute *)
CONST OCODE_GSIA    = 014H;            (* Set individual attribute    *)
CONST OCODE_GPSIA   = 054H;            (* Push and set ind attr       *)

CONST GSIA_VL  = 3;
TYPE ORDER_GSIA = RECORD      (* ogsia *)
      uchAttrType: UCHAR;
      uchPrimType: UCHAR;
      fbFlags:     UCHAR;
      auchValue:   ARRAY [0..GSIA_VL-1] OF UCHAR;
END;

CONST GSIA_COLOR    = 001H;
CONST GSIA_BCOLOR   = 002H;
CONST GSIA_MIX      = 003H;
CONST GSIA_BMIX     = 004H;
CONST GSIA_LINE     = 001H;
CONST GSIA_CHAR     = 002H;
CONST GSIA_MARKER   = 003H;
CONST GSIA_PATTERN  = 004H;
CONST GSIA_IMAGE    = 005H;
CONST GSIA_SPECIFY  = 000H;
CONST GSIA_SPECIAL  = 040H;
CONST GSIA_DEFAULT  = 080H;
CONST GSIA_BLACK    = 1;
CONST GSIA_WHITE    = 2;
CONST GSIA_ONES     = 4;
CONST GSIA_ZEROES   = 5;


(* Set Model /Viewing Transform *)
CONST OCODE_GSTM    = 024H;            (* Set model transform         *)
CONST OCODE_GPSTM   = 064H;            (* Push and set model tfm      *)

CONST OCODE_GSTV    = 031H;            (* Set Viewing Transform       *)

CONST GSTM_ML       = 16;
TYPE ORDERS_GSTM = RECORD      (* osgstm *)
      uchReserved:  UCHAR;
      fbFlags:      UCHAR;
      fsMask:       USHORT;
      asMatrix:     ARRAY [0..GSTM_ML-1] OF SHORT;
END;

TYPE ORDERL_GSTM = RECORD      (* olgstm *)
      uchReserved: UCHAR;
      fbFlags:     UCHAR;
      fsMask:      USHORT;
      alMatrix:    ARRAY [0..GSTM_ML-1] OF LONG;
END;

CONST GSTM_M11    = 08000H;
CONST GSTM_M12    = 04000H;
CONST GSTM_M13    = 02000H;
CONST GSTM_M14    = 01000H;
CONST GSTM_M21    = 00800H;
CONST GSTM_M22    = 00400H;
CONST GSTM_M23    = 00200H;
CONST GSTM_M24    = 00100H;
CONST GSTM_M31    = 00080H;
CONST GSTM_M32    = 00040H;
CONST GSTM_M33    = 00020H;
CONST GSTM_M34    = 00010H;
CONST GSTM_M41    = 00008H;
CONST GSTM_M42    = 00004H;
CONST GSTM_M43    = 00002H;
CONST GSTM_M44    = 00001H;

CONST GSTM_UNITY    = 000H;
CONST GSTM_AFTER    = 001H;
CONST GSTM_BEFORE   = 002H;
CONST GSTM_OVERWRITE= 003H;

CONST GSTV_OVERWRITE= 000H;
CONST GSTV_AFTER    = 004H;

(* Set Segment Boundary, Viewing Window *)

CONST OCODE_GSSB    = 032H;            (* Set segment boundary        *)
CONST OCODE_GSVW    = 027H;            (* Set viewing window          *)
CONST OCODE_GPSVW   = 067H;            (* Push and set view window    *)

CONST GSSB_ML       = 4;
TYPE ORDERS_GSSB = RECORD     (* osgssb *)
      fbFlags:   UCHAR;
      fbMask:    UCHAR;
      alMatrix:  ARRAY [0..GSSB_ML-1] OF SHORT;
END;

TYPE ORDERL_GSSB = RECORD     (* olgssb *)
      fbFLags:  UCHAR;
      fbMask:   UCHAR;
      alMatrix: ARRAY [0..GSSB_ML-1] OF LONG;
END;

CONST GSSB_XLEFT    = 020H;
CONST GSSB_XRIGHT   = 010H;
CONST GSSB_YBOTTOM  = 008H;
CONST GSSB_YTOP     = 004H;

CONST GSVW_INTERSECT= 000H;
CONST GSVW_REPLACE  = 080H;

(* Set Segment Characteristics *)
CONST OCODE_GSGCH   = 004H;            (* Set segment characteristics *)

CONST GSGCH_ML      = 254;
TYPE ORDER_GSGCH = RECORD     (* ogsgch *)
      uchIdent: UCHAR;
      auchData: ARRAY [0..GSGCH_ML-1] OF UCHAR;
END;

(* Set Stroke Line Width *)
CONST OCODE_GSSLW   = 015H;            (* Set stroke line width       *)
CONST OCODE_GPSSLW  = 055H;            (* Push and set strk l width   *)

TYPE ORDERS_GSSLW = RECORD    (* osgsslw *)
      fbFlags:     UCHAR;
      uchReserved: UCHAR;
      LineWidth:   SHORT;
END;

TYPE ORDERL_GSSLW = RECORD    (* olgsslw *)
      fbFlags:       UCHAR;
      uchReserved:   UCHAR;
      LineWidth:     LONG;
END;

CONST GSSLW_DEFAULT = 080H;
CONST GSSLW_SPECIFY = 000H;

(* Sharp Fillet at Current Position *)
CONST OCODE_GCSFLT  = 0A4H;            (* Sharp fillet at curr pos    *)
CONST OCODE_GSFLT   = 0E4H;            (* Sharp fillet at given pos   *)

CONST GCSFLT_SMF    = 21;
CONST GSFLT_SMF     = 20;

TYPE ORDERS_GCSFLT = RECORD   (* osgcsflt *)
      apt:          ARRAY [0..2*GCSFLT_SMF-1] OF POINTS;
      afxSharpness: ARRAY [0..GCSFLT_SMF-1]   OF FIXED;
END;

CONST GCSFLT_LMF    = 12;
CONST GSFLT_LMF     = 12;

TYPE ORDERL_GCSFLT = RECORD    (* olgcsflt *)
      apt:           ARRAY [0..2*GCSFLT_SMF-1] OF POINTL;
      afxSharpness:  ARRAY [0..GCSFLT_SMF-1]   OF FIXED;
END;

(* Bitblt *)
CONST OCODE_GBBLT   = 0D6H;            (* Bitblt                      *)

TYPE ORDERS_GBBLT = RECORD     (* osgbblt *)
      fsFlags:       USHORT;
      usMix:         USHORT;
      hbmSrc:        HBITMAP;
      lOptions:      LONG;
      rcsTargetRect: RECT1S;
      rclSourceRect: RECTL;
END;

TYPE ORDERL_GBBLT = RECORD     (* olgbblt *)
      fsFlags:       USHORT;
      usMix:         USHORT;
      hbmSrc:        HBITMAP;
      lOptions:      LONG;
      rclTargetRect: RECTL;
      rclSourceRect: RECTL;
END;

(* Char & break extra *)
CONST OCODE_GSCE    = 017H;            (* Set char extra                *)
CONST OCODE_GPSCE   = 057H;            (* Push and set char extra       *)
CONST OCODE_GSCBE   = 005H;            (* Set char break extra          *)
CONST OCODE_GPSCBE  = 045H;            (* Push and set char break extra *)

TYPE ORDER_GSCBE = RECORD      (* osgsce *)
      fbFlags:      UCHAR;
      uchReserved:  UCHAR;
      ufxextra:     FIXED;
END;
CONST ORDER_GPSCE  = ORDER_GSCBE;
CONST ORDER_GSCE   = ORDER_GSCBE;
CONST ORDER_GPSCBE = ORDER_GSCBE;

(* Escape *)
CONST OCODE_GESCP   = 0D5H;            (* Escape                      *)

(*
* type describes type of escape order, identifier gives the escape
* order if the type is registered
*)
CONST GESCP_ML      = 253;
TYPE ORDER_GESCP = RECORD     (* ogescp *)
      uchType:  UCHAR;
      uchIdent: UCHAR;
      auchData: ARRAY [0..GESCP_ML-1] OF UCHAR;    (* Escape data                 *)
END;

CONST GESCP_REG     = 080H;            (* identifier is registered    *)

(* Escape (Bitblt) *)
CONST GEBB_REGID    = 002H;            (* uchIdent - Bitblt           *)

CONST ETYPE_GEBB    = 0800200D5H;
CONST GEBB_LMP      = 29;
TYPE ORDERL_GEBB = RECORD      (* olgebb *)
      fbFlags:      UCHAR;
      usMix:        USHORT;
      cPoints:      UCHAR;
      hbmSrc:       HBITMAP;
      lReserved:    LONG;
      lOptions:     LONG;
      aptPoints:    ARRAY [0..GEBB_LMP-1] OF POINTL;
END;

(* Escape (Set Pel) *)
CONST GEPEL_REGID   = 001H;            (* uchIdent - Set Pel          *)

CONST ETYPE_GEPEL        = 0800100D5H;

(* Escape (DrawBits) *)
CONST GEDB_REGID    = 004H;          (* uchIdent - DrawBits *)

CONST ETYPE_GEDB         = 0800400D5H;

TYPE ORDERL_GEDB = RECORD     (* olgedb *)
      fsFlags:       USHORT;
      usMix:         USHORT;
      pBits:         PVOID;
      pbmi:          PBITMAPINFO2;
      lOptions:      LONG;
      rclTargetRect: RECTL;
      rclSourceRect: RECTL;
END;


(* Escape (FloodFill) *)
CONST GEFF_REGID    = 003H;        (* uchIdent - FloodFill *)

CONST ETYPE_GEFF         = 0800300D5H;

TYPE ORDERL_GEFF = RECORD      (* olgeff *)
      fsFlags:   UCHAR;
      auchColor: ARRAY [0..2] OF UCHAR;
END;


(* Element Types for attribute bundles *)
CONST ETYPE_LINEBUNDLE   = 00000FD01H;
CONST ETYPE_CHARBUNDLE   = 00000FD02H;
CONST ETYPE_MARKERBUNDLE = 00000FD03H;
CONST ETYPE_AREABUNDLE   = 00000FD04H;
CONST ETYPE_IMAGEBUNDLE  = 00000FD05H;


(***************************************************************************\
*
* Very long orders
*
\***************************************************************************)

(* macro to tell whether this is a very long order *)
--CONST VLONG_ORDER(oc)  ((oc)==OCODE_VLONG)

(* Very long order structure *)
CONST VORDER_ML= 65531;
TYPE VORDER = RECORD          (* vord *)
      idCode:       UCHAR;
      uchQualifier: UCHAR;
      uchLength:    SWPUSHORT;
      uchData:      ARRAY [0..VORDER_ML-1] OF UCHAR;
END;

(* Character String Extended *)
CONST OCODEQ_GCCHSTE = 0B0H;           (* Qualifier - current posn    *)
CONST OCODEQ_GCHSTE  = 0F0H;           (* Qualifier - given position  *)

CONST ETYPE_GCCHSTE      = 00000FEB0H;
CONST ETYPE_GCHSTE       = 00000FEF0H;

TYPE ORDERS_GCCHSTE = RECORD    (* osgcchste *)
      fbFlags:     UCHAR;
      uchReserved: UCHAR;
      ptRect:      ARRAY [0..1] OF POINTS;
      cchString:   SWPUSHORT;
      achString:   ARRAY [0..0] OF CHAR;
      adx:         ARRAY [0..0] OF SHORT;
END;

TYPE ORDERL_GCCHSTE = RECORD   (* olgcchste *)
      fbFlags:         UCHAR;
      uchReserved:     UCHAR;
      ptRect:          ARRAY [0..1] OF POINTL;
      cchString:       SWPUSHORT;
      achString:       ARRAY [0..0] OF CHAR;
      adx:             ARRAY [0..0] OF LONG;
END;

CONST GCCHSTE_DRAWRECT     = 080H;
CONST GCCHSTE_NORECT       = 000H;
CONST GCCHSTE_CLIP         = 040H;
CONST GCCHSTE_NOCLIP       = 000H;
CONST GCCHSTE_DEEMPHASIZE  = 020H;          (* Reserved *)
CONST GCCHSTE_NODEEMPHASIZE= 000H;
CONST GCCHSTE_LEAVEPOS     = 010H;
CONST GCCHSTE_MOVEPOS      = 000H;
CONST GCCHSTE_UNDERSCORE   = 008H;
CONST GCCHSTE_NOUNDERSCORE = 000H;
CONST GCCHSTE_STRIKEOUT    = 004H;
CONST GCCHSTE_NOSTRIKEOUT  = 000H;

(* Extended Escape *)
CONST OCODEQ_GEESCP  = 0D5H;         (* Qualifier - extended escape *)

CONST GEESCP_ML     = 65533;
TYPE ORDER_GEESCP = RECORD    (* ogeescp *)
      uchType:  UCHAR;
      uchIdent: UCHAR;
      auchData: ARRAY [0..GEESCP_ML-1] OF UCHAR;
END;


(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmord.hm ------------- *)
<* END *>

<* IF DEFINED (INCL_FONTFILEFORMAT)  THEN *>
   
(* ------------- Include file: .\hm\pmfont.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMFONT.H
*
* OS/2 Presentation Manager type declarations for Fonts.
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
*
\***************************************************************************)

<* IF NOT DEFINED (PMFONT_INCLUDED)  THEN *>
      (* XLATON *)
   <* NEW PMFONT_INCLUDED + *>

      TYPE FOCAMETRICS = RECORD    (* foca *)
            ulIdentity:           ULONG;
            ulSize:               ULONG;
            szFamilyname:         ARRAY [0..31] OF CHAR;
            szFacename:           ARRAY [0..31] OF CHAR;
            usRegistryId:         SHORT;
            usCodePage:           SHORT;
            yEmHeight:            SHORT;
            yXHeight:             SHORT;
            yMaxAscender:         SHORT;
            yMaxDescender:        SHORT;
            yLowerCaseAscent:     SHORT;
            yLowerCaseDescent:    SHORT;
            yInternalLeading:     SHORT;
            yExternalLeading:     SHORT;
            xAveCharWidth:        SHORT;
            xMaxCharInc:          SHORT;
            xEmInc:               SHORT;
            yMaxBaselineExt:      SHORT;
            sCharSlope:           SHORT;
            sInlineDir:           SHORT;
            sCharRot:             SHORT;
            usWeightClass:        USHORT;
            usWidthClass:         USHORT;
            xDeviceRes:           SHORT;
            yDeviceRes:           SHORT;
            usFirstChar:          SHORT;
            usLastChar:           SHORT;
            usDefaultChar:        SHORT;
            usBreakChar:          SHORT;
            usNominalPointSize:   SHORT;
            usMinimumPointSize:   SHORT;
            usMaximumPointSize:   SHORT;
            fsTypeFlags:          SHORT;
            fsDefn:               SHORT;
            fsSelectionFlags:     SHORT;
            fsCapabilities:       SHORT;
            ySubscriptXSize:      SHORT;
            ySubscriptYSize:      SHORT;
            ySubscriptXOffset:    SHORT;
            ySubscriptYOffset:    SHORT;
            ySuperscriptXSize:    SHORT;
            ySuperscriptYSize:    SHORT;
            ySuperscriptXOffset:  SHORT;
            ySuperscriptYOffset:  SHORT;
            yUnderscoreSize:      SHORT;
            yUnderscorePosition:  SHORT;
            yStrikeoutSize:       SHORT;
            yStrikeoutPosition:   SHORT;
            usKerningPairs:       SHORT;
            sFamilyClass:         SHORT;
            pszDeviceNameOffset:  PSZ;
      END;
      TYPE PFOCAMETRICS = POINTER TO FOCAMETRICS;

      TYPE FONTFILEMETRICS = RECORD   (* ffm *)
            ulIdentity:          ULONG;
            ulSize:              ULONG;
            szFamilyname:        ARRAY [0..31] OF CHAR;
            szFacename:          ARRAY [0..31] OF CHAR;
            usRegistryId:        SHORT;
            usCodePage:          SHORT;
            yEmHeight:           SHORT;
            yXHeight:            SHORT;
            yMaxAscender:        SHORT;
            yMaxDescender:       SHORT;
            yLowerCaseAscent:    SHORT;
            yLowerCaseDescent:   SHORT;
            yInternalLeading:    SHORT;
            yExternalLeading:    SHORT;
            xAveCharWidth:       SHORT;
            xMaxCharInc:         SHORT;
            xEmInc:              SHORT;
            yMaxBaselineExt:     SHORT;
            sCharSlope:          SHORT;
            sInlineDir:          SHORT;
            sCharRot:            SHORT;
            usWeightClass:       USHORT;
            usWidthClass:        USHORT;
            xDeviceRes:          SHORT;
            yDeviceRes:          SHORT;
            usFirstChar:         SHORT;
            usLastChar:          SHORT;
            usDefaultChar:       SHORT;
            usBreakChar:         SHORT;
            usNominalPointSize:  SHORT;
            usMinimumPointSize:  SHORT;
            usMaximumPointSize:  SHORT;
            fsTypeFlags:         SHORT;
            fsDefn:              SHORT;
            fsSelectionFlags:    SHORT;
            fsCapabilities:      SHORT;
            ySubscriptXSize:     SHORT;
            ySubscriptYSize:     SHORT;
            ySubscriptXOffset:   SHORT;
            ySubscriptYOffset:   SHORT;
            ySuperscriptXSize:   SHORT;
            ySuperscriptYSize:   SHORT;
            ySuperscriptXOffset: SHORT;
            ySuperscriptYOffset: SHORT;
            yUnderscoreSize:     SHORT;
            yUnderscorePosition: SHORT;
            yStrikeoutSize:      SHORT;
            yStrikeoutPosition:  SHORT;
            usKerningPairs:      SHORT;
            sFamilyClass:        SHORT;
            ulReserved:          ULONG;
            panose:              PANOSE;
      END;
      TYPE PFONTFILEMETRICS = POINTER TO FONTFILEMETRICS;

      TYPE FONTDEFINITIONHEADER = RECORD   (* fdh *)
            ulIdentity:      ULONG;
            ulSize:          ULONG;
            fsFontdef:       SHORT;
            fsChardef:       SHORT;
            usCellSize:      SHORT;
            xCellWidth:      SHORT;
            yCellHeight:     SHORT;
            xCellIncrement:  SHORT;
            xCellA:          SHORT;
            xCellB:          SHORT;
            xCellC:          SHORT;
            pCellBaseOffset: SHORT;
      END;
      TYPE PFONTDEFINITIONHEADER = POINTER TO FONTDEFINITIONHEADER;

      CONST FONTDEFFONT1   =  00047H;  (* set width, height, inc. & base offset *)
      CONST FONTDEFFONT2   =  00042H;  (* set height & base offset            *)
      CONST FONTDEFFONT3   =  00042H;  (* set height & base offset            *)
      CONST FONTDEFCHAR1   =  00081H;  (* set char offset and width           *)
      CONST FONTDEFCHAR2   =  00081H;  (* set char offset and width           *)
      CONST FONTDEFCHAR3   =  000b8H;  (* set char offset, A, B, and C space  *)
      CONST SPACE_UNDEF    =  08000H;  (* space undefined = take default      *)

      TYPE FONTSIGNATURE = RECORD   (* fs *)
            ulIdentity:     ULONG;
            ulSize:         ULONG;
            achSignature:   ARRAY [0..11] OF CHAR;
      END;
      TYPE PFONTSIGNATURE = POINTER TO FONTSIGNATURE;

      TYPE ADDITIONALMETRICS = RECORD   (* am *)
            ulIdentity: ULONG;
            ulSize:     ULONG;
            panose:     PANOSE;
      END;
      TYPE PADDITIONALMETRICS = POINTER TO ADDITIONALMETRICS;

      TYPE FOCAFONT = RECORD   (* ff *)
            fsSignature:   FONTSIGNATURE;
            fmMetrics:     FOCAMETRICS;
            fdDefinitions: FONTDEFINITIONHEADER;
      END;
      TYPE PFOCAFONT = POINTER TO FOCAFONT;

      CONST FONT_SIGNATURE        =  0fffffffeH; (* Identity header start    *)
      CONST FONT_METRICS          =  000000001H; (* Identity metrics         *)
      CONST FONT_DEFINITION       =  000000002H; (* Identity definition      *)
      CONST FONT_KERNPAIRS        =  000000003H; (* Identity Kern Pairs      *)
      CONST FONT_ADDITIONALMETRICS=  000000004H; (* Identity Additional Metrics *)
      CONST FONT_ENDRECORD        =  0ffffffffH; (* Identity record end      *)

      (* Options for QueryFonts *)

      CONST QUERY_PUBLIC_FONTS    =  00001H;
      CONST QUERY_PRIVATE_FONTS   =  00002H;

      CONST CDEF_GENERIC          =  00001H;
      CONST CDEF_BOLD             =  00002H;
      CONST CDEF_ITALIC           =  00004H;
      CONST CDEF_UNDERSCORE       =  00008H;
      CONST CDEF_STRIKEOUT        =  00010H;
      CONST CDEF_OUTLINE          =  00020H;

      (* XLATOFF *)
<* END *>
(* XLATON *)


(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmfont.hm ------------- *)
<* END *>


(* ------------- Include file: .\hm\pmstddlg.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMSTDDLG.H
*
* OS/2 Presentation Manager CUA controls and dialogs declarations
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* The folowing symbols are used in this file for conditional sections.
*
*   CONST:                To include:
*
*   INCL_WINSTDDLGS         include all dialogs/controls
*   INCL_WINSTDBOOK         book control class
*   INCL_WINSTDCNR          container control class
*   INCL_WINSTDDRAG         standard drag dll
*   INCL_WINSTDFILE         standard file dialog
*   INCL_WINSTDFONT         standard font dialog
*   INCL_WINSTDSLIDER       slider control class
*   INCL_WINSTDSPIN         spin button control class
*   INCL_WINSTDVALSET       value set control class
*
* ===========================================================================
*
* Comments at the end of each TYPE line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between NOINC
* and INC comments.
*
\***************************************************************************)


<* NEW STDDLG_INCLUDED + *>


<* IF DEFINED (INCL_WINSTDDLGS)  THEN *>
   <* NEW INCL_WINSTDFILE + *>
   <* NEW INCL_WINSTDFONT + *>
   <* NEW INCL_WINSTDSPIN + *>
   <* NEW INCL_WINSTDDRAG + *>
   <* NEW INCL_WINSTDCNR + *>
   <* NEW INCL_WINSTDSLIDER + *>
   <* NEW INCL_WINSTDVALSET + *>
   <* NEW INCL_WINSTDBOOK + *>
<* END *>

<* IF (DEFINED (INCL_WINSTDCNR) OR DEFINED (INCL_WINSTDVALSET) ) THEN *>
   <* NEW INCL_WINSTDDRAG + *>
<* END *>

<* IF (NOT DEFINED (INCL_WINSTDFILE_INCLUDED) OR NOT DEFINED (INCL_WINSTDFILE) ) THEN *>
   <* NEW INCL_WINSTDFILE_INCLUDED + *>
      (**********************************************************************)
      (*                                                                    *)
      (*                     F I L E    D I A L O G                         *)
      (*                                                                    *)
      (**********************************************************************)

      (*--------------------------------------------------------------------*)
      (* File Dialog Invocation Flag Definitions.                           *)
      (*--------------------------------------------------------------------*)
      CONST FDS_CENTER          = 000000001H;(* Center within owner wnd   *)
      CONST FDS_CUSTOM          = 000000002H;(* Use custom user template  *)
      CONST FDS_FILTERUNION     = 000000004H;(* Use union of filters      *)
      CONST FDS_HELPBUTTON      = 000000008H;(* Display Help button       *)
      CONST FDS_APPLYBUTTON     = 000000010H;(* Display Apply button      *)
      CONST FDS_PRELOAD_VOLINFO = 000000020H;(* Preload volume info       *)
      CONST FDS_MODELESS        = 000000040H;(* Make dialog modeless      *)
      CONST FDS_INCLUDE_EAS     = 000000080H;(* Always load EA info       *)
      CONST FDS_OPEN_DIALOG     = 000000100H;(* Select Open dialog        *)
      CONST FDS_SAVEAS_DIALOG   = 000000200H;(* Select SaveAs dialog      *)
      CONST FDS_MULTIPLESEL     = 000000400H;(* Enable multiple selection *)
      CONST FDS_ENABLEFILELB    = 000000800H;(* Enable SaveAs Listbox     *)

      (*--------------------------------------------------------------------*)
      (* File Dialog Selection returned attribute                           *)
      (*--------------------------------------------------------------------*)
      CONST  FDS_EFSELECTION   = 0;
      CONST  FDS_LBSELECTION   = 1;

      (*--------------------------------------------------------------------*)
      (* Error Return Codes from dialog (self defining)                     *)
      (*--------------------------------------------------------------------*)
      CONST  FDS_SUCCESSFUL                       =     0;
      CONST  FDS_ERR_DEALLOCATE_MEMORY            =     1;
      CONST  FDS_ERR_FILTER_TRUNC                 =     2;
      CONST  FDS_ERR_INVALID_DIALOG               =     3;
      CONST  FDS_ERR_INVALID_DRIVE                =     4;
      CONST  FDS_ERR_INVALID_FILTER               =     5;
      CONST  FDS_ERR_INVALID_PATHFILE             =     6;
      CONST  FDS_ERR_OUT_OF_MEMORY                =     7;
      CONST  FDS_ERR_PATH_TOO_LONG                =     8;
      CONST  FDS_ERR_TOO_MANY_FILE_TYPES          =     9;
      CONST  FDS_ERR_INVALID_VERSION              =     10;
      CONST  FDS_ERR_INVALID_CUSTOM_HANDLE        =     11;
      CONST  FDS_ERR_DIALOG_LOAD_ERROR            =     12;
      CONST  FDS_ERR_DRIVE_ERROR                  =     13;

      (*--------------------------------------------------------------------*)
      (* File Dialog Messages.                                              *)
      (*--------------------------------------------------------------------*)
      CONST FDM_FILTER     =  WM_USER+40;  (* mp1 = PSZ pszFileName         *)
      (*                   =                   mp2 = PSZ EA .TYPE value      *)
      (*                                      mr  = TRUE -> keep file.      *)
      CONST FDM_VALIDATE   =  WM_USER+41;  (* mp1 = PSZ pszPathName         *)
      (*                                      mp2 = USHORT Field name id    *)
      (*                                      mr  = TRUE -> Valid name      *)
      CONST FDM_ERROR      =  WM_USER+42;  (* mp1 = USHORT Error message id *)
      (*                                      mp2 = NULL   reserved         *)
      (*                                      mr  = NULL -> Use default msg *)

      (*--------------------------------------------------------------------*)
      (* Define the type that is a pointer to an array of pointers.         *)
      (*     Hence: pointer to an array of Z string pointers.               *)
      (*--------------------------------------------------------------------*)
      TYPE  APSZ  = ARRAY [0..0] OF PSZ;
      TYPE  PAPSZ = POINTER TO APSZ;          (* papsz *)

      (*--------------------------------------------------------------------*)
      (* File Dialog application data structure.                            *)
      (*--------------------------------------------------------------------*)
      TYPE FILEDLG = RECORD    (* fildlg *)
            cbSize:           ULONG    ;   (* Size of FILEDLG structure.         *)
            fl:               ULONG    ;   (* FDS_ flags. Alter behavior of dlg. *)
            ulUser:           ULONG    ;   (* User defined field.                *)
            lReturn:          LONG     ;   (* Result code from dialog dismissal. *)
            lSRC:             LONG     ;   (* System return code.                *)
            pszTitle:         PSZ      ;   (* String to display in title bar.    *)
            pszOKButton:      PSZ      ;   (* String to display in OK button.    *)
            pfnDlgProc:       PFNWP    ;   (* Entry point to custom dialog proc. *)
            pszIType:         PSZ      ;   (* Pointer to string containing       *)
            (*                                initial EA type filter. Type       *)
            (*                                does not have to exist in list.    *)
            papszITypeList:   PAPSZ    ;   (* Pointer to table of pointers that  *)
            (*                                point to null terminated Type      *)
            (*                                strings. End of table is marked    *)
            (*                                by a NULL pointer.                 *)
            pszIDrive:        PSZ      ;   (* Pointer to string containing       *)
            (*                                initial drive. Drive does not      *)
            (*                                have to exist in drive list.       *)
            papszIDriveList:  PAPSZ    ;   (* Pointer to table of pointers that  *)
            (*                                point to null terminated Drive     *)
            (*                                strings. End of table is marked    *)
            (*                                by a NULL pointer.                 *)
            hMod:             HMODULE  ;   (* Custom File Dialog template.       *)
                                                (* ____________ CCHMAXPATH=260 defined in bsedos.h *)
            szFullFile:       ARRAY [0..CCHMAXPATH-1] OF CHAR; (*     *)
            (*                                Initial or selected fully          *)
            (*                                qualified path and file.           *)
            papszFQFilename:  PAPSZ    ;   (* Pointer to table of pointers that  *)
            (*                                point to null terminated FQFname   *)
            (*                                strings. End of table is marked    *)
            (*                                by a NULL pointer.                 *)
            ulFQFCount:       ULONG    ;   (* Number of files selected           *)
            usDlgId:          USHORT   ;   (* Custom dialog id.                  *)
            x:                SHORT    ;   (* X coordinate of the dialog         *)
            y:                SHORT    ;   (* Y coordinate of the dialog         *)
            sEAType:          SHORT    ;   (* Selected file's EA Type.           *)
      END;
      TYPE PFILEDLG = POINTER TO FILEDLG;

      (*--------------------------------------------------------------------*)
      (* File Dialog - Function Prototype                                   *)
      (*--------------------------------------------------------------------*)

      PROCEDURE [APIENTRY] WinFileDlg(hwndP: HWND;
                                                              hwndO: HWND;
                                                              pfild: PFILEDLG ): HWND    ;

      PROCEDURE [APIENTRY] WinDefFileDlgProc(hwnd: HWND;
                                                                            msg: ULONG;
                                                                            mp1: MPARAM;
                                                                            mp2: MPARAM ): MRESULT ;

      PROCEDURE [APIENTRY] WinFreeFileDlgList(papszFQFilename: PAPSZ): BOOL;

      (*--------------------------------------------------------------------*)
      (* File Dialog - dialog and control ids                               *)
      (*--------------------------------------------------------------------*)
      CONST   DID_FILE_DIALOG           =  256;
      CONST   DID_FILENAME_TXT          =  257;
      CONST   DID_FILENAME_ED           =  258;
      CONST   DID_DRIVE_TXT             =  259;
      CONST   DID_DRIVE_CB              =  260;
      CONST   DID_FILTER_TXT            =  261;
      CONST   DID_FILTER_CB             =  262;
      CONST   DID_DIRECTORY_TXT         =  263;
      CONST   DID_DIRECTORY_LB          =  264;
      CONST   DID_FILES_TXT             =  265;
      CONST   DID_FILES_LB              =  266;
      CONST   DID_HELP_PB               =  267;
      CONST   DID_APPLY_PB              =  268;
      CONST   DID_OK_PB                 =  DID_OK;
      CONST   DID_CANCEL_PB             =  DID_CANCEL;

      CONST   IDS_FILE_ALL_FILES_SELECTOR   =   1000;
      CONST   IDS_FILE_BACK_CUR_PATH        =   1001;
      CONST   IDS_FILE_BACK_PREV_PATH       =   1002;
      CONST   IDS_FILE_BACK_SLASH           =   1003;
      CONST   IDS_FILE_BASE_FILTER          =   1004;
      CONST   IDS_FILE_BLANK                =   1005;
      CONST   IDS_FILE_COLON                =   1006;
      CONST   IDS_FILE_DOT                  =   1007;
      CONST   IDS_FILE_DRIVE_LETTERS        =   1008;
      CONST   IDS_FILE_FWD_CUR_PATH         =   1009;
      CONST   IDS_FILE_FWD_PREV_PATH        =   1010;
      CONST   IDS_FILE_FORWARD_SLASH        =   1011;
      CONST   IDS_FILE_PARENT_DIR           =   1012;
      CONST   IDS_FILE_Q_MARK               =   1013;
      CONST   IDS_FILE_SPLAT                =   1014;
      CONST   IDS_FILE_SPLAT_DOT            =   1015;
      CONST   IDS_FILE_SAVEAS_TITLE         =   1016;
      CONST   IDS_FILE_SAVEAS_FILTER_TXT    =   1017;
      CONST   IDS_FILE_SAVEAS_FILENM_TXT    =   1018;
      CONST   IDS_FILE_DUMMY_FILE_NAME      =   1019;
      CONST   IDS_FILE_DUMMY_FILE_EXT       =   1020;
      CONST   IDS_FILE_DUMMY_DRIVE          =   1021;
      CONST   IDS_FILE_DUMMY_ROOT_DIR       =   1022;
      CONST   IDS_FILE_PATH_PTR             =   1023;
      CONST   IDS_FILE_VOLUME_PREFIX        =   1024;
      CONST   IDS_FILE_VOLUME_SUFFIX        =   1025;
      CONST   IDS_FILE_PATH_PTR2            =   1026;
      CONST   IDS_FILE_INVALID_CHARS        =   1027;

      CONST   IDS_FILE_BAD_DRIVE_NAME         = 1100;
      CONST   IDS_FILE_BAD_DRIVE_OR_PATH_NAME = 1101;
      CONST   IDS_FILE_BAD_FILE_NAME          = 1102;
      CONST   IDS_FILE_BAD_FQF                = 1103;
      CONST   IDS_FILE_BAD_NETWORK_NAME       = 1104;
      CONST   IDS_FILE_BAD_SUB_DIR_NAME       = 1105;
      CONST   IDS_FILE_DRIVE_NOT_AVAILABLE    = 1106;
      CONST   IDS_FILE_FQFNAME_TOO_LONG       = 1107;
      CONST   IDS_FILE_OPEN_DIALOG_NOTE       = 1108;
      CONST   IDS_FILE_PATH_TOO_LONG          = 1109;
      CONST   IDS_FILE_SAVEAS_DIALOG_NOTE     = 1110;

      CONST   IDS_FILE_DRIVE_DISK_CHANGE      = 1120;
      CONST   IDS_FILE_DRIVE_NOT_READY        = 1122;
      CONST   IDS_FILE_DRIVE_LOCKED           = 1123;
      CONST   IDS_FILE_DRIVE_NO_SECTOR        = 1124;
      CONST   IDS_FILE_DRIVE_SOME_ERROR       = 1125;
      CONST   IDS_FILE_DRIVE_INVALID          = 1126;
      CONST   IDS_FILE_INSERT_DISK_NOTE       = 1127;
      CONST   IDS_FILE_OK_WHEN_READY          = 1128;

<* END *>


<* IF (NOT DEFINED (INCL_WINSTDFONT_INCLUDED) OR NOT DEFINED (INCL_WINSTDFONT) ) THEN *>
   <* NEW INCL_WINSTDFONT_INCLUDED + *>
      (**********************************************************************)
      (*                                                                    *)
      (*                     F O N T    D I A L O G                         *)
      (*                                                                    *)
      (**********************************************************************)

      (**********************************************************************)
      (* Font Dialog Creation Structure                                     *)
      (**********************************************************************)

      TYPE FONTDLG = RECORD    (* fntdlg *)
            cbSize:                  ULONG   ;(* sizeof(FONTDLG)                 *)
            hpsScreen:               HPS     ;(* Screen presentation space       *)
            hpsPrinter:              HPS     ;(* Printer presentation space      *)
            pszTitle:                PSZ     ;(* Application supplied title      *)
            pszPreview:              PSZ     ;(* String to print in preview wndw *)
            pszPtSizeList:           PSZ     ;(* Application provided size list  *)
            pfnDlgProc:              PFNWP   ;(* Dialog subclass procedure       *)
            pszFamilyname:           PSZ     ;(* Family name of font             *)
            fxPointSize:             FIXED   ;(* Point size the user selected    *)
            fl:                      ULONG   ;(* FNTS_* flags - dialog styles    *)
            flFlags:                 ULONG   ;(* FNTF_* state flags              *)
            flType:                  ULONG   ;(* Font type option bits           *)
            flTypeMask:              ULONG   ;(* Mask of which font types to use *)
            flStyle:                 ULONG   ;(* The selected style bits         *)
            flStyleMask:             ULONG   ;(* Mask of which style bits to use *)
            clrFore:                 LONG    ;(* Selected foreground color       *)
            clrBack:                 LONG    ;(* Selected background color       *)
            ulUser:                  ULONG   ;(* Blank field for application     *)
            lReturn:                 LONG    ;(* Return Value of the Dialog      *)
            lSRC:                    LONG    ;(* System return code.             *)
            lEmHeight:               LONG    ;(* Em height of the current font   *)
            lXHeight:                LONG    ;(* X height of the current font    *)
            lExternalLeading:        LONG    ;(* External Leading of font        *)
            hMod:                    HMODULE ;(* Module to load custom template  *)
            fAttrs:                  FATTRS  ;(* Font attribute structure        *)
            sNominalPointSize:       SHORT   ;(* Nominal Point Size of font      *)
            usWeight:                USHORT  ;(* The boldness of the font        *)
            usWidth:                 USHORT  ;(* The width of the font           *)
            x:                       SHORT   ;(* X coordinate of the dialog      *)
            y:                       SHORT   ;(* Y coordinate of the dialog      *)
            usDlgId:                 USHORT  ;(* ID of a custom dialog template  *)
            usFamilyBufLen:          USHORT  ;(* Length of family buffer provided*)
            usReserved:              USHORT  ;(* reserved                        *)
      END;
      TYPE PFONTDLG = POINTER TO FONTDLG;

      (**********************************************************************)
      (* Font Dialog Style Flags                                            *)
      (**********************************************************************)
      CONST FNTS_CENTER             = 000000001H;(* Center in owner dialog*)
      CONST FNTS_CUSTOM             = 000000002H;(* Use custom template   *)
      CONST FNTS_OWNERDRAWPREVIEW   = 000000004H;(* Allow app to draw     *)
      CONST FNTS_HELPBUTTON         = 000000008H;(* Display Help button   *)
      CONST FNTS_APPLYBUTTON        = 000000010H;(* Display Apply button  *)
      CONST FNTS_RESETBUTTON        = 000000020H;(* Display Reset button  *)
      CONST FNTS_MODELESS           = 000000040H;(* Make dialog modeless  *)
      CONST FNTS_INITFROMFATTRS     = 000000080H;(* Initialize from FATTRs*)
      CONST FNTS_BITMAPONLY         = 000000100H;(* Only allow bitmap font*)
      CONST FNTS_VECTORONLY         = 000000200H;(* Only allow vector font*)
      CONST FNTS_FIXEDWIDTHONLY     = 000000400H;(* Only allow monospaced *)
      CONST FNTS_PROPORTIONALONLY   = 000000800H;(* Only proportional font*)
      CONST FNTS_NOSYNTHESIZEDFONTS = 000001000H;(* Don't synthesize fonts*)

      (**********************************************************************)
      (* Font Dialog Flags                                                  *)
      (**********************************************************************)
      CONST FNTF_NOVIEWSCREENFONTS    =  1;
      CONST FNTF_NOVIEWPRINTERFONTS   =  2;
      CONST FNTF_SCREENFONTSELECTED   =  4;
      CONST FNTF_PRINTERFONTSELECTED  =  8;

      (**********************************************************************)
      (* Color code definitions                                             *)
      (**********************************************************************)
      CONST CLRC_FOREGROUND           =  1;
      CONST CLRC_BACKGROUND           =  2;

      (**********************************************************************)
      (* Filter List message string identifiers                             *)
      (**********************************************************************)
      CONST FNTI_BITMAPFONT       =  00001H;
      CONST FNTI_VECTORFONT       =  00002H;
      CONST FNTI_FIXEDWIDTHFONT   =  00004H;
      CONST FNTI_PROPORTIONALFONT =  00008H;
      CONST FNTI_SYNTHESIZED      =  00010H;
      CONST FNTI_DEFAULTLIST      =  00020H;
      CONST FNTI_FAMILYNAME       =  00100H;
      CONST FNTI_STYLENAME        =  00200H;
      CONST FNTI_POINTSIZE        =  00400H;

      (**********************************************************************)
      (* Error Return Codes from dialog (self defining)                     *)
      (**********************************************************************)
      CONST  FNTS_SUCCESSFUL                      =     0;
      CONST  FNTS_ERR_INVALID_DIALOG              =     3;
      CONST  FNTS_ERR_ALLOC_SHARED_MEM            =     4;
      CONST  FNTS_ERR_INVALID_PARM                =     5;
      CONST  FNTS_ERR_OUT_OF_MEMORY               =     7;
      CONST  FNTS_ERR_INVALID_VERSION             =    10;
      CONST  FNTS_ERR_DIALOG_LOAD_ERROR           =    12;

      (**********************************************************************)
      (* Font Dialog Messages                                               *)
      (**********************************************************************)
      CONST FNTM_FACENAMECHANGED  = WM_USER+50;  (* mp1 = PSZ pszFacename   *)
      CONST FNTM_POINTSIZECHANGED = WM_USER+51;  (* mp1 = PSZ pszPointSize, *)
      (*                                            mp2 = FIXED fxPointSize *)
      CONST FNTM_STYLECHANGED     = WM_USER+52;  (* mp1 = PSTYLECHANGE pstyc*)
      CONST FNTM_COLORCHANGED     = WM_USER+53;  (* mp1 = LONG clr          *)
      (*                                            mp2 = USHORT codeClr    *)
      CONST FNTM_UPDATEPREVIEW    = WM_USER+54;  (* mp1 = HWND hWndPreview  *)
      CONST FNTM_FILTERLIST       = WM_USER+55;  (* mp1 = PSZ pszFacename   *)
      (*                                            mp2 = USHORT usStrStyle *)
      (*                                            mr=TRUE(Add),FALSE(Dont)*)

      (**********************************************************************)
      (* Stylechange message parameter structure                            *)
      (**********************************************************************)
      TYPE STYLECHANGE = RECORD    (* stylc *)
            usWeight:         USHORT;
            usWeightOld:      USHORT;
            usWidth:          USHORT;
            usWidthOld:       USHORT;
            flType:           ULONG;
            flTypeOld:        ULONG;
            flTypeMask:       ULONG;
            flTypeMaskOld:    ULONG;
            flStyle:          ULONG;
            flStyleOld:       ULONG;
            flStyleMask:      ULONG;
            flStyleMaskOld:   ULONG;
      END;
      TYPE PSTYLECHANGE = POINTER TO STYLECHANGE;

      (**********************************************************************)
      (* Font Dialog Function Prototypes                                    *)
      (**********************************************************************)
      PROCEDURE [APIENTRY] WinFontDlg(hwndP: HWND;
                                                              hwndO: HWND;
                                                              pfntd: PFONTDLG ): HWND    ;

      PROCEDURE [APIENTRY] WinDefFontDlgProc(hwnd: HWND;
                                                                            msg: ULONG;
                                                                            mp1: MPARAM;
                                                                            mp2: MPARAM ): MRESULT ;

      (**********************************************************************)
      (* font dialog and control id's                                       *)
      (**********************************************************************)
      CONST DID_FONT_DIALOG         = 300;
      CONST DID_NAME                = 301;
      CONST DID_STYLE               = 302;
      CONST DID_DISPLAY_FILTER      = 303;
      CONST DID_PRINTER_FILTER      = 304;
      CONST DID_SIZE                = 305;
      CONST DID_SAMPLE              = 306;
      CONST DID_OUTLINE             = 307;
      CONST DID_UNDERSCORE          = 308;
      CONST DID_STRIKEOUT           = 309;
      CONST DID_HELP_BUTTON         = 310;
      CONST DID_APPLY_BUTTON        = 311;
      CONST DID_RESET_BUTTON        = 312;
      CONST DID_OK_BUTTON           = DID_OK;
      CONST DID_CANCEL_BUTTON       = DID_CANCEL;
      CONST DID_NAME_PREFIX         = 313;
      CONST DID_STYLE_PREFIX        = 314;
      CONST DID_SIZE_PREFIX         = 315;
      CONST DID_SAMPLE_GROUPBOX     = 316;
      CONST DID_EMPHASIS_GROUPBOX   = 317;
      CONST DID_FONT_ISO_SUPPORT    = 318;
      CONST DID_FONT_ISO_UNTESTED   = 319;

      (**********************************************************************)
      (* Stringtable id's                                                   *)
      (**********************************************************************)
      CONST IDS_FONT_SAMPLE         =   350;
      CONST IDS_FONT_BLANK          =   351;
      CONST IDS_FONT_KEY_0          =   352;
      CONST IDS_FONT_KEY_9          =   353;
      CONST IDS_FONT_KEY_SEP        =   354;
      CONST IDS_FONT_DISP_ONLY      =   355;
      CONST IDS_FONT_PRINTER_ONLY   =   356;
      CONST IDS_FONT_COMBINED       =   357;
      CONST IDS_FONT_WEIGHT1        =   358;
      CONST IDS_FONT_WEIGHT2        =   359;
      CONST IDS_FONT_WEIGHT3        =   360;
      CONST IDS_FONT_WEIGHT4        =   361;
      CONST IDS_FONT_WEIGHT5        =   362;
      CONST IDS_FONT_WEIGHT6        =   363;
      CONST IDS_FONT_WEIGHT7        =   364;
      CONST IDS_FONT_WEIGHT8        =   365;
      CONST IDS_FONT_WEIGHT9        =   366;
      CONST IDS_FONT_WIDTH1         =   367;
      CONST IDS_FONT_WIDTH2         =   368;
      CONST IDS_FONT_WIDTH3         =   369;
      CONST IDS_FONT_WIDTH4         =   370;
      CONST IDS_FONT_WIDTH5         =   371;
      CONST IDS_FONT_WIDTH6         =   372;
      CONST IDS_FONT_WIDTH7         =   373;
      CONST IDS_FONT_WIDTH8         =   374;
      CONST IDS_FONT_WIDTH9         =   375;
      CONST IDS_FONT_OPTION0        =   376;
      CONST IDS_FONT_OPTION1        =   377;
      CONST IDS_FONT_OPTION2        =   378;
      CONST IDS_FONT_OPTION3        =   379;
      CONST IDS_FONT_POINT_SIZE_LIST=   380;

<* END *>


<* IF (NOT DEFINED (INCL_WINSTDSPIN_INCLUDED) OR NOT DEFINED (INCL_WINSTDSPIN) ) THEN *>
   <* NEW INCL_WINSTDSPIN_INCLUDED + *>
      (**********************************************************************)
      (*                                                                    *)
      (*                          S P I N    B U T T O N                    *)
      (*                                                                    *)
      (**********************************************************************)

      (**********************************************************************)
      (* SPINBUTTON Creation Flags                                          *)
      (**********************************************************************)

      (**********************************************************************)
      (* Character Acceptance                                               *)
      (**********************************************************************)
      CONST SPBS_ALLCHARACTERS= 000000000H;(* Default: All chars accepted *)
      CONST SPBS_NUMERICONLY  = 000000001H;(* Only 0 - 9 accepted & VKeys *)
      CONST SPBS_READONLY     = 000000002H;(* No chars allowed in entryfld*)

      (**********************************************************************)
      (* Type of Component                                                  *)
      (**********************************************************************)
      CONST SPBS_MASTER       = 000000010H;
      CONST SPBS_SERVANT      = 000000000H;(* Default: Servant            *)

      (**********************************************************************)
      (* Type of Justification                                              *)
      (**********************************************************************)
      CONST SPBS_JUSTDEFAULT  =000000000H;(* Default: Same as Left        *)
      CONST SPBS_JUSTLEFT     =000000008H;
      CONST SPBS_JUSTRIGHT    =000000004H;
      CONST SPBS_JUSTCENTER   =00000000CH;

      (**********************************************************************)
      (* Border or not                                                      *)
      (**********************************************************************)
      CONST SPBS_NOBORDER    = 000000020H;(* Borderless SpinField         *)
      (*                                       Default is to have a border. *)

      (**********************************************************************)
      (* Fast spin or not                                                   *)
      (**********************************************************************)
      CONST SPBS_FASTSPIN    = 000000100H;(* Allow fast spinning.  Fast   *)
      (*                                       spinning is performed by     *)
      (*                                       skipping over numbers        *)

      (**********************************************************************)
      (* Pad numbers on front with 0's                                      *)
      (**********************************************************************)
      CONST SPBS_PADWITHZEROS= 000000080H;(* Pad the number with zeroes   *)

      (**********************************************************************)
      (* SPINBUTTON Messages                                                *)
      (**********************************************************************)

      (**********************************************************************)
      (* Notification from Spinbutton to the application is sent in a       *)
      (* WM_CONTROL message.                                                *)
      (**********************************************************************)
      CONST SPBN_UPARROW     =  020AH;    (* up arrow button was pressed  *)
      CONST SPBN_DOWNARROW   =  020BH;    (* down arrow button was pressed*)
      CONST SPBN_ENDSPIN     =  020CH;    (* mouse button was released    *)
      CONST SPBN_CHANGE      =  020DH;    (* spinfield text has changed   *)
      CONST SPBN_SETFOCUS    =  020EH;    (* spinfield received focus     *)
      CONST SPBN_KILLFOCUS   =  020FH;    (* spinfield lost focus         *)

      (**********************************************************************)
      (* Messages from application to Spinbutton                            *)
      (**********************************************************************)
      CONST SPBM_OVERRIDESETLIMITS= 0200H;  (* Set spinbutton limits without*)
      (*                                        resetting the current value *)
      CONST SPBM_QUERYLIMITS      = 0201H;  (* Query limits set by          *)
      (*                                        SPBM_SETLIMITS              *)
      CONST SPBM_SETTEXTLIMIT     = 0202H;  (* Max entryfield characters    *)
      CONST SPBM_SPINUP           = 0203H;  (* Tell entry field to spin up  *)
      CONST SPBM_SPINDOWN         = 0204H;  (* Tell entry field to spin down*)
      CONST SPBM_QUERYVALUE       = 0205H;  (* Tell entry field to send     *)
      (*                                        current value               *)

      (**********************************************************************)
      (* Query Flags                                                        *)
      (**********************************************************************)
      CONST SPBQ_UPDATEIFVALID   = 0;       (* Default                      *)
      CONST SPBQ_ALWAYSUPDATE    = 1;
      CONST SPBQ_DONOTUPDATE     = 3;

      (**********************************************************************)
      (* Return value for Empty Field.                                      *)
      (*    If ptr too long, variable sent in query msg                     *)
      (**********************************************************************)
      CONST SPBM_SETARRAY        =  0206H;  (* Change the data to spin      *)
      CONST SPBM_SETLIMITS       =  0207H;  (* Change the numeric Limits    *)
      CONST SPBM_SETCURRENTVALUE =  0208H;  (* Change the current value     *)
      CONST SPBM_SETMASTER       =  0209H;  (* Tell entryfield who master is*)

<* END *>


<* IF NOT (DEFINED (INCL_WINSTDDRAG_INCLUDED) & DEFINED (INCL_WINSTDDRAG) ) THEN *>
   <* NEW INCL_WINSTDDRAG_INCLUDED + *>
      (**********************************************************************)
      (*                                                                    *)
      (*                D I R E C T   M A N I P U L A T I O N               *)
      (*                                                                    *)
      (**********************************************************************)

      CONST PMERR_NOT_DRAGGING    = 01f00H;
      CONST PMERR_ALREADY_DRAGGING= 01f01H;

      CONST MSGF_DRAG             = 00010H;    (* message filter identifier *)

      CONST WM_DRAGFIRST          = 00310H;
      CONST WM_DRAGLAST           = 0032fH;

      CONST DM_DROP               = 0032fH;
      CONST DM_DRAGOVER           = 0032eH;
      CONST DM_DRAGLEAVE          = 0032dH;
      CONST DM_DROPHELP           = 0032cH;
      CONST DM_ENDCONVERSATION    = 0032bH;
      CONST DM_PRINT              = 0032aH;
      CONST DM_RENDER             = 00329H;
      CONST DM_RENDERCOMPLETE     = 00328H;
      CONST DM_RENDERPREPARE      = 00327H;
      CONST DM_DRAGFILECOMPLETE   = 00326H;
      CONST DM_EMPHASIZETARGET    = 00325H;
      CONST DM_DRAGERROR          = 00324H;
      CONST DM_FILERENDERED       = 00323H;
      CONST DM_RENDERFILE         = 00322H;
      CONST DM_DRAGOVERNOTIFY     = 00321H;
      CONST DM_PRINTOBJECT        = 00320H;
      CONST DM_DISCARDOBJECT      = 0031fH;

      CONST DRT_ASM               = "Assembler Code";   (* drag type constants  *)
      CONST DRT_BASIC             = "BASIC Code"    ;
      CONST DRT_BINDATA           = "Binary Data"   ;
      CONST DRT_BITMAP            = "Bitmap"        ;
      CONST DRT_C                 = "C Code"        ;
      CONST DRT_COBOL             = "COBOL Code"    ;
      CONST DRT_DLL               = "Dynamic Link Library";
      CONST DRT_DOSCMD            = "DOS Command File";
      CONST DRT_EXE               = "Executable"    ;
      CONST DRT_FORTRAN           = "FORTRAN Code"  ;
      CONST DRT_ICON              = "Icon"          ;
      CONST DRT_LIB               = "Library"       ;
      CONST DRT_METAFILE          = "Metafile"      ;
      CONST DRT_OS2CMD            = "OS/2 Command File";
      CONST DRT_PASCAL            = "Pascal Code"   ;
      CONST DRT_RESOURCE          = "Resource File" ;
      CONST DRT_TEXT              = "Plain Text"    ;
      CONST DRT_UNKNOWN           = "Unknown"       ;

      CONST DOR_NODROP           =  00000H;   (* DM_DRAGOVER response codes *)
      CONST DOR_DROP             =  00001H;
      CONST DOR_NODROPOP         =  00002H;
      CONST DOR_NEVERDROP        =  00003H;

      CONST DO_COPYABLE          =  00001H;   (* supported operation flags  *)
      CONST DO_MOVEABLE          =  00002H;
      CONST DO_LINKABLE          =  00004H;

      CONST DC_OPEN              =  00001H;   (* source control flags       *)
      CONST DC_REF               =  00002H;
      CONST DC_GROUP             =  00004H;
      CONST DC_CONTAINER         =  00008H;
      CONST DC_PREPARE           =  00010H;
      CONST DC_REMOVEABLEMEDIA   =  00020H;

      CONST DO_DEFAULT           =  0BFFEH;   (* Default operation          *)
      CONST DO_UNKNOWN           =  0BFFFH;   (* Unknown operation          *)
      CONST DO_COPY              =  00010H;
      CONST DO_MOVE              =  00020H;
      CONST DO_LINK              =  00018H;
      CONST DO_CREATE            =  00040H;

      CONST DMFL_TARGETSUCCESSFUL = 00001H;   (* transfer reply flags       *)
      CONST DMFL_TARGETFAIL       = 00002H;
      CONST DMFL_NATIVERENDER     = 00004H;
      CONST DMFL_RENDERRETRY      = 00008H;
      CONST DMFL_RENDEROK         = 00010H;
      CONST DMFL_RENDERFAIL       = 00020H;

      CONST DRG_ICON        =  000000001H;  (* drag image manipulation    *)
      CONST DRG_BITMAP      =  000000002H;  (*   flags                    *)
      CONST DRG_POLYGON     =  000000004H;
      CONST DRG_STRETCH     =  000000008H;
      CONST DRG_TRANSPARENT =  000000010H;
      CONST DRG_CLOSED      =  000000020H;

      CONST DME_IGNOREABORT       = 1;       (* DM_DRAGERROR return values *)
      CONST DME_IGNORECONTINUE    = 2;
      CONST DME_REPLACE           = 3;
      CONST DME_RETRY             = 4;

      CONST DF_MOVE              =  00001H; (* DM_DRAGFILECOMPLETE flags  *)
      CONST DF_SOURCE            =  00002H;
      CONST DF_SUCCESSFUL        =  00004H;

      CONST DRR_SOURCE          =  1;
      CONST DRR_TARGET          =  2;
      CONST DRR_ABORT           =  3;

      CONST DFF_MOVE            =   1;       (* DM_DRAGERROR operation IDs *)
      CONST DFF_COPY            =   2;
      CONST DFF_DELETE          =   3;


      TYPE HSTR = LHANDLE;  (* hstr *)

      TYPE DRAGITEM = RECORD    (* ditem *)
            hwndItem:           HWND    ; (* conversation partner          *)
            ulItemID:           ULONG   ; (* identifies item being dragged *)
            hstrType:           HSTR    ; (* type of item                  *)
            hstrRMF:            HSTR    ; (* rendering mechanism and format*)
            hstrContainerName:  HSTR    ; (* name of source container      *)
            hstrSourceName:     HSTR    ; (* name of item at source        *)
            hstrTargetName:     HSTR    ; (* suggested name of item at dest*)
            cxOffset:           SHORT   ; (* x offset of the origin of the *)
            (*                                 image from the mouse hotspot*)
            cyOffset:           SHORT   ; (* y offset of the origin of the *)
            (*                                 image from the mouse hotspot*)
            fsControl:          USHORT  ; (* source item control flags     *)
            fsSupportedOps:     USHORT  ; (* ops supported by source       *)
      END;
      TYPE PDRAGITEM = POINTER TO DRAGITEM;

      TYPE DRAGINFO = RECORD    (* dinfo *)
            cbDraginfo:      ULONG    ; (* Size of DRAGINFO and DRAGITEMs*)
            cbDragitem:      USHORT   ; (* size of DRAGITEM              *)
            usOperation:     USHORT   ; (* current drag operation        *)
            hwndSource:      HWND     ; (* window handle of source       *)
            xDrop:           SHORT    ; (* x coordinate of drop position *)
            yDrop:           SHORT    ; (* y coordinate of drop position *)
            cditem:          USHORT   ; (* count of DRAGITEMs            *)
            usReserved:      USHORT   ; (* reserved for future use       *)
      END;
      TYPE PDRAGINFO = POINTER TO DRAGINFO;

      TYPE DRAGIMAGE = RECORD    (* dimg *)
            cb:          USHORT  ; (* size control block            *)
            cptl:        USHORT  ; (* count of pts, if DRG_POLYGON  *)
            hImage:      LHANDLE ; (* image handle passed to DrgDrag*)
            sizlStretch: SIZEL   ; (* size to strecth ico or bmp to *)
            fl:          ULONG   ; (* flags passed to DrgDrag       *)
            cxOffset:    SHORT   ; (* x offset of the origin of the *)
            (*                                      image from the mouse hotspot*)
            cyOffset:    SHORT   ; (* y offset of the origin of the *)
            (*                                      image from the mouse hotspot*)
      END;
      TYPE PDRAGIMAGE = POINTER TO DRAGIMAGE;

      TYPE DRAGTRANSFER = RECORD    (* dxfer *)
            cb:                 ULONG      ; (* size of control block         *)
            hwndClient:         HWND       ; (* handle of target              *)
            pditem:             PDRAGITEM  ; (* DRAGITEM being transferred    *)
            hstrSelectedRMF:    HSTR       ; (* rendering mech & fmt of choice*)
            hstrRenderToName:   HSTR       ; (* name source will use          *)
            ulTargetInfo:       ULONG      ; (* reserved for target's use     *)
            usOperation:        USHORT     ; (* operation being performed     *)
            fsReply:            USHORT     ; (* reply flags                   *)
      END;
      TYPE PDRAGTRANSFER = POINTER TO DRAGTRANSFER;

      TYPE RENDERFILE = RECORD    (* rndf *)
            hwndDragFiles:   HWND   ; (* conversation window           *)
            hstrSource:      HSTR   ; (* handle to source file name    *)
            hstrTarget:      HSTR   ; (* handle to target file name    *)
            fMove:           USHORT ; (* TRUE - move, FALSE - copy     *)
            usRsvd:          USHORT ; (* reserved                      *)
      END;
      TYPE PRENDERFILE = POINTER TO RENDERFILE;

      PROCEDURE [APIENTRY] DrgAcceptDroppedFiles(hwnd: HWND;
                                                                                        pszPath: PCSZ;
                                                                                        pszTypes: PCSZ;
                                                                                        ulDefaultOp: ULONG;
                                                                                        ulRsvd: ULONG ): BOOL      ;

      PROCEDURE [APIENTRY] DrgAllocDraginfo(cditem: ULONG ): PDRAGINFO ;

      PROCEDURE [APIENTRY] DrgAllocDragtransfer(cdxfer: ULONG ): PDRAGTRANSFER ;

      PROCEDURE [APIENTRY] DrgDrag(hwndSource: HWND;
                                                            pdinfo: PDRAGINFO;
                                                            pdimg: PDRAGIMAGE;
                                                            cdimg: ULONG;
                                                            vkTerminate: LONG;
                                                            pRsvd: PVOID ): HWND      ;

      PROCEDURE [APIENTRY] DrgDragFiles(hwnd: HWND;
                                                                      apszFiles: PPCSZ;
                                                                      apszTypes: PPCSZ;
                                                                      apszTargets: PPCSZ;
                                                                      cFiles: ULONG;
                                                                      hptrDrag: HPOINTER;
                                                                      vkTerm: ULONG;
                                                                      fSourceRender: BOOL;
                                                                      ulRsvd: ULONG ): BOOL      ;

      PROCEDURE [APIENTRY] DrgPostTransferMsg(hwnd: HWND;
                                                                                  msg: ULONG;
                                                                                  pdxfer: PDRAGTRANSFER;
                                                                                  fl: ULONG;
                                                                                  ulRsvd: ULONG;
                                                                                  fRetry: BOOL ): BOOL      ;

      PROCEDURE [APIENTRY] DrgQueryDragitem(pdinfo: PDRAGINFO;
                                                                              cbBuffer: ULONG;
                                                                              pditem: PDRAGITEM;
                                                                              iItem: ULONG ): BOOL      ;

      PROCEDURE [APIENTRY] DrgQueryDragitemCount(pdinfo: PDRAGINFO ): ULONG     ;

      PROCEDURE [APIENTRY] DrgQueryDragitemPtr(pdinfo: PDRAGINFO;
                                                                                    i: ULONG ): PDRAGITEM ;

      PROCEDURE [APIENTRY] DrgQueryNativeRMF(pditem: PDRAGITEM;
                                                                                cbBuffer: ULONG;
                                                                                pBuffer: PCHAR): BOOL      ;

      PROCEDURE [APIENTRY] DrgQueryNativeRMFLen(pditem: PDRAGITEM ): ULONG     ;

      PROCEDURE [APIENTRY] DrgQueryStrName(hstr: HSTR;
                                                                            cbBuffer: ULONG;
                                                                            pBuffer: PCSZ ): ULONG     ;

      PROCEDURE [APIENTRY] DrgQueryStrNameLen(hstr: HSTR ): ULONG     ;

      PROCEDURE [APIENTRY] DrgQueryTrueType(pditem: PDRAGITEM;
                                                                              cbBuffer: ULONG;
                                                                              pBuffer: PCSZ ): BOOL      ;

      PROCEDURE [APIENTRY] DrgQueryTrueTypeLen(pditem: PDRAGITEM ): ULONG     ;

      PROCEDURE [APIENTRY] DrgSendTransferMsg(hwnd: HWND;
                                                                                  msg: ULONG;
                                                                                  mp1: MPARAM;
                                                                                  mp2: MPARAM ): MRESULT   ;

      PROCEDURE [APIENTRY] DrgSetDragitem(pdinfo: PDRAGINFO;
                                                                          pditem: PDRAGITEM;
                                                                          cbBuffer: ULONG;
                                                                          iItem: ULONG ): BOOL      ;

      PROCEDURE [APIENTRY] DrgSetDragImage(pdinfo: PDRAGINFO;
                                                                            pdimg: PDRAGIMAGE;
                                                                            cdimg: ULONG;
                                                                            pRsvd: PVOID ): BOOL      ;

      PROCEDURE [APIENTRY] DrgVerifyTypeSet(pditem: PDRAGITEM;
                                                                              pszType: PCSZ;
                                                                              cbMatch: ULONG;
                                                                              pszMatch: PCSZ ): BOOL      ;

      PROCEDURE [APIENTRY] DrgAccessDraginfo(pdinfo: PDRAGINFO ): BOOL      ;

      PROCEDURE [APIENTRY] DrgAddStrHandle(psz: PCSZ ): HSTR      ;

      PROCEDURE [APIENTRY] DrgDeleteDraginfoStrHandles(pdinfo: PDRAGINFO ): BOOL      ;

      PROCEDURE [APIENTRY] DrgDeleteStrHandle(hstr: HSTR ): BOOL      ;

      PROCEDURE [APIENTRY] DrgFreeDraginfo(pdinfo: PDRAGINFO ): BOOL      ;

      PROCEDURE [APIENTRY] DrgFreeDragtransfer(pdxfer: PDRAGTRANSFER ): BOOL      ;

      PROCEDURE [APIENTRY] DrgGetPS(hwnd: HWND ): HPS       ;

      PROCEDURE [APIENTRY] DrgPushDraginfo(pdinfo: PDRAGINFO;
                                                                            hwndDest: HWND ): BOOL      ;

      PROCEDURE [APIENTRY] DrgReleasePS(hps: HPS ): BOOL      ;

      PROCEDURE [APIENTRY] DrgSetDragPointer(pdinfo: PDRAGINFO;
                                                                                hptr: HPOINTER ): BOOL      ;

      PROCEDURE [APIENTRY] DrgVerifyNativeRMF(pditem: PDRAGITEM;
                                                                                  pszRMF: PCSZ ): BOOL      ;

      PROCEDURE [APIENTRY] DrgVerifyRMF(pditem: PDRAGITEM;
                                                                      pszMech: PCSZ;
                                                                      pszFmt: PCSZ ): BOOL      ;

      PROCEDURE [APIENTRY] DrgVerifyTrueType(pditem: PDRAGITEM;
                                                                                pszType: PCSZ ): BOOL      ;

      PROCEDURE [APIENTRY] DrgVerifyType(pditem: PDRAGITEM;
                                                                        pszType: PCSZ ): BOOL      ;

<* END *>


<* IF NOT (DEFINED (INCL_WINSTDCNR_INCLUDED) & DEFINED (INCL_WINSTDCNR) ) THEN *>
   <* NEW INCL_WINSTDCNR_INCLUDED + *>
      (**********************************************************************)
      (*                                                                    *)
      (*                         C O N T A I N E R                          *)
      (*                                                                    *)
      (**********************************************************************)

      (**********************************************************************)
      (* Error constants                                                    *)
      (**********************************************************************)
      CONST PMERR_NOFILTERED_ITEMS         = 01f02H;
      CONST PMERR_COMPARISON_FAILED        = 01f03H;
      CONST PMERR_RECORD_CURRENTLY_INSERTED= 01f04H;
      CONST PMERR_FI_CURRENTLY_INSERTED    = 01f05H;

      (**********************************************************************)
      (* Container control styles.                                          *)
      (**********************************************************************)
      CONST CCS_EXTENDSEL           =  000000001H;
      CONST CCS_MULTIPLESEL         =  000000002H;
      CONST CCS_SINGLESEL           =  000000004H;
      CONST CCS_AUTOPOSITION        =  000000008H;
      CONST CCS_VERIFYPOINTERS      =  000000010H;
      CONST CCS_READONLY            =  000000020H;
      CONST CCS_MINIRECORDCORE      =  000000040H;

      (**********************************************************************)
      (* view identifiers           (flWindowAttr)                          *)
      (**********************************************************************)
      CONST CV_TEXT                 = 000000001H; (* text view            *)
      CONST CV_NAME                 = 000000002H; (* name view            *)
      CONST CV_ICON                 = 000000004H; (* icon view            *)
      CONST CV_DETAIL               = 000000008H; (* detail view          *)
      CONST CV_FLOW                 = 000000010H; (* flow items           *)
      CONST CV_MINI                 = 000000020H; (* use mini icon        *)
      CONST CV_TREE                 = 000000040H; (* tree view            *)

      (**********************************************************************)
      (* Container Attributes        (flWindowAttr)                         *)
      (**********************************************************************)
      CONST CA_CONTAINERTITLE       = 000000200H;
      CONST CA_TITLESEPARATOR       = 000000400H;
      CONST CA_TITLELEFT            = 000000800H;
      CONST CA_TITLERIGHT           = 000001000H;
      CONST CA_TITLECENTER          = 000002000H;
      CONST CA_OWNERDRAW            = 000004000H;
      CONST CA_DETAILSVIEWTITLES    = 000008000H;
      CONST CA_ORDEREDTARGETEMPH    = 000010000H;
      CONST CA_DRAWBITMAP           = 000020000H;
      CONST CA_DRAWICON             = 000040000H;
      CONST CA_TITLEREADONLY        = 000080000H;
      CONST CA_OWNERPAINTBACKGROUND = 000100000H;
      CONST CA_MIXEDTARGETEMPH      = 000200000H;
      CONST CA_TREELINE             = 000400000H;

      (**********************************************************************)
      (* child window IDs                                                   *)
      (**********************************************************************)
      CONST CID_LEFTCOLTITLEWND    = 07FF0H; (* column title (left)       *)
      CONST CID_RIGHTCOLTITLEWND   = 07FF1H; (* right column title        *)
      CONST CID_BLANKBOX           = 07FF2H; (* blank box at bottom right *)
      CONST CID_HSCROLL            = 07FF3H; (* horizontal scroll bar     *)
      CONST CID_RIGHTHSCROLL       = 07FF4H; (* right horz scroll bar     *)
      CONST CID_CNRTITLEWND        = 07FF5H; (* Container title window    *)
      CONST CID_LEFTDVWND          = 07FF7H; (* Left Details View window  *)
      CONST CID_RIGHTDVWND         = 07FF8H; (* Right Details View window *)
      CONST CID_VSCROLL            = 07FF9H; (* vertical scroll bar       *)
      CONST CID_MLE                = 07FFAH; (* MLE window for direct edit*)

      (**********************************************************************)
      (* Bitmap descriptor array element.                                   *)
      (**********************************************************************)
      TYPE TREEITEMDESC = RECORD    (* treend *)
            hbmExpanded:    HBITMAP;
            hbmCollapsed:  HBITMAP;
            hptrExpanded:  HPOINTER;
            hptrCollapsed: HPOINTER;
      END;
      TYPE PTREEITEMDESC = POINTER TO TREEITEMDESC;

      (**********************************************************************)
      (* Field Info data structure, attribute and data types, CV_DETAIL     *)
      (**********************************************************************)
      TYPE PFIELDINFO = POINTER TO FIELDINFO;
      TYPE FIELDINFO = RECORD     (* fldinfo *)
            cb:             ULONG      ; (* size of FIELDINFO struct       *)
            flData:         ULONG      ; (* attributes of field's data     *)
            flTitle:        ULONG      ; (* attributes of field's title    *)
            pTitleData:     PVOID      ; (* title data (default is string) *)
            (*                                 If CFT_BITMAP, must be HBITMAP *)
            offStruct:      ULONG      ; (* offset from RECORDCORE to data *)
            pUserData:      PVOID      ; (* pointer to user data           *)
            pNextFieldInfo: PFIELDINFO;  (* pointer to next linked  *)
            (*                                       FIELDINFO structure   *)
            cxWidth:        ULONG      ; (* width of field in pels         *)
      END;

      (**********************************************************************)
      (* RECORDCORE data structure , attribute values                       *)
      (**********************************************************************)
      TYPE PRECORDCORE = POINTER TO RECORDCORE;
      TYPE RECORDCORE = RECORD    (* recc *)
            cb:               ULONG       ; (* record attributes             *)
            flRecordAttr:     ULONG       ; (* record attributes             *)
            ptlIcon:          POINTL      ; (* Position of CV_ICON item      *)
            preccNextRecord:  PRECORDCORE ; (* ptr to next record  *)
            pszIcon:          PSZ         ; (* Text for CV_ICON view         *)
            hptrIcon:         HPOINTER    ; (* Icon to display for ~CV_MINI  *)
            hptrMiniIcon:     HPOINTER    ; (* Icon to display for CV_MINI   *)
            hbmBitmap:        HBITMAP     ; (* Bitmap to display for ~CV_MINI*)
            hbmMiniBitmap:    HBITMAP     ; (* Bitmap to display for CV_MINI *)
            pTreeItemDesc:    PTREEITEMDESC ; (* Icons for the tree view       *)
            pszText:          PSZ         ; (* Text for CV_TEXT view         *)
            pszName:          PSZ         ; (* Text for CV_NAME view         *)
            pszTree:          PSZ         ; (* Text for CV_TREE view         *)
      END;

      (**********************************************************************)
      (* MINIRECORDCORE data structure, attribute values                    *)
      (**********************************************************************)
      TYPE PMINIRECORDCORE = POINTER TO MINIRECORDCORE;
      TYPE MINIRECORDCORE = RECORD    (* minirec *)
            cb:              ULONG       ;
            flRecordAttr:    ULONG       ; (* record attributes             *)
            ptlIcon:         POINTL      ; (* Position of CV_ICON item      *)
            preccNextRecord: PMINIRECORDCORE; (* ptr to next record *)
            pszIcon:         PSZ         ; (* Text for CV_ICON view         *)
            hptrIcon:        HPOINTER    ; (* Icon to display for ~CV_MINI  *)
      END;

      (**********************************************************************)
      (* CNRINFO data structure, describes the container control.           *)
      (**********************************************************************)
      TYPE CNRINFO = RECORD    (* ccinfo *)
            cb:                 ULONG       ; (* size of CNRINFO struct        *)
            pSortRecord:        PVOID       ; (* ptr to sort function,         *)
            (*                                    RECORDCORE                  *)
            pFieldInfoLast:     PFIELDINFO  ; (* pointer to last column in     *)
            (*                                    left pane of a split window.*)
            pFieldInfoObject:   PFIELDINFO  ; (* Pointer to a column to        *)
            (*                                  represent an object.  This is *)
            (*                                  the column which will receive *)
            (*                                  IN-USE emphasis.              *)
            pszCnrTitle:        PSZ         ; (* text for container title. One *)
            (*                                    string separated by line    *)
            (*                                    separators for multi-lines  *)
            flWindowAttr:       ULONG       ; (* container attrs - CV_*, CA_*  *)
            ptlOrigin:          POINTL      ; (* lower-left origin in virtual  *)
            (*                                    coordinates. CV_ICON view   *)
            cDelta:             ULONG       ; (* Application defined threshold *)
            (*                                    or number of records from   *)
            (*                                    either end of the list.     *)
            cRecords:           ULONG       ; (* number of records in container*)
            slBitmapOrIcon:     SIZEL       ; (* size of bitmap in pels        *)
            slTreeBitmapOrIcon: SIZEL       ; (* size of tree bitmaps in pels  *)
            hbmExpanded:        HBITMAP     ; (* bitmap  for tree node         *)
            hbmCollapsed:       HBITMAP     ; (* bitmap  for tree node         *)
            hptrExpanded:       HPOINTER    ; (* icon    for tree node         *)
            hptrCollapsed:      HPOINTER    ; (* icon    for tree node         *)
            cyLineSpacing:      LONG        ; (* space between two rows        *)
            cxTreeIndent:       LONG        ; (* indent for children           *)
            cxTreeLine:         LONG        ; (* thickness of the Tree Line    *)
            cFields:            ULONG       ; (* number of fields  in container*)
            xVertSplitbar:      LONG        ; (* position relative to the      *)
            (*                                    container (CV_DETAIL); if   *)
            (*                                    0FFFF then unsplit         *)
      END;
      TYPE PCNRINFO = POINTER TO CNRINFO;

      TYPE CDATE = RECORD    (* cdate *)
            day:   UCHAR   ; (* current day               *)
            month: UCHAR   ; (* current month             *)
            year:  USHORT  ; (* current year              *)
      END;
      TYPE PCDATE = POINTER TO CDATE;

      TYPE CTIME = RECORD    (* ctime *)
            hours:       UCHAR   ; (* current hour              *)
            minutes:     UCHAR   ; (* current minute            *)
            seconds:     UCHAR   ; (* current second            *)
            ucReserved:  UCHAR   ; (* reserved                  *)
      END;
      TYPE PCTIME = POINTER TO CTIME;

      (**********************************************************************)
      (* attribute and type values for flData and flTitle members of        *)
      (* FIELDINFO, CFA_ (attributes), CFT_ (types)                         *)
      (**********************************************************************)
      CONST CFA_LEFT          =  000000001H;(* left align text            *)
      CONST CFA_RIGHT         =  000000002H;(* right align text           *)
      CONST CFA_CENTER        =  000000004H;(* center text                *)
      CONST CFA_TOP           =  000000008H;(* top-align text             *)
      CONST CFA_VCENTER       =  000000010H;(* vertically center text     *)
      CONST CFA_BOTTOM        =  000000020H;(* bottom-align text          *)
      CONST CFA_INVISIBLE     =  000000040H;(* Specify invisible column.  *)
      CONST CFA_BITMAPORICON  =  000000100H;(* field title is bitmap      *)
      CONST CFA_SEPARATOR     =  000000200H;(* vert sep, right of fld     *)
      CONST CFA_HORZSEPARATOR =  000000400H;(* horz sep, bottom of fld    *)

      CONST CFA_STRING         = 000000800H;(* string of characters       *)
      CONST CFA_OWNER          = 000001000H;(* ownerdraw field            *)
      CONST CFA_DATE           = 000002000H;(* date structure             *)
      CONST CFA_TIME           = 000004000H;(* time structure             *)
      CONST CFA_FIREADONLY     = 000008000H;(* Column is read-only.       *)
      CONST CFA_FITITLEREADONLY= 000010000H;(* Column Title is read-only  *)
      CONST CFA_ULONG          = 000020000H;(* Column is number format    *)

      (**********************************************************************)
      (* attribute values for flRecordAttr member of RECORDCORE             *)
      (**********************************************************************)
      CONST CRA_SELECTED       = 000000001H;(* record is selected         *)
      CONST CRA_TARGET         = 000000002H;(* record has target emphasis *)
      CONST CRA_CURSORED       = 000000004H;(* cursor is on the record    *)
      CONST CRA_INUSE          = 000000008H;(* record has in-use emphasis *)
      CONST CRA_FILTERED       = 000000010H;(* record has been filtered   *)
      CONST CRA_DROPONABLE     = 000000020H;(* record can be dropped on   *)
      CONST CRA_RECORDREADONLY = 000000040H;(* record is read-only        *)
      CONST CRA_EXPANDED       = 000000080H;(* record is expanded         *)
      CONST CRA_COLLAPSED      = 000000100H;(* record is collapsed        *)

      (**********************************************************************)
      (* Container messages                                                 *)
      (**********************************************************************)
      CONST CM_ALLOCDETAILFIELDINFO      = 00330H;
      CONST CM_ALLOCRECORD               = 00331H;
      CONST CM_ARRANGE                   = 00332H;
      CONST CM_ERASERECORD               = 00333H;
      CONST CM_FILTER                    = 00334H;
      CONST CM_FREEDETAILFIELDINFO       = 00335H;
      CONST CM_FREERECORD                = 00336H;
      CONST CM_HORZSCROLLSPLITWINDOW     = 00337H;
      CONST CM_INSERTDETAILFIELDINFO     = 00338H;
      CONST CM_INSERTRECORD              = 00339H;
      CONST CM_INVALIDATEDETAILFIELDINFO = 0033aH;
      CONST CM_INVALIDATERECORD          = 0033bH;
      CONST CM_PAINTBACKGROUND           = 0033cH;
      CONST CM_QUERYCNRINFO              = 0033dH;
      CONST CM_QUERYDETAILFIELDINFO      = 0033eH;
      CONST CM_QUERYDRAGIMAGE            = 0033fH;
      CONST CM_QUERYRECORD               = 00340H;
      CONST CM_QUERYRECORDEMPHASIS       = 00341H;
      CONST CM_QUERYRECORDFROMRECT       = 00342H;
      CONST CM_QUERYRECORDRECT           = 00343H;
      CONST CM_QUERYVIEWPORTRECT         = 00344H;
      CONST CM_REMOVEDETAILFIELDINFO     = 00345H;
      CONST CM_REMOVERECORD              = 00346H;
      CONST CM_SCROLLWINDOW              = 00347H;
      CONST CM_SEARCHSTRING              = 00348H;
      CONST CM_SETCNRINFO                = 00349H;
      CONST CM_SETRECORDEMPHASIS         = 0034aH;
      CONST CM_SORTRECORD                = 0034bH;
      CONST CM_OPENEDIT                  = 0034cH;
      CONST CM_CLOSEEDIT                 = 0034dH;
      CONST CM_COLLAPSETREE              = 0034eH;
      CONST CM_EXPANDTREE                = 0034fH;
      CONST CM_QUERYRECORDINFO           = 00350H;

      (**********************************************************************)
      (* Container notifications                                            *)
      (**********************************************************************)
      CONST CN_DRAGAFTER                 = 101;
      CONST CN_DRAGLEAVE                 = 102;
      CONST CN_DRAGOVER                  = 103;
      CONST CN_DROP                      = 104;
      CONST CN_DROPHELP                  = 105;
      CONST CN_ENTER                     = 106;
      CONST CN_INITDRAG                  = 107;
      CONST CN_EMPHASIS                  = 108;
      CONST CN_KILLFOCUS                 = 109;
      CONST CN_SCROLL                    = 110;
      CONST CN_QUERYDELTA                = 111;
      CONST CN_SETFOCUS                  = 112;
      CONST CN_REALLOCPSZ                = 113;
      CONST CN_BEGINEDIT                 = 114;
      CONST CN_ENDEDIT                   = 115;
      CONST CN_COLLAPSETREE              = 116;
      CONST CN_EXPANDTREE                = 117;
      CONST CN_HELP                      = 118;
      CONST CN_CONTEXTMENU               = 119;

      (**********************************************************************)
      (*   Data Structures for Message Parameters                           *)
      (**********************************************************************)

      (**********************************************************************)
      (* Container Direct Manipulation structures                           *)
      (**********************************************************************)
      TYPE CNRDRAGINIT = RECORD    (* cdrginit *)
            hwndCnr:     HWND        ; (* Container window handle   *)
            pRecord:     PRECORDCORE ; (* record under mouse ptr    *)
            x:           LONG        ; (* x coordinate of mouse ptr *)
            y:           LONG        ; (* y coordinate of mouse ptr *)
            cx:          LONG        ; (* x offset from record      *)
            cy:          LONG        ; (* y offset from record      *)
      END;
      TYPE PCNRDRAGINIT = POINTER TO CNRDRAGINIT;

      (**********************************************************************)
      (* Data structure for CM_INSERTDETAILFIELDINFO                        *)
      (* This structure is used by the application to specify the position  *)
      (* of the FieldInfo structures they are inserting.                    *)
      (**********************************************************************)
      TYPE FIELDINFOINSERT = RECORD    (* fiins *)
            cb:                   ULONG       ; (* Size of structure.             *)
            pFieldInfoOrder:      PFIELDINFO  ; (* Specifies the order of the     *)
            (*                                     FieldInfo structures.          *)
            fInvalidateFieldInfo: ULONG       ; (* Invalidate on Insert.          *)
            cFieldInfoInsert:     ULONG       ; (* The number of FieldInfo        *)
            (*                                     structures to insert.          *)
      END;
      TYPE PFIELDINFOINSERT = POINTER TO FIELDINFOINSERT;

      (**********************************************************************)
      (* Data structure for CM_INSERTRECORD                                 *)
      (**********************************************************************)
      TYPE RECORDINSERT = RECORD    (* recins *)
            cb:                     ULONG;
            pRecordOrder:           PRECORDCORE;
            pRecordParent:          PRECORDCORE;
            fInvalidateRecord:      ULONG;
            zOrder:                 ULONG;
            cRecordsInsert:         ULONG;
      END;
      TYPE PRECORDINSERT = POINTER TO RECORDINSERT;

      (**********************************************************************)
      (* Data structure for CM_QUERYRECORDFROMRECT                          *)
      (**********************************************************************)
      TYPE QUERYRECFROMRECT = RECORD    (* qrecfrct *)
            cb:       ULONG;
            rect:     RECTL;
            fsSearch: ULONG;
      END;
      TYPE PQUERYRECFROMRECT = POINTER TO QUERYRECFROMRECT;

      (**********************************************************************)
      (* Data structure for CM_QUERYRECORDRECT                              *)
      (**********************************************************************)
      TYPE QUERYRECORDRECT = RECORD    (* qrecrct *)
            cb:                   ULONG;
            pRecord:              PRECORDCORE;
            fRightSplitWindow:    ULONG;
            fsExtent:             ULONG;
      END;
      TYPE PQUERYRECORDRECT = POINTER TO QUERYRECORDRECT;

      (**********************************************************************)
      (* Data structure for CM_SEARCHSTRING                                 *)
      (**********************************************************************)
      TYPE SEARCHSTRING = RECORD    (* srchstr *)
            cb:                ULONG;
            pszSearch:         PSZ;
            fsPrefix:          ULONG;
            fsCaseSensitive:   ULONG;
            usView:            ULONG;
      END;
      TYPE PSEARCHSTRING = POINTER TO SEARCHSTRING;

   <* IF DEFINED (INCL_WINSTDDRAG)  THEN *>
            (*******************************************************************)
            (* Data Structure for CN_DRAGLEAVE,CN_DRAGOVER,CN_DROP,CN_DROPHELP *)
            (*******************************************************************)
            TYPE CNRDRAGINFO = RECORD    (* cdrginfo *)
                  pDragInfo: PDRAGINFO;
                  pRecord:   PRECORDCORE;
            END;
            TYPE PCNRDRAGINFO = POINTER TO CNRDRAGINFO;
   <* END *>

      (**********************************************************************)
      (* Data structure for CN_EMPHASIS                                     *)
      (**********************************************************************)
      TYPE NOTIFYRECORDEMPHASIS = RECORD    (* nrecemph *)
            hwndCnr:          HWND;
            pRecord:          PRECORDCORE;
            fEmphasisMask:    ULONG;
      END;
      TYPE PNOTIFYRECORDEMPHASIS = POINTER TO NOTIFYRECORDEMPHASIS;

      (**********************************************************************)
      (* Data structure for CN_ENTER                                        *)
      (**********************************************************************)
      TYPE NOTIFYRECORDENTER = RECORD    (* notrecen *)
            hwndCnr:       HWND;
            fKey:          ULONG;
            pRecord:       PRECORDCORE;
      END;
      TYPE PNOTIFYRECORDENTER = POINTER TO NOTIFYRECORDENTER;

      (**********************************************************************)
      (* Data structure for CN_QUERYDELTA                                   *)
      (**********************************************************************)
      TYPE NOTIFYDELTA = RECORD    (* notdlt *)
            hwndCnr: HWND;
            fDelta:  ULONG;
      END;
      TYPE PNOTIFYDELTA = POINTER TO NOTIFYDELTA;

      (**********************************************************************)
      (* Data structure for CN_SCROLL                                       *)
      (**********************************************************************)
      TYPE NOTIFYSCROLL = RECORD    (* notscr *)
            hwndCnr:      HWND;
            lScrollInc:   LONG;
            fScroll:      ULONG;
      END;
      TYPE PNOTIFYSCROLL = POINTER TO NOTIFYSCROLL;

      (**********************************************************************)
      (* Data structure for CN_REALLOCPSZ                                   *)
      (**********************************************************************)
      TYPE CNREDITDATA = RECORD    (* cnredat *)
            cb:           ULONG;
            hwndCnr:      HWND;
            pRecord:      PRECORDCORE;
            pFieldInfo:   PFIELDINFO;
            ppszText:     POINTER TO PSZ; (*  address of PSZ        *)
            cbText:       ULONG        ;  (* size of the new text  *)
            id:           ULONG;
      END;
      TYPE PCNREDITDATA = POINTER TO CNREDITDATA;

      (**********************************************************************)
      (* Data structure for CM_PAINTBACKGROUND                              *)
      (**********************************************************************)
      TYPE OWNERBACKGROUND = RECORD    (* ownbckg *)
            hwnd:            HWND;
            hps:             HPS;
            rclBackground:   RECTL;
            idWindow:        LONG;
      END;
      TYPE POWNERBACKGROUND = POINTER TO OWNERBACKGROUND;

      (**********************************************************************)
      (* Data structure used as part of WM_DRAWITEM                         *)
      (**********************************************************************)
      TYPE CNRDRAWITEMINFO = RECORD    (* cnrdrwii *)
            pRecord:    PRECORDCORE;
            pFieldInfo: PFIELDINFO;
      END;
      TYPE PCNRDRAWITEMINFO = POINTER TO CNRDRAWITEMINFO;

      (**********************************************************************)
      (* Message parameter flags                                            *)
      (**********************************************************************)
      CONST CMA_TOP            =  00001H;     (* Place at top of zorder   *)
      CONST CMA_BOTTOM         =  00002H;     (* Place at bottom of zorder*)
      CONST CMA_LEFT           =  00004H;
      CONST CMA_RIGHT          =  00008H;

      CONST CMA_FIRST          =  00010H;     (* Add record as first      *)
      CONST CMA_LAST           =  00020H;
      CONST CMA_END            =  00040H;     (* Add record to end of list*)
      CONST CMA_PREV           =  00080H;
      CONST CMA_NEXT           =  00100H;

      CONST CMA_HORIZONTAL     =  00200H;
      CONST CMA_VERTICAL       =  00400H;
      CONST CMA_ICON           =  00800H;
      CONST CMA_TEXT           =  01000H;
      CONST CMA_PARTIAL        =  02000H;
      CONST CMA_COMPLETE       =  04000H;

      CONST CMA_PARENT         =  00001H;
      CONST CMA_FIRSTCHILD     =  00002H;
      CONST CMA_LASTCHILD      =  00004H;

      CONST CMA_CNRTITLE       =  00001H;     (* Container title          *)
      CONST CMA_DELTA          =  00002H;     (* Application defined      *)
      CONST CMA_FLWINDOWATTR   =  00004H;     (* Container attributes     *)
      CONST CMA_LINESPACING    =  00008H;
      CONST CMA_PFIELDINFOLAST =  00010H;     (* Ptr to last column in    *)

      CONST CMA_PSORTRECORD    =  00020H;     (* Pointer to sort function *)
      CONST CMA_PTLORIGIN      =  00040H;     (* Lower left origin        *)
      CONST CMA_SLBITMAPORICON =  00080H;     (* Size  of bitmap          *)
      CONST CMA_XVERTSPLITBAR  =  00100H;     (* Splitbar position        *)
      CONST CMA_PFIELDINFOOBJECT= 00200H;     (* Pointer to IN-USE        *)
      (*                                             emphasis column.       *)

      CONST CMA_TREEICON          = 00400H;   (* Icon for tree node      *)
      CONST CMA_TREEBITMAP        = 00800H;   (* bitmap for tree node    *)
      CONST CMA_CXTREEINDENT      = 01000H;   (* indent for children     *)
      CONST CMA_CXTREELINE        = 02000H;   (* thickness of tree line  *)
      CONST CMA_SLTREEBITMAPORICON= 04000H;   (* size of icon of tree node *)

      CONST CMA_ITEMORDER       = 00001H;     (* QueryRecord search flags *)
      CONST CMA_WINDOW          = 00002H;
      CONST CMA_WORKSPACE       = 00004H;
      CONST CMA_ZORDER          = 00008H;

      CONST CMA_DELTATOP        = 00001H;     (* Industrial - top delta   *)
      CONST CMA_DELTABOT        = 00002H;     (* Industrial - bottom delta*)
      CONST CMA_DELTAHOME       = 00004H;     (* Industrial - top of list *)
      CONST CMA_DELTAEND        = 00008H;     (* Industrial - end of list *)

      CONST CMA_NOREPOSITION    = 00001H;     (* InvalidateRecord flags   *)
      CONST CMA_REPOSITION      = 00002H;
      CONST CMA_TEXTCHANGED     = 00004H;
      CONST CMA_ERASE           = 00008H;

      CONST CMA_FREE            = 00001H;
      CONST CMA_INVALIDATE      = 00002H;

<* END *>


<* IF NOT (DEFINED (INCL_WINSTDSLIDER_INCLUDED) & DEFINED (INCL_WINSTDSLIDER) ) THEN *>
   <* NEW INCL_WINSTDSLIDER_INCLUDED + *>
      (**********************************************************************)
      (*                                                                    *)
      (*                            S L I D E R                             *)
      (*                                                                    *)
      (**********************************************************************)

      (**********************************************************************)
      (* Define messages for the slider control                             *)
      (**********************************************************************)
      CONST SLM_ADDDETENT         = 00369H;  (* Add detent niche          *)
      CONST SLM_QUERYDETENTPOS    = 0036aH;  (* Query position of detent  *)
      CONST SLM_QUERYSCALETEXT    = 0036bH;  (* Query text at tick number *)
      CONST SLM_QUERYSLIDERINFO   = 0036cH;  (* Query slider information  *)
      CONST SLM_QUERYTICKPOS      = 0036dH;  (* Query position of tick    *)
      CONST SLM_QUERYTICKSIZE     = 0036eH;  (* Query size of tick        *)
      CONST SLM_REMOVEDETENT      = 0036fH;  (* Remove detent niche       *)
      CONST SLM_SETSCALETEXT      = 00370H;  (* Set text above tick       *)
      CONST SLM_SETSLIDERINFO     = 00371H;  (* Set slider parameters     *)
      CONST SLM_SETTICKSIZE       = 00372H;  (* Set size of tick          *)
      CONST SLN_CHANGE            = 1;        (* Slider position changed   *)
      CONST SLN_SLIDERTRACK       = 2;        (* Slider dragged by user    *)
      CONST SLN_SETFOCUS          = 3;        (* Slider gaining focus      *)
      CONST SLN_KILLFOCUS         = 4;        (* Slider losing focus       *)

      (**********************************************************************)
      (* Slider control data structure                                      *)
      (**********************************************************************)
      TYPE SLDCDATA = RECORD    (* sldcd *)
            cbSize:                 ULONG   ; (* Size of control block             *)
            usScale1Increments:     USHORT  ; (* # of divisions on scale           *)
            usScale1Spacing:        USHORT  ; (* Space in pels between increments  *)
            usScale2Increments:     USHORT  ; (* # of divisions on scale           *)
            usScale2Spacing:        USHORT  ; (* Space in pels between increments  *)
      END;
      TYPE PSLDCDATA = POINTER TO SLDCDATA;

      (**********************************************************************)
      (* Slider control style flag definition                               *)
      (**********************************************************************)
      CONST SLS_HORIZONTAL      = 000000000H;(* Orient slider horizontally*)
      CONST SLS_VERTICAL        = 000000001H;(* Orient slider vertically  *)
      CONST SLS_CENTER          = 000000000H;(* Center shaft in window    *)
      CONST SLS_BOTTOM          = 000000002H;(* Offset shaft to bottom (H)*)
      CONST SLS_TOP             = 000000004H;(* Offset shaft to top (H)   *)
      CONST SLS_LEFT            = 000000002H;(* Offset shaft to left (V)  *)
      CONST SLS_RIGHT           = 000000004H;(* Offset shaft to right (V) *)
      CONST SLS_SNAPTOINCREMENT = 000000008H;(* Snap to nearest increment *)
      CONST SLS_BUTTONSBOTTOM   = 000000010H;(* Add buttons at shaft bot. *)
      CONST SLS_BUTTONSTOP      = 000000020H;(* Add buttons at shaft top  *)
      CONST SLS_BUTTONSLEFT     = 000000010H;(* Add buttons left of shaft *)
      CONST SLS_BUTTONSRIGHT    = 000000020H;(* Add buttons right of shaft*)
      CONST SLS_OWNERDRAW       = 000000040H;(* Owner draw some fields    *)
      CONST SLS_READONLY        = 000000080H;(* Provide a read only slider*)
      CONST SLS_RIBBONSTRIP     = 000000100H;(* Provide a ribbon strip    *)
      CONST SLS_HOMEBOTTOM      = 000000000H;(* Set home position at bot. *)
      CONST SLS_HOMETOP         = 000000200H;(* Set home position at top  *)
      CONST SLS_HOMELEFT        = 000000000H;(* Set home position at left *)
      CONST SLS_HOMERIGHT       = 000000200H;(* Set home position at right*)
      CONST SLS_PRIMARYSCALE1   = 000000000H;(* Scale 1 is primary scale  *)
      CONST SLS_PRIMARYSCALE2   = 000000400H;(* Scale 2 is primary scale  *)

      (**********************************************************************)
      (* Message attributes for setting and querying slider components      *)
      (**********************************************************************)
      CONST SMA_SCALE1              = 00001H;
      CONST SMA_SCALE2              = 00002H;
      CONST SMA_SHAFTDIMENSIONS     = 00000H;
      CONST SMA_SHAFTPOSITION       = 00001H;
      CONST SMA_SLIDERARMDIMENSIONS = 00002H;
      CONST SMA_SLIDERARMPOSITION   = 00003H;
      CONST SMA_RANGEVALUE          = 00000H;
      CONST SMA_INCREMENTVALUE      = 00001H;
      CONST SMA_SETALLTICKS         = 0FFFFH;

      (**********************************************************************)
      (* Ownerdraw flag definitions                                         *)
      (**********************************************************************)
      CONST SDA_RIBBONSTRIP         = 00001H;
      CONST SDA_SLIDERSHAFT         = 00002H;
      CONST SDA_BACKGROUND          = 00003H;
      CONST SDA_SLIDERARM           = 00004H;

      (**********************************************************************)
      (* Error return codes                                                 *)
      (**********************************************************************)
      CONST PMERR_UPDATE_IN_PROGRESS   =     01f06H;
      CONST SLDERR_INVALID_PARAMETERS  =   -1;

<* END *>


<* IF NOT (DEFINED (INCL_WINSTDVALSET_INCLUDED) & DEFINED (INCL_WINSTDVALSET) ) THEN *>
   <* NEW INCL_WINSTDVALSET_INCLUDED + *>
      (**********************************************************************)
      (*                                                                    *)
      (*                         V A L U E   S E T                          *)
      (*                                                                    *)
      (**********************************************************************)

      (**********************************************************************)
      (* Define messages for the value set control                          *)
      (**********************************************************************)
      CONST VM_QUERYITEM          = 00375H;  (* Query item at location    *)
      CONST VM_QUERYITEMATTR      = 00376H;  (* Query item attributes     *)
      CONST VM_QUERYMETRICS       = 00377H;  (* Query metrics of control  *)
      CONST VM_QUERYSELECTEDITEM  = 00378H;  (* Query selected item       *)
      CONST VM_SELECTITEM         = 00379H;  (* Set selected item         *)
      CONST VM_SETITEM            = 0037aH;  (* Set item at location      *)
      CONST VM_SETITEMATTR        = 0037bH;  (* Set item attributes       *)
      CONST VM_SETMETRICS         = 0037cH;  (* Set metrics of control    *)

      CONST VN_SELECT             = 120;      (* Item selected by user     *)
      CONST VN_ENTER              = 121;      (* Item entered by user      *)
      CONST VN_DRAGLEAVE          = 122;      (* Drag left control         *)
      CONST VN_DRAGOVER           = 123;      (* Drag is over item         *)
      CONST VN_DROP               = 124;      (* Drop occurred on item     *)
      CONST VN_DROPHELP           = 125;      (* Request help for drop     *)
      CONST VN_INITDRAG           = 126;      (* Drag initiated on item    *)
      CONST VN_SETFOCUS           = 127;      (* Value set gaining focus   *)
      CONST VN_KILLFOCUS          = 128;      (* Value set losing focus    *)
      CONST VN_HELP               = 129;      (* Help requested by user    *)

      (**********************************************************************)
      (* Value set control data structure                                   *)
      (**********************************************************************)
      TYPE VSCDATA = RECORD    (* vscd *)
            cbSize:             ULONG   ; (* Size of control block             *)
            usRowCount:         USHORT  ; (* Number of rows in value set       *)
            usColumnCount:      USHORT  ; (* Number of columns in value set    *)
      END;
      TYPE PVSCDATA = POINTER TO VSCDATA;

      (**********************************************************************)
      (* Value set drag initialization structure                            *)
      (**********************************************************************)
      TYPE VSDRAGINIT = RECORD    (* vsdinit *)
            hwnd:          HWND    ; (* Window handle of value set control*)
            x:             LONG    ; (* X coordinate of pointer on desktop*)
            y:             LONG    ; (* Y coordinate of pointer on desktop*)
            cx:            LONG    ; (* X offset from pointer hot spot    *)
            cy:            LONG    ; (* Y offset from pointer hot spot    *)
            usRow:         USHORT  ; (* Number of rows in value set       *)
            usColumn:      USHORT  ; (* Number of columns in value set    *)
      END;
      TYPE PVSDRAGINIT = POINTER TO VSDRAGINIT;

   <* IF DEFINED (INCL_WINSTDDRAG)  THEN *>
            (*******************************************************************)
            (* Value set drag information structure                            *)
            (*******************************************************************)
            TYPE VSDRAGINFO = RECORD    (* vsdinfo *)
                  pDragInfo:    PDRAGINFO ; (* Pointer to a drag info structure *)
                  usRow:        USHORT    ; (* Number of rows in value set      *)
                  usColumn:     USHORT    ; (* Number of columns in value set   *)
            END;
            TYPE PVSDRAGINFO = POINTER TO VSDRAGINFO;
   <* END *>

      (**********************************************************************)
      (* Value set query item text structure                                *)
      (**********************************************************************)
      TYPE VSTEXT = RECORD    (* vstext *)
            pszItemText: PSZ       ; (* Pointer to string for item text      *)
            ulBufLen:    ULONG     ; (* Length of buffer to copy string into *)
      END;
      TYPE PVSTEXT = POINTER TO VSTEXT;

      (**********************************************************************)
      (* Value set control style flag definition                            *)
      (**********************************************************************)
      CONST VS_BITMAP      = 00001H; (* Default all items to bitmaps      *)
      CONST VS_ICON        = 00002H; (* Default all items to icons        *)
      CONST VS_TEXT        = 00004H; (* Default all items to text strings *)
      CONST VS_RGB         = 00008H; (* Default all items to color info   *)
      CONST VS_COLORINDEX  = 00010H; (* Default all items to color indices*)
      CONST VS_BORDER      = 00020H; (* Add a border around the control   *)
      CONST VS_ITEMBORDER  = 00040H; (* Add a border around each item     *)
      CONST VS_SCALEBITMAPS= 00080H; (* Scale bitmaps to cell size        *)
      CONST VS_RIGHTTOLEFT = 00100H; (* Support right to left ordering    *)
      CONST VS_OWNERDRAW   = 00200H; (* Owner draws value set background  *)

      (**********************************************************************)
      (* Value set item attribute definition                                *)
      (**********************************************************************)
      CONST VIA_BITMAP      = 00001H;(* If set, item contains a bitmap    *)
      CONST VIA_ICON        = 00002H;(* If set, item contains an icon     *)
      CONST VIA_TEXT        = 00004H;(* If set, item contains text string *)
      CONST VIA_RGB         = 00008H;(* If set, item contains color value *)
      CONST VIA_COLORINDEX  = 00010H;(* If set, item contains color index *)
      CONST VIA_OWNERDRAW   = 00020H;(* If set, item is ownerdraw         *)
      CONST VIA_DISABLED    = 00040H;(* If set, item is unselectable      *)
      CONST VIA_DRAGGABLE   = 00080H;(* If set, item can be source of drag*)
      CONST VIA_DROPONABLE  = 00100H;(* If set, item can be target of drop*)

      (**********************************************************************)
      (* Message parameter attributes for sizing and spacing of items       *)
      (**********************************************************************)
      CONST VMA_ITEMSIZE       =      00001H;
      CONST VMA_ITEMSPACING    =      00002H;

      (**********************************************************************)
      (* Ownerdraw flag definitions                                         *)
      (**********************************************************************)
      CONST VDA_ITEM              =   00001H;
      CONST VDA_ITEMBACKGROUND    =   00002H;
      CONST VDA_SURROUNDING       =   00003H;
      CONST VDA_BACKGROUND        =   00004H;

      (**********************************************************************)
      (* Error return codes                                                 *)
      (**********************************************************************)
      CONST VSERR_INVALID_PARAMETERS   = -1;

<* END *>


<* IF NOT (DEFINED (INCL_WINSTDBOOK_INCLUDED) & DEFINED (INCL_WINSTDBOOK) ) THEN *>
   <* NEW INCL_WINSTDBOOK_INCLUDED + *>
      (**********************************************************************)
      (*                                                                    *)
      (*                          N O T E B O O K                           *)
      (*                                                                    *)
      (**********************************************************************)

      (**********************************************************************)
      (* Message ids                                                        *)
      (**********************************************************************)
      CONST BKM_CALCPAGERECT        = 00353H;(* Calc book/page rectangle  *)
      CONST BKM_DELETEPAGE          = 00354H;(* Delete page(s)            *)
      CONST BKM_INSERTPAGE          = 00355H;(* Insert page               *)
      CONST BKM_INVALIDATETABS      = 00356H;(* Invalidate tab area       *)
      CONST BKM_TURNTOPAGE          = 00357H;(* Turn to page              *)
      CONST BKM_QUERYPAGECOUNT      = 00358H;(* Query number of pages     *)
      CONST BKM_QUERYPAGEID         = 00359H;(* Query page identifier     *)
      CONST BKM_QUERYPAGEDATA       = 0035aH;(* Query page user data      *)
      CONST BKM_QUERYPAGEWINDOWHWND = 0035bH;(* Query page window handle  *)
      CONST BKM_QUERYTABBITMAP      = 0035cH;(* Query tab bitmap handle   *)
      CONST BKM_QUERYTABTEXT        = 0035dH;(* Query tab text pointer    *)
      CONST BKM_SETDIMENSIONS       = 0035eH;(* Set tab/dogear dimensions *)
      CONST BKM_SETPAGEDATA         = 0035fH;(* Set page user data        *)
      CONST BKM_SETPAGEWINDOWHWND   = 00360H;(* Set page window handle    *)
      CONST BKM_SETSTATUSLINETEXT   = 00361H;(* Set status line text      *)
      CONST BKM_SETTABBITMAP        = 00362H;(* Set tab bitmap            *)
      CONST BKM_SETTABTEXT          = 00363H;(* Set tab text              *)
      CONST BKM_SETNOTEBOOKCOLORS   = 00364H;(* Set Notebook colors       *)
      CONST BKM_QUERYPAGESTYLE      = 00365H;(* Query page style          *)
      CONST BKM_QUERYSTATUSLINETEXT = 00366H;(* Query status line text    *)

      CONST BKN_PAGESELECTED        = 130;    (* New page selected by user *)
      CONST BKN_NEWPAGESIZE         = 131;    (* App page size changed     *)
      CONST BKN_HELP                = 132;    (* Help notification         *)
      CONST BKN_PAGEDELETED         = 133;    (* Page deleted notification *)

      (**********************************************************************)
      (* Page deletion flags (usDeleteFlag)                                 *)
      (**********************************************************************)
      CONST BKA_ALL                 = 00001H;(* all pages                 *)
      CONST BKA_SINGLE              = 00002H;(* single page               *)
      CONST BKA_TAB                 = 00004H;(* minor/major section       *)

      (**********************************************************************)
      (* Page insertion/query order (usPageOrder, usQueryOrder)             *)
      (**********************************************************************)
      CONST BKA_LAST                = 00002H;(* Insert/Query last page    *)
      CONST BKA_FIRST               = 00004H;(* Insert/Query first page   *)
      CONST BKA_NEXT                = 00008H;(* Insert/Query after page   *)
      CONST BKA_PREV                = 00010H;(* Insert/Query before page  *)
      CONST BKA_TOP                 = 00020H;(* Query topmost page        *)

      (**********************************************************************)
      (* Notebook region types (usBookRegion, usType)                       *)
      (**********************************************************************)
      CONST BKA_MAJORTAB            = 00001H;(* Major Tab                 *)
      CONST BKA_MINORTAB            = 00002H;(* Minor Tab                 *)
      CONST BKA_PAGEBUTTON          = 00100H;(* Page Turning Button       *)

      (**********************************************************************)
      (* Page insertion/query styles (usPageStyle,usQueryEnd)               *)
      (**********************************************************************)
      CONST BKA_STATUSTEXTON        = 00001H;(* status area text          *)
      CONST BKA_MAJOR               = 00040H;(* Major Tab                 *)
      CONST BKA_MINOR               = 00080H;(* Minor Tab                 *)
      CONST BKA_AUTOPAGESIZE        = 00100H;(* Page window position/size *)
      CONST BKA_END                 = 00200H;(* Query to end of book      *)

      (**********************************************************************)
      (* Tab window contents (usTabDisplay)                                 *)
      (**********************************************************************)
      CONST BKA_TEXT                = 00400H;(* text data                 *)
      CONST BKA_BITMAP              = 00800H;(* bitmap                    *)

      (**********************************************************************)
      (* Notebook window styles (ulNotebookStyles)                          *)
      (**********************************************************************)

      (**********************************************************************)
      (* Backpage Orientation                                               *)
      (**********************************************************************)
      CONST BKS_BACKPAGESBR         = 000000001H;(* Bottom right          *)
      CONST BKS_BACKPAGESBL         = 000000002H;(* Bottom left           *)
      CONST BKS_BACKPAGESTR         = 000000004H;(* Top right             *)
      CONST BKS_BACKPAGESTL         = 000000008H;(* Top left              *)

      (**********************************************************************)
      (* Major Tab Side                                                     *)
      (**********************************************************************)
      CONST BKS_MAJORTABRIGHT       = 000000010H;(* Major tabs right      *)
      CONST BKS_MAJORTABLEFT        = 000000020H;(* Major tabs left       *)
      CONST BKS_MAJORTABTOP         = 000000040H;(* Major tabs top        *)
      CONST BKS_MAJORTABBOTTOM      = 000000080H;(* Major tabs bottom     *)

      (**********************************************************************)
      (* Tab Type                                                           *)
      (**********************************************************************)
      CONST BKS_SQUARETABS          = 000000000H;(* Square edged tabs     *)
      CONST BKS_ROUNDEDTABS         = 000000100H;(* Round edged tabs      *)
      CONST BKS_POLYGONTABS         = 000000200H;(* Polygon edged tabs    *)

      (**********************************************************************)
      (* Binding type                                                       *)
      (**********************************************************************)
      CONST BKS_SOLIDBIND           = 000000000H;(* Solid binding         *)
      CONST BKS_SPIRALBIND          = 000000400H;(* Spiral binding        *)

      (**********************************************************************)
      (* Status line text justification                                     *)
      (**********************************************************************)
      CONST BKS_STATUSTEXTLEFT      = 000000000H;(* Left justify text     *)
      CONST BKS_STATUSTEXTRIGHT     = 000001000H;(* Right justify text    *)
      CONST BKS_STATUSTEXTCENTER    = 000002000H;(* Center text           *)

      (**********************************************************************)
      (* Tab text justification                                             *)
      (**********************************************************************)
      CONST BKS_TABTEXTLEFT         = 000000000H;(* Left justify tab text *)
      CONST BKS_TABTEXTRIGHT        = 000004000H;(* Right justify tab text*)
      CONST BKS_TABTEXTCENTER       = 000008000H;(* Center tab text       *)

      (**********************************************************************)
      (* Notebook color presentation param attributes                       *)
      (**********************************************************************)
      CONST BKA_BACKGROUNDPAGECOLORINDEX = 00001H;(* Page Background       *)
      CONST BKA_BACKGROUNDPAGECOLOR      = 00002H;
      CONST BKA_BACKGROUNDMAJORCOLORINDEX= 00003H;(* Major Tab Background  *)
      CONST BKA_BACKGROUNDMAJORCOLOR     = 00004H;
      CONST BKA_BACKGROUNDMINORCOLORINDEX= 00005H;(* Minor Tab Background  *)
      CONST BKA_BACKGROUNDMINORCOLOR     = 00006H;
      CONST BKA_FOREGROUNDMAJORCOLORINDEX= 00007H;(* Major Tab Text        *)
      CONST BKA_FOREGROUNDMAJORCOLOR     = 00008H;
      CONST BKA_FOREGROUNDMINORCOLORINDEX= 00009H;(* Minor Tab Text        *)
      CONST BKA_FOREGROUNDMINORCOLOR     = 0000AH;

      (**********************************************************************)
      (* Error message ids                                                  *)
      (**********************************************************************)
      CONST BOOKERR_INVALID_PARAMETERS  = -1; (* Invalid parameters        *)

      (**********************************************************************)
      (* BKM_QUERYTABTEXT and BKM_QUERYSTATUSLINETEXT message structure     *)
      (**********************************************************************)
      TYPE BOOKTEXT = RECORD    (* booktxt *)
            pString: PSZ    ; (* ptr to string buffer      *)
            textLen: ULONG  ; (* length of string to query *)
      END;
      TYPE PBOOKTEXT = POINTER TO BOOKTEXT;

      (**********************************************************************)
      (* BKN_PAGEDELETED notify message structure                           *)
      (**********************************************************************)
      TYPE DELETENOTIFY = RECORD    (* delntfy *)
            hwndBook:           HWND    ; (* Notebook window handle    *)
            hwndPage:           HWND    ; (* App. page window handle   *)
            ulAppPageData:      ULONG   ; (* App. page data            *)
            hbmTab:             HBITMAP ; (* App. tab bitmap handle    *)
      END;
      TYPE PDELETENOTIFY = POINTER TO DELETENOTIFY;

      (**********************************************************************)
      (* BKN_PAGESELECTED notify message structure                          *)
      (**********************************************************************)
      TYPE PAGESELECTNOTIFY = RECORD    (* pgsntfy *)
            hwndBook:    HWND    ; (* Notebook window handle    *)
            ulPageIdCur: ULONG   ; (* Previous top page id      *)
            ulPageIdNew: ULONG   ; (* New top Page id           *)
      END;
      TYPE PPAGESELECTNOTIFY = POINTER TO PAGESELECTNOTIFY;

<* END *>

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmstddlg.hm ------------- *)


(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pm.hm ------------- *)
<* END *>

<* END *>

(* ------------- Include file: .\hm\pmerr.hm ------------- *)
(****************************** Module Header ******************************\
*
* Module Name: PMERR.H
*
* This file contains all the public PM error codes.
*
* This file has been constructed to bring together all the error codes
* into one place.
*
* Copyright (c) International Business Machines Corporation 1981, 1988-1992
*
* ===========================================================================
*
* Comments at the end of each typedef line give the name tags used in
* the assembler include version of this file.
*
* The assembler include version of this file excludes lines between XLATOFF
* and XLATON comments.
*
\***************************************************************************)

<* NEW PMERR_INCLUDED + *>

(****************************************************************************
*** Window Manager error codes
****************************************************************************)

<* IF NOT DEFINED (INCL_WINERRORS)  THEN *>
   <* IF NOT DEFINED (INCL_WINERRORS_INCL)  THEN *>

      <* NEW INCL_WINERRORS_INCL + *>

            CONST PMERR_INVALID_HWND                 = 01001H;
            CONST PMERR_INVALID_HMQ                  = 01002H;
            CONST PMERR_PARAMETER_OUT_OF_RANGE       = 01003H;
            CONST PMERR_WINDOW_LOCK_UNDERFLOW        = 01004H;
            CONST PMERR_WINDOW_LOCK_OVERFLOW         = 01005H;
            CONST PMERR_BAD_WINDOW_LOCK_COUNT        = 01006H;
            CONST PMERR_WINDOW_NOT_LOCKED            = 01007H;
            CONST PMERR_INVALID_SELECTOR             = 01008H;
            CONST PMERR_CALL_FROM_WRONG_THREAD       = 01009H;
            CONST PMERR_RESOURCE_NOT_FOUND           = 0100AH;
            CONST PMERR_INVALID_STRING_PARM          = 0100BH;
            CONST PMERR_INVALID_HHEAP                = 0100CH;
            CONST PMERR_INVALID_HEAP_POINTER         = 0100DH;
            CONST PMERR_INVALID_HEAP_SIZE_PARM       = 0100EH;
            CONST PMERR_INVALID_HEAP_SIZE            = 0100FH;
            CONST PMERR_INVALID_HEAP_SIZE_WORD       = 01010H;
            CONST PMERR_HEAP_OUT_OF_MEMORY           = 01011H;
            CONST PMERR_HEAP_MAX_SIZE_REACHED        = 01012H;
            CONST PMERR_INVALID_HATOMTBL             = 01013H;
            CONST PMERR_INVALID_ATOM                 = 01014H;
            CONST PMERR_INVALID_ATOM_NAME            = 01015H;
            CONST PMERR_INVALID_INTEGER_ATOM         = 01016H;
            CONST PMERR_ATOM_NAME_NOT_FOUND          = 01017H;
            CONST PMERR_QUEUE_TOO_LARGE              = 01018H;
            CONST PMERR_INVALID_FLAG                 = 01019H;
            CONST PMERR_INVALID_HACCEL               = 0101AH;
            CONST PMERR_INVALID_HPTR                 = 0101BH;
            CONST PMERR_INVALID_HENUM                = 0101CH;
            CONST PMERR_INVALID_SRC_CODEPAGE         = 0101DH;
            CONST PMERR_INVALID_DST_CODEPAGE         = 0101EH;

            (* These are not real error codes, but just used to access special  *)
            (* error message strings used by WinGetErrorInfo to format an error *)
            (* message.                                                         *)

            CONST PMERR_UNKNOWN_COMPONENT_ID         = 0101fH;
            CONST PMERR_UNKNOWN_ERROR_CODE           = 01020H;
            CONST PMERR_SEVERITY_LEVELS              = 01021H;

            (* 01022 - 01033, 01035, 0104B - 0104C used elsewhere          *)
            CONST PMERR_INVALID_RESOURCE_FORMAT      = 01034H;
            CONST WINDBG_WINDOW_UNLOCK_WAIT          = 01035H;
            CONST PMERR_NO_MSG_QUEUE                 = 01036H;
            CONST PMERR_WIN_DEBUGMSG                 = 01037H;
            CONST PMERR_QUEUE_FULL                   = 01038H;

            CONST PMERR_LIBRARY_LOAD_FAILED          = 01039H;
            CONST PMERR_PROCEDURE_LOAD_FAILED        = 0103AH;
            CONST PMERR_LIBRARY_DELETE_FAILED        = 0103BH;
            CONST PMERR_PROCEDURE_DELETE_FAILED      = 0103CH;
            CONST PMERR_ARRAY_TOO_LARGE              = 0103DH;
            CONST PMERR_ARRAY_TOO_SMALL              = 0103EH;
            CONST PMERR_DATATYPE_ENTRY_BAD_INDEX     = 0103FH;
            CONST PMERR_DATATYPE_ENTRY_CTL_BAD       = 01040H;
            CONST PMERR_DATATYPE_ENTRY_CTL_MISS      = 01041H;
            CONST PMERR_DATATYPE_ENTRY_INVALID       = 01042H;
            CONST PMERR_DATATYPE_ENTRY_NOT_NUM       = 01043H;
            CONST PMERR_DATATYPE_ENTRY_NOT_OFF       = 01044H;
            CONST PMERR_DATATYPE_INVALID             = 01045H;
            CONST PMERR_DATATYPE_NOT_UNIQUE          = 01046H;
            CONST PMERR_DATATYPE_TOO_LONG            = 01047H;
            CONST PMERR_DATATYPE_TOO_SMALL           = 01048H;
            CONST PMERR_DIRECTION_INVALID            = 01049H;
            CONST PMERR_INVALID_HAB                  = 0104AH;
            CONST PMERR_INVALID_HSTRUCT              = 0104DH;
            CONST PMERR_LENGTH_TOO_SMALL             = 0104EH;
            CONST PMERR_MSGID_TOO_SMALL              = 0104FH;
            CONST PMERR_NO_HANDLE_ALLOC              = 01050H;
            CONST PMERR_NOT_IN_A_PM_SESSION          = 01051H;
            CONST PMERR_MSG_QUEUE_ALREADY_EXISTS     = 01052H;

            CONST PMERR_OLD_RESOURCE                 = 01055H;
   <* END *>
<* END *>

(***********************************************************************
*
*            Window Manager error codes
*
* 2.) PMSHL error codes
*
***********************************************************************)

<* IF DEFINED (INCL_SHLERRORS)  THEN *>

   <* IF NOT DEFINED (INCL_SHLERRORS_INCL)  THEN *>
            (* XLATOFF *)
      <* NEW INCL_SHLERRORS_INCL + *>
            (* XLATON *)

            CONST PMERR_INVALID_PIB               = 01101H;
            CONST PMERR_INSUFF_SPACE_TO_ADD       = 01102H;
            CONST PMERR_INVALID_GROUP_HANDLE      = 01103H;
            CONST PMERR_DUPLICATE_TITLE           = 01104H;
            CONST PMERR_INVALID_TITLE             = 01105H;
            CONST PMERR_HANDLE_NOT_IN_GROUP       = 01107H;
            CONST PMERR_INVALID_TARGET_HANDLE     = 01106H;
            CONST PMERR_INVALID_PATH_STATEMENT    = 01108H;
            CONST PMERR_NO_PROGRAM_FOUND          = 01109H;
            CONST PMERR_INVALID_BUFFER_SIZE       = 0110AH;
            CONST PMERR_BUFFER_TOO_SMALL          = 0110BH;
            CONST PMERR_PL_INITIALISATION_FAIL    = 0110CH;
            CONST PMERR_CANT_DESTROY_SYS_GROUP    = 0110DH;
            CONST PMERR_INVALID_TYPE_CHANGE       = 0110EH;
            CONST PMERR_INVALID_PROGRAM_HANDLE    = 0110FH;

            CONST PMERR_NOT_CURRENT_PL_VERSION    = 01110H;
            CONST PMERR_INVALID_CIRCULAR_REF      = 01111H;
            CONST PMERR_MEMORY_ALLOCATION_ERR     = 01112H;
            CONST PMERR_MEMORY_DEALLOCATION_ERR   = 01113H;
            CONST PMERR_TASK_HEADER_TOO_BIG       = 01114H;

            CONST PMERR_INVALID_INI_FILE_HANDLE   = 01115H;
            CONST PMERR_MEMORY_SHARE              = 01116H;
            CONST PMERR_OPEN_QUEUE                = 01117H;
            CONST PMERR_CREATE_QUEUE              = 01118H;
            CONST PMERR_WRITE_QUEUE               = 01119H;
            CONST PMERR_READ_QUEUE                = 0111AH;
            CONST PMERR_CALL_NOT_EXECUTED         = 0111BH;
            CONST PMERR_UNKNOWN_APIPKT            = 0111CH;
            CONST PMERR_INITHREAD_EXISTS          = 0111DH;
            CONST PMERR_CREATE_THREAD             = 0111EH;
            CONST PMERR_NO_HK_PROFILE_INSTALLED   = 0111FH;
            CONST PMERR_INVALID_DIRECTORY         = 01120H;
            CONST PMERR_WILDCARD_IN_FILENAME      = 01121H;
            CONST PMERR_FILENAME_BUFFER_FULL      = 01122H;
            CONST PMERR_FILENAME_TOO_LONG         = 01123H;
            CONST PMERR_INI_FILE_IS_SYS_OR_USER   = 01124H;
            CONST PMERR_BROADCAST_PLMSG           = 01125H;
            CONST PMERR_190_INIT_DONE             = 01126H;
            CONST PMERR_HMOD_FOR_PMSHAPI          = 01127H;
            CONST PMERR_SET_HK_PROFILE            = 01128H;
            CONST PMERR_API_NOT_ALLOWED           = 01129H;
            CONST PMERR_INI_STILL_OPEN            = 0112AH;

            CONST PMERR_PROGDETAILS_NOT_IN_INI    = 0112BH;
            CONST PMERR_PIBSTRUCT_NOT_IN_INI      = 0112CH;
            CONST PMERR_INVALID_DISKPROGDETAILS   = 0112DH;
            CONST PMERR_PROGDETAILS_READ_FAILURE  = 0112EH;
            CONST PMERR_PROGDETAILS_WRITE_FAILURE = 0112FH;
            CONST PMERR_PROGDETAILS_QSIZE_FAILURE = 01130H;
            CONST PMERR_INVALID_PROGDETAILS       = 01131H;
            CONST PMERR_SHEPROFILEHOOK_NOT_FOUND  = 01132H;
            CONST PMERR_190PLCONVERTED            = 01133H;
            CONST PMERR_FAILED_TO_CONVERT_INI_PL  = 01134H;
            CONST PMERR_PMSHAPI_NOT_INITIALISED   = 01135H;
            CONST PMERR_INVALID_SHELL_API_HOOK_ID = 01136H;

            CONST PMERR_DOS_ERROR                 = 01200H;

            CONST PMERR_NO_SPACE                  = 01201H;
            CONST PMERR_INVALID_SWITCH_HANDLE     = 01202H;
            CONST PMERR_NO_HANDLE                 = 01203H;
            CONST PMERR_INVALID_PROCESS_ID        = 01204H;
            CONST PMERR_NOT_SHELL                 = 01205H;
            CONST PMERR_INVALID_WINDOW            = 01206H;
            CONST PMERR_INVALID_POST_MSG          = 01207H;
            CONST PMERR_INVALID_PARAMETERS        = 01208H;
            CONST PMERR_INVALID_PROGRAM_TYPE      = 01209H;
            CONST PMERR_NOT_EXTENDED_FOCUS        = 0120AH;
            CONST PMERR_INVALID_SESSION_ID        = 0120BH;
            CONST PMERR_SMG_INVALID_ICON_FILE     = 0120CH;
            CONST PMERR_SMG_ICON_NOT_CREATED      = 0120DH;
            CONST PMERR_SHL_DEBUG                 = 0120EH;

            CONST PMERR_OPENING_INI_FILE          = 01301H;
            CONST PMERR_INI_FILE_CORRUPT          = 01302H;
            CONST PMERR_INVALID_PARM              = 01303H;
            CONST PMERR_NOT_IN_IDX                = 01304H;
            CONST PMERR_NO_ENTRIES_IN_GROUP       = 01305H;

            CONST PMERR_INI_WRITE_FAIL            = 01306H;
            CONST PMERR_IDX_FULL                  = 01307H;
            CONST PMERR_INI_PROTECTED             = 01308H;
            CONST PMERR_MEMORY_ALLOC              = 01309H;
            CONST PMERR_INI_INIT_ALREADY_DONE     = 0130AH;
            CONST PMERR_INVALID_INTEGER           = 0130BH;
            CONST PMERR_INVALID_ASCIIZ            = 0130CH;
            CONST PMERR_CAN_NOT_CALL_SPOOLER      = 0130DH;
            CONST PMERR_VALIDATION_REJECTED       = PMERR_CAN_NOT_CALL_SPOOLER;

            CONST PMERR_WARNING_WINDOW_NOT_KILLED = 01401H;
            CONST PMERR_ERROR_INVALID_WINDOW      = 01402H;
            CONST PMERR_ALREADY_INITIALIZED       = 01403H;
            CONST PMERR_MSG_PROG_NO_MOU           = 01405H;
            CONST PMERR_MSG_PROG_NON_RECOV        = 01406H;
            CONST PMERR_WINCONV_INVALID_PATH      = 01407H;
            CONST PMERR_PI_NOT_INITIALISED        = 01408H;
            CONST PMERR_PL_NOT_INITIALISED        = 01409H;
            CONST PMERR_NO_TASK_MANAGER           = 0140AH;
            CONST PMERR_SAVE_NOT_IN_PROGRESS      = 0140BH;
            CONST PMERR_NO_STACK_SPACE            = 0140CH;
            CONST PMERR_INVALID_COLR_FIELD        = 0140dH;
            CONST PMERR_INVALID_COLR_VALUE        = 0140eH;
            CONST PMERR_COLR_WRITE                = 0140fH;

            CONST PMERR_TARGET_FILE_EXISTS        = 01501H;
            CONST PMERR_SOURCE_SAME_AS_TARGET     = 01502H;
            CONST PMERR_SOURCE_FILE_NOT_FOUND     = 01503H;
            CONST PMERR_INVALID_NEW_PATH          = 01504H;
            CONST PMERR_TARGET_FILE_NOT_FOUND     = 01505H;
            CONST PMERR_INVALID_DRIVE_NUMBER      = 01506H;
            CONST PMERR_NAME_TOO_LONG             = 01507H;
            CONST PMERR_NOT_ENOUGH_ROOM_ON_DISK   = 01508H;
            CONST PMERR_NOT_ENOUGH_MEM            = 01509H;

            CONST PMERR_LOG_DRV_DOES_NOT_EXIST    = 0150BH;
            CONST PMERR_INVALID_DRIVE             = 0150CH;
            CONST PMERR_ACCESS_DENIED             = 0150DH;
            CONST PMERR_NO_FIRST_SLASH            = 0150EH;
            CONST PMERR_READ_ONLY_FILE            = 0150FH;
            CONST PMERR_GROUP_PROTECTED           = 0151FH;
            CONST PMERR_INVALID_PROGRAM_CATEGORY  = 0152FH;
            CONST PMERR_INVALID_APPL              = 01530H;
            CONST PMERR_CANNOT_START              = 01531H;
            CONST PMERR_STARTED_IN_BACKGROUND     = 01532H;
            CONST PMERR_INVALID_HAPP              = 01533H;
            CONST PMERR_CANNOT_STOP               = 01534H;

            (**********************************************************************
            * Errors generated by Language Bindings layer.
            *
            * (Range 01600 thru 016FF reserved for Bindings)
            **********************************************************************)

            (*** SEVERITY_UNRECOVERABLE ***)
            CONST PMERR_INTERNAL_ERROR_1          = 01601H;
            CONST PMERR_INTERNAL_ERROR_2          = 01602H;
            CONST PMERR_INTERNAL_ERROR_3          = 01603H;
            CONST PMERR_INTERNAL_ERROR_4          = 01604H;
            CONST PMERR_INTERNAL_ERROR_5          = 01605H;
            CONST PMERR_INTERNAL_ERROR_6          = 01606H;
            CONST PMERR_INTERNAL_ERROR_7          = 01607H;
            CONST PMERR_INTERNAL_ERROR_8          = 01608H;
            CONST PMERR_INTERNAL_ERROR_9          = 01609H;
            CONST PMERR_INTERNAL_ERROR_10         = 0160AH;
            CONST PMERR_INTERNAL_ERROR_11         = 0160BH;
            CONST PMERR_INTERNAL_ERROR_12         = 0160CH;
            CONST PMERR_INTERNAL_ERROR_13         = 0160DH;
            CONST PMERR_INTERNAL_ERROR_14         = 0160EH;
            CONST PMERR_INTERNAL_ERROR_15         = 0160FH;
            CONST PMERR_INTERNAL_ERROR_16         = 01610H;
            CONST PMERR_INTERNAL_ERROR_17         = 01611H;
            CONST PMERR_INTERNAL_ERROR_18         = 01612H;
            CONST PMERR_INTERNAL_ERROR_19         = 01613H;
            CONST PMERR_INTERNAL_ERROR_20         = 01614H;
            CONST PMERR_INTERNAL_ERROR_21         = 01615H;
            CONST PMERR_INTERNAL_ERROR_22         = 01616H;
            CONST PMERR_INTERNAL_ERROR_23         = 01617H;
            CONST PMERR_INTERNAL_ERROR_24         = 01618H;
            CONST PMERR_INTERNAL_ERROR_25         = 01619H;
            CONST PMERR_INTERNAL_ERROR_26         = 0161AH;
            CONST PMERR_INTERNAL_ERROR_27         = 0161BH;
            CONST PMERR_INTERNAL_ERROR_28         = 0161CH;
            CONST PMERR_INTERNAL_ERROR_29         = 0161DH;

            (*** SEVERITY_WARNING ***)
            CONST PMERR_INVALID_FREE_MESSAGE_ID   = 01630H;

            (*** SEVERITY_ERROR ***)

            CONST PMERR_FUNCTION_NOT_SUPPORTED    = 01641H;
            CONST PMERR_INVALID_ARRAY_COUNT       = 01642H;
            CONST PMERR_INVALID_LENGTH            = 01643H;
            CONST PMERR_INVALID_BUNDLE_TYPE       = 01644H;
            CONST PMERR_INVALID_PARAMETER         = 01645H;
            CONST PMERR_INVALID_NUMBER_OF_PARMS   = 01646H;
            CONST PMERR_GREATER_THAN_64K          = 01647H;
            CONST PMERR_INVALID_PARAMETER_TYPE    = 01648H;
            CONST PMERR_NEGATIVE_STRCOND_DIM      = 01649H;
            CONST PMERR_INVALID_NUMBER_OF_TYPES   = 0164AH;
            CONST PMERR_INCORRECT_HSTRUCT         = 0164BH;
            CONST PMERR_INVALID_ARRAY_SIZE        = 0164CH;
            CONST PMERR_INVALID_CONTROL_DATATYPE  = 0164DH;
            CONST PMERR_INCOMPLETE_CONTROL_SEQU   = 0164EH;
            CONST PMERR_INVALID_DATATYPE          = 0164FH;
            CONST PMERR_INCORRECT_DATATYPE        = 01650H;
            CONST PMERR_NOT_SELF_DESCRIBING_DTYP  = 01651H;
            CONST PMERR_INVALID_CTRL_SEQ_INDEX    = 01652H;
            CONST PMERR_INVALID_TYPE_FOR_LENGTH   = 01653H;
            CONST PMERR_INVALID_TYPE_FOR_OFFSET   = 01654H;
            CONST PMERR_INVALID_TYPE_FOR_MPARAM   = 01655H;
            CONST PMERR_INVALID_MESSAGE_ID        = 01656H;
            CONST PMERR_C_LENGTH_TOO_SMALL        = 01657H;
            CONST PMERR_APPL_STRUCTURE_TOO_SMALL  = 01658H;
            CONST PMERR_INVALID_ERRORINFO_HANDLE  = 01659H;
            CONST PMERR_INVALID_CHARACTER_INDEX   = 0165AH;

            (**********************************************************************
            * End of Errors generated by Language Bindings layer.
            *
            * (Range 01600 thru 016FF reserved for Bindings)
            **********************************************************************)
   <* END *>
<* END *>

(**********************************************************************\
*
*            Workplace Shell error codes
*
* PMWP error codes
*
\**********************************************************************)

<* IF DEFINED (INCL_WPERRORS)  THEN *>

   <* IF NOT DEFINED (INCL_WPERRORS_INCL)  THEN *>
            (* XLATOFF *)
      <* NEW INCL_WPERRORS_INCL + *>
            (* XLATON *)

            CONST WPERR_PROTECTED_CLASS           = 01700H;
            CONST WPERR_INVALID_CLASS             = 01701H;
            CONST WPERR_INVALID_SUPERCLASS        = 01702H;
            CONST WPERR_NO_MEMORY                 = 01703H;
            CONST WPERR_SEMAPHORE_ERROR           = 01704H;
            CONST WPERR_BUFFER_TOO_SMALL          = 01705H;
            CONST WPERR_CLSLOADMOD_FAILED         = 01706H;
            CONST WPERR_CLSPROCADDR_FAILED        = 01707H;
            CONST WPERR_OBJWORD_LOCATION          = 01708H;
            CONST WPERR_INVALID_OBJECT            = 01709H;
            CONST WPERR_MEMORY_CLEANUP            = 0170AH;
            CONST WPERR_INVALID_MODULE            = 0170BH;
            CONST WPERR_INVALID_OLDCLASS          = 0170CH;
            CONST WPERR_INVALID_NEWCLASS          = 0170DH;
            CONST WPERR_NOT_IMMEDIATE_CHILD       = 0170EH;
            CONST WPERR_NOT_WORKPLACE_CLASS       = 0170FH;
            CONST WPERR_CANT_REPLACE_METACLS      = 01710H;
            CONST WPERR_INI_FILE_WRITE            = 01711H;
            CONST WPERR_INVALID_FOLDER            = 01712H;
            CONST WPERR_BUFFER_OVERFLOW           = 01713H;
            CONST WPERR_OBJECT_NOT_FOUND          = 01714H;
            CONST WPERR_INVALID_HFIND             = 01715H;
            CONST WPERR_INVALID_COUNT             = 01716H;
            CONST WPERR_INVALID_BUFFER            = 01717H;
            CONST WPERR_ALREADY_EXISTS            = 01718H;
            CONST WPERR_INVALID_FLAGS             = 01719H;
            CONST WPERR_INVALID_OBJECTID          = 01720H;

   <* END *>
<* END *>


(********************************************************************
*** GPI error codes
********************************************************************)
<* IF DEFINED(INCL_GPIERRORS) THEN *>
   <* IF NOT DEFINED(INCL_GPIERRORS_INCL) THEN *>
            (* XLATOFF *)
      <* NEW INCL_GPIERRORS_INCL + *>
            (* XLATON *)

            (* AAB error codes for the GPI *)
            CONST PMERR_OK                          = 00000H;
            CONST PMERR_ALREADY_IN_AREA             = 02001H;
            CONST PMERR_ALREADY_IN_ELEMENT          = 02002H;
            CONST PMERR_ALREADY_IN_PATH             = 02003H;
            CONST PMERR_ALREADY_IN_SEG              = 02004H;
            CONST PMERR_AREA_INCOMPLETE             = 02005H;
            CONST PMERR_BASE_ERROR                  = 02006H;
            CONST PMERR_BITBLT_LENGTH_EXCEEDED      = 02007H;
            CONST PMERR_BITMAP_IN_USE               = 02008H;
            CONST PMERR_BITMAP_IS_SELECTED          = 02009H;
            CONST PMERR_BITMAP_NOT_FOUND            = 0200AH;
            CONST PMERR_BITMAP_NOT_SELECTED         = 0200BH;
            CONST PMERR_BOUNDS_OVERFLOW             = 0200CH;
            CONST PMERR_CALLED_SEG_IS_CHAINED       = 0200DH;
            CONST PMERR_CALLED_SEG_IS_CURRENT       = 0200EH;
            CONST PMERR_CALLED_SEG_NOT_FOUND        = 0200FH;
            CONST PMERR_CANNOT_DELETE_ALL_DATA      = 02010H;
            CONST PMERR_CANNOT_REPLACE_ELEMENT_0    = 02011H;
            CONST PMERR_COL_TABLE_NOT_REALIZABLE    = 02012H;
            CONST PMERR_COL_TABLE_NOT_REALIZED      = 02013H;
            CONST PMERR_COORDINATE_OVERFLOW         = 02014H;
            CONST PMERR_CORR_FORMAT_MISMATCH        = 02015H;
            CONST PMERR_DATA_TOO_LONG               = 02016H;
            CONST PMERR_DC_IS_ASSOCIATED            = 02017H;
            CONST PMERR_DESC_STRING_TRUNCATED       = 02018H;
            CONST PMERR_DEVICE_DRIVER_ERROR_1       = 02019H;
            CONST PMERR_DEVICE_DRIVER_ERROR_2       = 0201AH;
            CONST PMERR_DEVICE_DRIVER_ERROR_3       = 0201BH;
            CONST PMERR_DEVICE_DRIVER_ERROR_4       = 0201CH;
            CONST PMERR_DEVICE_DRIVER_ERROR_5       = 0201DH;
            CONST PMERR_DEVICE_DRIVER_ERROR_6       = 0201EH;
            CONST PMERR_DEVICE_DRIVER_ERROR_7       = 0201FH;
            CONST PMERR_DEVICE_DRIVER_ERROR_8       = 02020H;
            CONST PMERR_DEVICE_DRIVER_ERROR_9       = 02021H;
            CONST PMERR_DEVICE_DRIVER_ERROR_10      = 02022H;
            CONST PMERR_DEV_FUNC_NOT_INSTALLED      = 02023H;
            CONST PMERR_DOSOPEN_FAILURE             = 02024H;
            CONST PMERR_DOSREAD_FAILURE             = 02025H;
            CONST PMERR_DRIVER_NOT_FOUND            = 02026H;
            CONST PMERR_DUP_SEG                     = 02027H;
            CONST PMERR_DYNAMIC_SEG_SEQ_ERROR       = 02028H;
            CONST PMERR_DYNAMIC_SEG_ZERO_INV        = 02029H;
            CONST PMERR_ELEMENT_INCOMPLETE          = 0202AH;
            CONST PMERR_ESC_CODE_NOT_SUPPORTED      = 0202BH;
            CONST PMERR_EXCEEDS_MAX_SEG_LENGTH      = 0202CH;
            CONST PMERR_FONT_AND_MODE_MISMATCH      = 0202DH;
            CONST PMERR_FONT_FILE_NOT_LOADED        = 0202EH;
            CONST PMERR_FONT_NOT_LOADED             = 0202FH;
            CONST PMERR_FONT_TOO_BIG                = 02030H;
            CONST PMERR_HARDWARE_INIT_FAILURE       = 02031H;
            CONST PMERR_HBITMAP_BUSY                = 02032H;
            CONST PMERR_HDC_BUSY                    = 02033H;
            CONST PMERR_HRGN_BUSY                   = 02034H;
            CONST PMERR_HUGE_FONTS_NOT_SUPPORTED    = 02035H;
            CONST PMERR_ID_HAS_NO_BITMAP            = 02036H;
            CONST PMERR_IMAGE_INCOMPLETE            = 02037H;
            CONST PMERR_INCOMPAT_COLOR_FORMAT       = 02038H;
            CONST PMERR_INCOMPAT_COLOR_OPTIONS      = 02039H;
            CONST PMERR_INCOMPATIBLE_BITMAP         = 0203AH;
            CONST PMERR_INCOMPATIBLE_METAFILE       = 0203BH;
            CONST PMERR_INCORRECT_DC_TYPE           = 0203CH;
            CONST PMERR_INSUFFICIENT_DISK_SPACE     = 0203DH;
            CONST PMERR_INSUFFICIENT_MEMORY         = 0203EH;
            CONST PMERR_INV_ANGLE_PARM              = 0203FH;
            CONST PMERR_INV_ARC_CONTROL             = 02040H;
            CONST PMERR_INV_AREA_CONTROL            = 02041H;
            CONST PMERR_INV_ARC_POINTS              = 02042H;
            CONST PMERR_INV_ATTR_MODE               = 02043H;
            CONST PMERR_INV_BACKGROUND_COL_ATTR     = 02044H;
            CONST PMERR_INV_BACKGROUND_MIX_ATTR     = 02045H;
            CONST PMERR_INV_BITBLT_MIX              = 02046H;
            CONST PMERR_INV_BITBLT_STYLE            = 02047H;
            CONST PMERR_INV_BITMAP_DIMENSION        = 02048H;
            CONST PMERR_INV_BOX_CONTROL             = 02049H;
            CONST PMERR_INV_BOX_ROUNDING_PARM       = 0204AH;
            CONST PMERR_INV_CHAR_ANGLE_ATTR         = 0204BH;
            CONST PMERR_INV_CHAR_DIRECTION_ATTR     = 0204CH;
            CONST PMERR_INV_CHAR_MODE_ATTR          = 0204DH;
            CONST PMERR_INV_CHAR_POS_OPTIONS        = 0204EH;
            CONST PMERR_INV_CHAR_SET_ATTR           = 0204FH;
            CONST PMERR_INV_CHAR_SHEAR_ATTR         = 02050H;
            CONST PMERR_INV_CLIP_PATH_OPTIONS       = 02051H;
            CONST PMERR_INV_CODEPAGE                = 02052H;
            CONST PMERR_INV_COLOR_ATTR              = 02053H;
            CONST PMERR_INV_COLOR_DATA              = 02054H;
            CONST PMERR_INV_COLOR_FORMAT            = 02055H;
            CONST PMERR_INV_COLOR_INDEX             = 02056H;
            CONST PMERR_INV_COLOR_OPTIONS           = 02057H;
            CONST PMERR_INV_COLOR_START_INDEX       = 02058H;
            CONST PMERR_INV_COORD_OFFSET            = 02059H;
            CONST PMERR_INV_COORD_SPACE             = 0205AH;
            CONST PMERR_INV_COORDINATE              = 0205BH;
            CONST PMERR_INV_CORRELATE_DEPTH         = 0205CH;
            CONST PMERR_INV_CORRELATE_TYPE          = 0205DH;
            CONST PMERR_INV_CURSOR_BITMAP           = 0205EH;
            CONST PMERR_INV_DC_DATA                 = 0205FH;
            CONST PMERR_INV_DC_TYPE                 = 02060H;
            CONST PMERR_INV_DEVICE_NAME             = 02061H;
            CONST PMERR_INV_DEV_MODES_OPTIONS       = 02062H;
            CONST PMERR_INV_DRAW_CONTROL            = 02063H;
            CONST PMERR_INV_DRAW_VALUE              = 02064H;
            CONST PMERR_INV_DRAWING_MODE            = 02065H;
            CONST PMERR_INV_DRIVER_DATA             = 02066H;
            CONST PMERR_INV_DRIVER_NAME             = 02067H;
            CONST PMERR_INV_DRAW_BORDER_OPTION      = 02068H;
            CONST PMERR_INV_EDIT_MODE               = 02069H;
            CONST PMERR_INV_ELEMENT_OFFSET          = 0206AH;
            CONST PMERR_INV_ELEMENT_POINTER         = 0206BH;
            CONST PMERR_INV_END_PATH_OPTIONS        = 0206CH;
            CONST PMERR_INV_ESC_CODE                = 0206DH;
            CONST PMERR_INV_ESCAPE_DATA             = 0206EH;
            CONST PMERR_INV_EXTENDED_LCID           = 0206FH;
            CONST PMERR_INV_FILL_PATH_OPTIONS       = 02070H;
            CONST PMERR_INV_FIRST_CHAR              = 02071H;
            CONST PMERR_INV_FONT_ATTRS              = 02072H;
            CONST PMERR_INV_FONT_FILE_DATA          = 02073H;
            CONST PMERR_INV_FOR_THIS_DC_TYPE        = 02074H;
            CONST PMERR_INV_FORMAT_CONTROL          = 02075H;
            CONST PMERR_INV_FORMS_CODE              = 02076H;
            CONST PMERR_INV_FONTDEF                 = 02077H;
            CONST PMERR_INV_GEOM_LINE_WIDTH_ATTR    = 02078H;
            CONST PMERR_INV_GETDATA_CONTROL         = 02079H;
            CONST PMERR_INV_GRAPHICS_FIELD          = 0207AH;
            CONST PMERR_INV_HBITMAP                 = 0207BH;
            CONST PMERR_INV_HDC                     = 0207CH;
            CONST PMERR_INV_HJOURNAL                = 0207DH;
            CONST PMERR_INV_HMF                     = 0207EH;
            CONST PMERR_INV_HPS                     = 0207FH;
            CONST PMERR_INV_HRGN                    = 02080H;
            CONST PMERR_INV_ID                      = 02081H;
            CONST PMERR_INV_IMAGE_DATA_LENGTH       = 02082H;
            CONST PMERR_INV_IMAGE_DIMENSION         = 02083H;
            CONST PMERR_INV_IMAGE_FORMAT            = 02084H;
            CONST PMERR_INV_IN_AREA                 = 02085H;
            CONST PMERR_INV_IN_CALLED_SEG           = 02086H;
            CONST PMERR_INV_IN_CURRENT_EDIT_MODE    = 02087H;
            CONST PMERR_INV_IN_DRAW_MODE            = 02088H;
            CONST PMERR_INV_IN_ELEMENT              = 02089H;
            CONST PMERR_INV_IN_IMAGE                = 0208AH;
            CONST PMERR_INV_IN_PATH                 = 0208BH;
            CONST PMERR_INV_IN_RETAIN_MODE          = 0208CH;
            CONST PMERR_INV_IN_SEG                  = 0208DH;
            CONST PMERR_INV_IN_VECTOR_SYMBOL        = 0208EH;
            CONST PMERR_INV_INFO_TABLE              = 0208FH;
            CONST PMERR_INV_JOURNAL_OPTION          = 02090H;
            CONST PMERR_INV_KERNING_FLAGS           = 02091H;
            CONST PMERR_INV_LENGTH_OR_COUNT         = 02092H;
            CONST PMERR_INV_LINE_END_ATTR           = 02093H;
            CONST PMERR_INV_LINE_JOIN_ATTR          = 02094H;
            CONST PMERR_INV_LINE_TYPE_ATTR          = 02095H;
            CONST PMERR_INV_LINE_WIDTH_ATTR         = 02096H;
            CONST PMERR_INV_LOGICAL_ADDRESS         = 02097H;
            CONST PMERR_INV_MARKER_BOX_ATTR         = 02098H;
            CONST PMERR_INV_MARKER_SET_ATTR         = 02099H;
            CONST PMERR_INV_MARKER_SYMBOL_ATTR      = 0209AH;
            CONST PMERR_INV_MATRIX_ELEMENT          = 0209BH;
            CONST PMERR_INV_MAX_HITS                = 0209CH;
            CONST PMERR_INV_METAFILE                = 0209DH;
            CONST PMERR_INV_METAFILE_LENGTH         = 0209EH;
            CONST PMERR_INV_METAFILE_OFFSET         = 0209FH;
            CONST PMERR_INV_MICROPS_DRAW_CONTROL    = 020A0H;
            CONST PMERR_INV_MICROPS_FUNCTION        = 020A1H;
            CONST PMERR_INV_MICROPS_ORDER           = 020A2H;
            CONST PMERR_INV_MIX_ATTR                = 020A3H;
            CONST PMERR_INV_MODE_FOR_OPEN_DYN       = 020A4H;
            CONST PMERR_INV_MODE_FOR_REOPEN_SEG     = 020A5H;
            CONST PMERR_INV_MODIFY_PATH_MODE        = 020A6H;
            CONST PMERR_INV_MULTIPLIER              = 020A7H;
            CONST PMERR_INV_NESTED_FIGURES          = 020A8H;
            CONST PMERR_INV_OR_INCOMPAT_OPTIONS     = 020A9H;
            CONST PMERR_INV_ORDER_LENGTH            = 020AAH;
            CONST PMERR_INV_ORDERING_PARM           = 020ABH;
            CONST PMERR_INV_OUTSIDE_DRAW_MODE       = 020ACH;
            CONST PMERR_INV_PAGE_VIEWPORT           = 020ADH;
            CONST PMERR_INV_PATH_ID                 = 020AEH;
            CONST PMERR_INV_PATH_MODE               = 020AFH;
            CONST PMERR_INV_PATTERN_ATTR            = 020B0H;
            CONST PMERR_INV_PATTERN_REF_PT_ATTR     = 020B1H;
            CONST PMERR_INV_PATTERN_SET_ATTR        = 020B2H;
            CONST PMERR_INV_PATTERN_SET_FONT        = 020B3H;
            CONST PMERR_INV_PICK_APERTURE_OPTION    = 020B4H;
            CONST PMERR_INV_PICK_APERTURE_POSN      = 020B5H;
            CONST PMERR_INV_PICK_APERTURE_SIZE      = 020B6H;
            CONST PMERR_INV_PICK_NUMBER             = 020B7H;
            CONST PMERR_INV_PLAY_METAFILE_OPTION    = 020B8H;
            CONST PMERR_INV_PRIMITIVE_TYPE          = 020B9H;
            CONST PMERR_INV_PS_SIZE                 = 020BAH;
            CONST PMERR_INV_PUTDATA_FORMAT          = 020BBH;
            CONST PMERR_INV_QUERY_ELEMENT_NO        = 020BCH;
            CONST PMERR_INV_RECT                    = 020BDH;
            CONST PMERR_INV_REGION_CONTROL          = 020BEH;
            CONST PMERR_INV_REGION_MIX_MODE         = 020BFH;
            CONST PMERR_INV_REPLACE_MODE_FUNC       = 020C0H;
            CONST PMERR_INV_RESERVED_FIELD          = 020C1H;
            CONST PMERR_INV_RESET_OPTIONS           = 020C2H;
            CONST PMERR_INV_RGBCOLOR                = 020C3H;
            CONST PMERR_INV_SCAN_START              = 020C4H;
            CONST PMERR_INV_SEG_ATTR                = 020C5H;
            CONST PMERR_INV_SEG_ATTR_VALUE          = 020C6H;
            CONST PMERR_INV_SEG_CH_LENGTH           = 020C7H;
            CONST PMERR_INV_SEG_NAME                = 020C8H;
            CONST PMERR_INV_SEG_OFFSET              = 020C9H;
            CONST PMERR_INV_SETID                   = 020CAH;
            CONST PMERR_INV_SETID_TYPE              = 020CBH;
            CONST PMERR_INV_SET_VIEWPORT_OPTION     = 020CCH;
            CONST PMERR_INV_SHARPNESS_PARM          = 020CDH;
            CONST PMERR_INV_SOURCE_OFFSET           = 020CEH;
            CONST PMERR_INV_STOP_DRAW_VALUE         = 020CFH;
            CONST PMERR_INV_TRANSFORM_TYPE          = 020D0H;
            CONST PMERR_INV_USAGE_PARM              = 020D1H;
            CONST PMERR_INV_VIEWING_LIMITS          = 020D2H;
            CONST PMERR_JFILE_BUSY                  = 020D3H;
            CONST PMERR_JNL_FUNC_DATA_TOO_LONG      = 020D4H;
            CONST PMERR_KERNING_NOT_SUPPORTED       = 020D5H;
            CONST PMERR_LABEL_NOT_FOUND             = 020D6H;
            CONST PMERR_MATRIX_OVERFLOW             = 020D7H;
            CONST PMERR_METAFILE_INTERNAL_ERROR     = 020D8H;
            CONST PMERR_METAFILE_IN_USE             = 020D9H;
            CONST PMERR_METAFILE_LIMIT_EXCEEDED     = 020DAH;
            CONST PMERR_NAME_STACK_FULL             = 020DBH;
            CONST PMERR_NOT_CREATED_BY_DEVOPENDC    = 020DCH;
            CONST PMERR_NOT_IN_AREA                 = 020DDH;
            CONST PMERR_NOT_IN_DRAW_MODE            = 020DEH;
            CONST PMERR_NOT_IN_ELEMENT              = 020DFH;
            CONST PMERR_NOT_IN_IMAGE                = 020E0H;
            CONST PMERR_NOT_IN_PATH                 = 020E1H;
            CONST PMERR_NOT_IN_RETAIN_MODE          = 020E2H;
            CONST PMERR_NOT_IN_SEG                  = 020E3H;
            CONST PMERR_NO_BITMAP_SELECTED          = 020E4H;
            CONST PMERR_NO_CURRENT_ELEMENT          = 020E5H;
            CONST PMERR_NO_CURRENT_SEG              = 020E6H;
            CONST PMERR_NO_METAFILE_RECORD_HANDLE   = 020E7H;
            CONST PMERR_ORDER_TOO_BIG               = 020E8H;
            CONST PMERR_OTHER_SET_ID_REFS           = 020E9H;
            CONST PMERR_OVERRAN_SEG                 = 020EAH;
            CONST PMERR_OWN_SET_ID_REFS             = 020EBH;
            CONST PMERR_PATH_INCOMPLETE             = 020ECH;
            CONST PMERR_PATH_LIMIT_EXCEEDED         = 020EDH;
            CONST PMERR_PATH_UNKNOWN                = 020EEH;
            CONST PMERR_PEL_IS_CLIPPED              = 020EFH;
            CONST PMERR_PEL_NOT_AVAILABLE           = 020F0H;
            CONST PMERR_PRIMITIVE_STACK_EMPTY       = 020F1H;
            CONST PMERR_PROLOG_ERROR                = 020F2H;
            CONST PMERR_PROLOG_SEG_ATTR_NOT_SET     = 020F3H;
            CONST PMERR_PS_BUSY                     = 020F4H;
            CONST PMERR_PS_IS_ASSOCIATED            = 020F5H;
            CONST PMERR_RAM_JNL_FILE_TOO_SMALL      = 020F6H;
            CONST PMERR_REALIZE_NOT_SUPPORTED       = 020F7H;
            CONST PMERR_REGION_IS_CLIP_REGION       = 020F8H;
            CONST PMERR_RESOURCE_DEPLETION          = 020F9H;
            CONST PMERR_SEG_AND_REFSEG_ARE_SAME     = 020FAH;
            CONST PMERR_SEG_CALL_RECURSIVE          = 020FBH;
            CONST PMERR_SEG_CALL_STACK_EMPTY        = 020FCH;
            CONST PMERR_SEG_CALL_STACK_FULL         = 020FDH;
            CONST PMERR_SEG_IS_CURRENT              = 020FEH;
            CONST PMERR_SEG_NOT_CHAINED             = 020FFH;
            CONST PMERR_SEG_NOT_FOUND               = 02100H;
            CONST PMERR_SEG_STORE_LIMIT_EXCEEDED    = 02101H;
            CONST PMERR_SETID_IN_USE                = 02102H;
            CONST PMERR_SETID_NOT_FOUND             = 02103H;
            CONST PMERR_STARTDOC_NOT_ISSUED         = 02104H;
            CONST PMERR_STOP_DRAW_OCCURRED          = 02105H;
            CONST PMERR_TOO_MANY_METAFILES_IN_USE   = 02106H;
            CONST PMERR_TRUNCATED_ORDER             = 02107H;
            CONST PMERR_UNCHAINED_SEG_ZERO_INV      = 02108H;
            CONST PMERR_UNSUPPORTED_ATTR            = 02109H;
            CONST PMERR_UNSUPPORTED_ATTR_VALUE      = 0210AH;
            CONST PMERR_ENDDOC_NOT_ISSUED           = 0210BH;
            CONST PMERR_PS_NOT_ASSOCIATED           = 0210CH;
            CONST PMERR_INV_FLOOD_FILL_OPTIONS      = 0210DH;
            CONST PMERR_INV_FACENAME                = 0210EH;
            CONST PMERR_PALETTE_SELECTED            = 0210FH;
            CONST PMERR_NO_PALETTE_SELECTED         = 02110H;
            CONST PMERR_INV_HPAL                    = 02111H;
            CONST PMERR_PALETTE_BUSY                = 02112H;
            CONST PMERR_START_POINT_CLIPPED         = 02113H;
            CONST PMERR_NO_FILL                     = 02114H;
            CONST PMERR_INV_FACENAMEDESC            = 02115H;
            CONST PMERR_INV_BITMAP_DATA             = 02116H;
            CONST PMERR_INV_CHAR_ALIGN_ATTR         = 02117H;
            CONST PMERR_INV_HFONT                   = 02118H;
            CONST PMERR_HFONT_IS_SELECTED           = 02119H;
            CONST PMERR_DRVR_NOT_SUPPORTED          = 02120H;

   <* END *>
<* END *>

(****************************************************************************
*** Device Manager error codes
****************************************************************************)

(* None yet *)

(****************************************************************************
*** Spooler error codes
****************************************************************************)
<* IF DEFINED (INCL_SPLERRORS)  THEN *>
   <* IF NOT DEFINED (INCL_SPLERRORS_INCL)  THEN *>
            (* XLATOFF *)
      <* NEW INCL_SPLERRORS_INCL + *>
            (* XLATON *)

            CONST PMERR_SPL_DRIVER_ERROR            = 04001H;
            CONST PMERR_SPL_DEVICE_ERROR            = 04002H;
            CONST PMERR_SPL_DEVICE_NOT_INSTALLED    = 04003H;
            CONST PMERR_SPL_QUEUE_ERROR             = 04004H;
            CONST PMERR_SPL_INV_HSPL                = 04005H;
            CONST PMERR_SPL_NO_DISK_SPACE           = 04006H;
            CONST PMERR_SPL_NO_MEMORY               = 04007H;
            CONST PMERR_SPL_PRINT_ABORT             = 04008H;
            CONST PMERR_SPL_SPOOLER_NOT_INSTALLED   = 04009H;
            CONST PMERR_SPL_INV_FORMS_CODE          = 0400AH;
            CONST PMERR_SPL_INV_PRIORITY            = 0400BH;
            CONST PMERR_SPL_NO_FREE_JOB_ID          = 0400CH;
            CONST PMERR_SPL_NO_DATA                 = 0400DH;
            CONST PMERR_SPL_INV_TOKEN               = 0400EH;
            CONST PMERR_SPL_INV_DATATYPE            = 0400FH;
            CONST PMERR_SPL_PROCESSOR_ERROR         = 04010H;
            CONST PMERR_SPL_INV_JOB_ID              = 04011H;
            CONST PMERR_SPL_JOB_NOT_PRINTING        = 04012H;
            CONST PMERR_SPL_JOB_PRINTING            = 04013H;
            CONST PMERR_SPL_QUEUE_ALREADY_EXISTS    = 04014H;
            CONST PMERR_SPL_INV_QUEUE_NAME          = 04015H;
            CONST PMERR_SPL_QUEUE_NOT_EMPTY         = 04016H;
            CONST PMERR_SPL_DEVICE_ALREADY_EXISTS   = 04017H;
            CONST PMERR_SPL_DEVICE_LIMIT_REACHED    = 04018H;
            CONST PMERR_SPL_STATUS_STRING_TRUNC     = 04019H;
            CONST PMERR_SPL_INV_LENGTH_OR_COUNT     = 0401AH;
            CONST PMERR_SPL_FILE_NOT_FOUND          = 0401BH;
            CONST PMERR_SPL_CANNOT_OPEN_FILE        = 0401CH;
            CONST PMERR_SPL_DRIVER_NOT_INSTALLED    = 0401DH;
            CONST PMERR_SPL_INV_PROCESSOR_DATTYPE   = 0401EH;
            CONST PMERR_SPL_INV_DRIVER_DATATYPE     = 0401FH;
            CONST PMERR_SPL_PROCESSOR_NOT_INST      = 04020H;
            CONST PMERR_SPL_NO_SUCH_LOG_ADDRESS     = 04021H;
            CONST PMERR_SPL_PRINTER_NOT_FOUND       = 04022H;
            CONST PMERR_SPL_DD_NOT_FOUND            = 04023H;
            CONST PMERR_SPL_QUEUE_NOT_FOUND         = 04024H;
            CONST PMERR_SPL_MANY_QUEUES_ASSOC       = 04025H;
            CONST PMERR_SPL_NO_QUEUES_ASSOCIATED    = 04026H;
            CONST PMERR_SPL_INI_FILE_ERROR          = 04027H;
            CONST PMERR_SPL_NO_DEFAULT_QUEUE        = 04028H;
            CONST PMERR_SPL_NO_CURRENT_FORMS_CODE   = 04029H;
            CONST PMERR_SPL_NOT_AUTHORISED          = 0402AH;
            CONST PMERR_SPL_TEMP_NETWORK_ERROR      = 0402BH;
            CONST PMERR_SPL_HARD_NETWORK_ERROR      = 0402CH;
            CONST PMERR_DEL_NOT_ALLOWED             = 0402DH;
            CONST PMERR_CANNOT_DEL_QP_REF           = 0402EH;
            CONST PMERR_CANNOT_DEL_QNAME_REF        = 0402FH;
            CONST PMERR_CANNOT_DEL_PRINTER_DD_REF   = 04030H;
            CONST PMERR_CANNOT_DEL_PRN_NAME_REF     = 04031H;
            CONST PMERR_CANNOT_DEL_PRN_ADDR_REF     = 04032H;
            CONST PMERR_SPOOLER_QP_NOT_DEFINED      = 04033H;
            CONST PMERR_PRN_NAME_NOT_DEFINED        = 04034H;
            CONST PMERR_PRN_ADDR_NOT_DEFINED        = 04035H;
            CONST PMERR_PRINTER_DD_NOT_DEFINED      = 04036H;
            CONST PMERR_PRINTER_QUEUE_NOT_DEFINED   = 04037H;
            CONST PMERR_PRN_ADDR_IN_USE             = 04038H;
            CONST PMERR_SPL_TOO_MANY_OPEN_FILES     = 04039H;
            CONST PMERR_SPL_CP_NOT_REQD             = 0403AH;
            CONST PMERR_UNABLE_TO_CLOSE_DEVICE      = 04040H;

            CONST PMERR_SPL_ERROR_1       =   ( SPLERR_BASE + 4001 );
            CONST PMERR_SPL_ERROR_2       =   ( SPLERR_BASE + 4002 );
            CONST PMERR_SPL_ERROR_3       =   ( SPLERR_BASE + 4003 );
            CONST PMERR_SPL_ERROR_4       =   ( SPLERR_BASE + 4004 );
            CONST PMERR_SPL_ERROR_5       =   ( SPLERR_BASE + 4005 );
            CONST PMERR_SPL_ERROR_6       =   ( SPLERR_BASE + 4006 );
            CONST PMERR_SPL_ERROR_7       =   ( SPLERR_BASE + 4007 );
            CONST PMERR_SPL_ERROR_8       =   ( SPLERR_BASE + 4008 );
            CONST PMERR_SPL_ERROR_9       =   ( SPLERR_BASE + 4009 );
            CONST PMERR_SPL_ERROR_10      =   ( SPLERR_BASE + 4010 );
            CONST PMERR_SPL_ERROR_11      =   ( SPLERR_BASE + 4011 );
            CONST PMERR_SPL_ERROR_12      =   ( SPLERR_BASE + 4012 );
            CONST PMERR_SPL_ERROR_13      =   ( SPLERR_BASE + 4013 );
            CONST PMERR_SPL_ERROR_14      =   ( SPLERR_BASE + 4014 );
            CONST PMERR_SPL_ERROR_15      =   ( SPLERR_BASE + 4015 );
            CONST PMERR_SPL_ERROR_16      =   ( SPLERR_BASE + 4016 );
            CONST PMERR_SPL_ERROR_17      =   ( SPLERR_BASE + 4017 );
            CONST PMERR_SPL_ERROR_18      =   ( SPLERR_BASE + 4018 );
            CONST PMERR_SPL_ERROR_19      =   ( SPLERR_BASE + 4019 );
            CONST PMERR_SPL_ERROR_20      =   ( SPLERR_BASE + 4020 );
            CONST PMERR_SPL_ERROR_21      =   ( SPLERR_BASE + 4021 );
            CONST PMERR_SPL_ERROR_22      =   ( SPLERR_BASE + 4022 );
            CONST PMERR_SPL_ERROR_23      =   ( SPLERR_BASE + 4023 );
            CONST PMERR_SPL_ERROR_24      =   ( SPLERR_BASE + 4024 );
            CONST PMERR_SPL_ERROR_25      =   ( SPLERR_BASE + 4025 );
            CONST PMERR_SPL_ERROR_26      =   ( SPLERR_BASE + 4026 );
            CONST PMERR_SPL_ERROR_27      =   ( SPLERR_BASE + 4027 );
            CONST PMERR_SPL_ERROR_28      =   ( SPLERR_BASE + 4028 );
            CONST PMERR_SPL_ERROR_29      =   ( SPLERR_BASE + 4029 );
            CONST PMERR_SPL_ERROR_30      =   ( SPLERR_BASE + 4030 );
            CONST PMERR_SPL_ERROR_31      =   ( SPLERR_BASE + 4031 );
            CONST PMERR_SPL_ERROR_32      =   ( SPLERR_BASE + 4032 );
            CONST PMERR_SPL_ERROR_33      =   ( SPLERR_BASE + 4033 );
            CONST PMERR_SPL_ERROR_34      =   ( SPLERR_BASE + 4034 );
            CONST PMERR_SPL_ERROR_35      =   ( SPLERR_BASE + 4035 );
            CONST PMERR_SPL_ERROR_36      =   ( SPLERR_BASE + 4036 );
            CONST PMERR_SPL_ERROR_37      =   ( SPLERR_BASE + 4037 );
            CONST PMERR_SPL_ERROR_38      =   ( SPLERR_BASE + 4038 );
            CONST PMERR_SPL_ERROR_39      =   ( SPLERR_BASE + 4039 );
            CONST PMERR_SPL_ERROR_40      =   ( SPLERR_BASE + 4040 );

            CONST PMERR_SPLMSGBOX_INFO_CAPTION   = ( SPLERR_BASE + 4041 );
            CONST PMERR_SPLMSGBOX_WARNING_CAPTION= ( SPLERR_BASE + 4042 );
            CONST PMERR_SPLMSGBOX_ERROR_CAPTION  = ( SPLERR_BASE + 4043 );
            CONST PMERR_SPLMSGBOX_SEVERE_CAPTION = ( SPLERR_BASE + 4044 );

            CONST PMERR_SPLMSGBOX_JOB_DETAILS    = ( SPLERR_BASE + 4045 );

            CONST PMERR_SPLMSGBOX_ERROR_ACTION   = ( SPLERR_BASE + 4046 );
            CONST PMERR_SPLMSGBOX_SEVERE_ACTION  = ( SPLERR_BASE + 4047 );

            CONST PMERR_SPLMSGBOX_BIT_0_TEXT     = ( SPLERR_BASE + 4048 );
            CONST PMERR_SPLMSGBOX_BIT_1_TEXT     = ( SPLERR_BASE + 4049 );
            CONST PMERR_SPLMSGBOX_BIT_2_TEXT     = ( SPLERR_BASE + 4050 );
            CONST PMERR_SPLMSGBOX_BIT_3_TEXT     = ( SPLERR_BASE + 4051 );
            CONST PMERR_SPLMSGBOX_BIT_4_TEXT     = ( SPLERR_BASE + 4052 );
            CONST PMERR_SPLMSGBOX_BIT_5_TEXT     = ( SPLERR_BASE + 4053 );
            CONST PMERR_SPLMSGBOX_BIT_15_TEXT    = ( SPLERR_BASE + 4054 );
            CONST PMERR_SPL_NOPATHBUFFER         = ( SPLERR_BASE + 4055 );

            CONST PMERR_SPL_ALREADY_INITIALISED  = ( SPLERR_BASE + 4093 );
            CONST PMERR_SPL_ERROR                = ( SPLERR_BASE + 4095 );


            CONST NERR_BASE    =   2100;
            CONST NERR_NetNotStarted    =  (NERR_BASE+2);   (* The NETWKSTA.SYS workstation driver isn't installed. *)
            CONST NERR_RedirectedPath   =  (NERR_BASE+17);  (* The operation is invalid on a redirected resource. *)
            CONST NERR_BufTooSmall      =  (NERR_BASE+23);  (* The API return buffer is too small. *)
            CONST NERR_InvalidAPI       =  (NERR_BASE+42);  (* The requested API isn't supported on the remote server. *)
            CONST NERR_QNotFound        =  (NERR_BASE+50);  (* The printer queue does not exist. *)
            CONST NERR_JobNotFound      =  (NERR_BASE+51);  (* The print job does not exist. *)
            CONST NERR_DestNotFound     =  (NERR_BASE+52);  (* The printer destination cannot be found. *)
            CONST NERR_DestExists       =  (NERR_BASE+53);  (* The printer destination already exists. *)
            CONST NERR_QExists          =  (NERR_BASE+54);  (* The printer queue already exists. *)
            CONST NERR_QNoRoom          =  (NERR_BASE+55);  (* No more printer queues can be added. *)
            CONST NERR_JobNoRoom        =  (NERR_BASE+56);  (* No more print jobs can be added.  *)
            CONST NERR_DestNoRoom       =  (NERR_BASE+57);  (* No more printer destinations can be added. *)
            CONST NERR_DestIdle         =  (NERR_BASE+58);  (* This printer destination is idle and cannot accept control operations. *)
            CONST NERR_DestInvalidOp    =  (NERR_BASE+59);  (* This printer destination request contains an invalid control function. *)
            CONST NERR_SpoolerNotLoaded =  (NERR_BASE+61);  (* The spooler is not running. *)
            CONST NERR_DestInvalidState =  (NERR_BASE+62);  (* This operation cannot be performed on the print destination in its current state. *)
            CONST NERR_JobInvalidState  =  (NERR_BASE+64);  (* This operation cannot be performed on the print job in its current state. *)
            CONST NERR_SpoolNoMemory    =  (NERR_BASE+65);  (* A spooler memory allocation failure occurred. *)
            CONST NERR_DriverNotFound   =  (NERR_BASE+66);  (* The device driver does not exist. *)
            CONST NERR_DataTypeInvalid  =  (NERR_BASE+67);  (* The datatype is not supported by the processor. *)
            CONST NERR_ProcNotFound     =  (NERR_BASE+68);  (* The print processor is not installed. *)
            CONST NERR_BadDev           =  (NERR_BASE+241); (* The requested device is invalid. *)
            CONST NERR_CommDevInUse     =  (NERR_BASE+243); (* This device is already in use as a communications device. *)
            CONST NERR_InvalidComputer  = (NERR_BASE+251); (* This computername is invalid. *)
            CONST NERR_OpenFiles        =  (NERR_BASE+301); (* There are open files on the connection.    *)
            CONST NERR_LocalDrive       =  (NERR_BASE+305); (* The drive letter is in use locally. *)

   <* END *>
<* END *>

(****************************************************************************
*** Picture Utilities error codes
****************************************************************************)
<* IF DEFINED (INCL_PICERRORS)  THEN *>
   <* IF NOT DEFINED (INCL_PICERRORS_INCL)  THEN *>
            (* XLATOFF *)
      <* NEW INCL_PICERRORS_INCL + *>
            (* XLATON *)

            CONST PMERR_INV_TYPE        = 05001H;
            CONST PMERR_INV_CONV        = 05002H;
            CONST PMERR_INV_SEGLEN      = 05003H;
            CONST PMERR_DUP_SEGNAME     = 05004H;
            CONST PMERR_INV_XFORM       = 05005H;
            CONST PMERR_INV_VIEWLIM     = 05006H;
            CONST PMERR_INV_3DCOORD     = 05007H;
            CONST PMERR_SMB_OVFLOW      = 05008H;
            CONST PMERR_SEG_OVFLOW      = 05009H;
            CONST PMERR_PIC_DUP_FILENAME= 05010H;

   <* END *>
<* END *>


(****************************************************************************
*    numbers from 05100  to 05fff are reserved.
****************************************************************************)

(**************************** end of file **********************************)

(* ------------- End of file:  .\hm\pmerr.hm ------------- *)
END OS2.

(* ------------- End of file:  .\hm\os2.hm ------------- *)
