home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vp21beta.zip / ORTLSRC.RAR / OS2BASE.PAS next >
Pascal/Delphi Source File  |  2000-08-15  |  296KB  |  6,653 lines

  1. //█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  2. //█                                                       █
  3. //█      Virtual Pascal Runtime Library.  Version 2.1.    █
  4. //█      OS/2 Base & Text Mode Applications API interface █
  5. //█      ─────────────────────────────────────────────────█
  6. //█      Copyright (C) 1995-2000 vpascal.com              █
  7. //█                                                       █
  8. //▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  9.  
  10. unit Os2Base;
  11.  
  12. interface
  13.  
  14. {&Far16+,AlignRec-,OrgName+,Use32-}
  15.  
  16. uses Os2Def;
  17.  
  18. {----[ KBDCALLS ]----}
  19.  
  20. const
  21.   kr_KbdCharIn                  = $00000001;    { KbdRegister FnMask }
  22.   kr_KbdPeek                    = $00000002;
  23.   kr_KbdFlushBuffer             = $00000004;
  24.   kr_KbdGetStatus               = $00000008;
  25.   kr_KbdSetStatus               = $00000010;
  26.   kr_KbdStringIn                = $00000020;
  27.   kr_KbdOpen                    = $00000040;
  28.   kr_KbdClose                   = $00000080;
  29.   kr_KbdGetFocus                = $00000100;
  30.   kr_KbdFreeFocus               = $00000200;
  31.   kr_KbdGetCp                   = $00000400;
  32.   kr_KbdSetCp                   = $00000800;
  33.   kr_KbdXlate                   = $00001000;
  34.   kr_KbdSetCustXt               = $00002000;
  35.  
  36.   io_Wait                       = 0;            { WaitFlag           }
  37.   io_NoWait                     = 1;
  38.  
  39.   keyboard_Echo_On              = $0001;        { KBDINFO.fsMask     }
  40.   keyboard_Echo_Off             = $0002;
  41.   keyboard_Binary_Mode          = $0004;
  42.   keyboard_Ascii_Mode           = $0008;
  43.   keyboard_Modify_State         = $0010;
  44.   keyboard_Modify_Interim       = $0020;
  45.   keyboard_Modify_Turnaround    = $0040;
  46.   keyboard_2B_Turnaround        = $0080;
  47.   keyboard_Shift_Report         = $0100;
  48.  
  49.   kbdstf_RightShift             = $0001;        { KBDINFO.fsState    }
  50.   kbdstf_LeftShift              = $0002;        { KBDKEYINFO.fsState }
  51.   kbdstf_Control                = $0004;        { KBDTRANS.fsState   }
  52.   kbdstf_Alt                    = $0008;
  53.   kbdstf_ScrollLock_On          = $0010;
  54.   kbdstf_NumLock_On             = $0020;
  55.   kbdstf_Capslock_On            = $0040;
  56.   kbdstf_Insert_On              = $0080;
  57.   kbdstf_LeftControl            = $0100;
  58.   kbdstf_LeftAlt                = $0200;
  59.   kbdstf_RightControl           = $0400;
  60.   kbdstf_RightAlt               = $0800;
  61.   kbdstf_ScrollLock             = $1000;
  62.   kbdstf_NumLock                = $2000;
  63.   kbdstf_CapsLock               = $4000;
  64.   kbdstf_SysReq                 = $8000;
  65.  
  66.   kbdtrf_Shift_Key_In           = $01;          { KBDTRANS.fbStatus  }
  67.   kbdtrf_Conversion_Request     = $20;
  68.   kbdtrf_Final_Char_In          = $40;
  69.   kbdtrf_Interim_Char_In        = $80;
  70.  
  71.   keyboard_At_Compatible        = $0001;        { KbdHwId.IdKbd      }
  72.   keyboard_Enhanced_101         = $AB41;
  73.   keyboard_Enhanced_102         = $AB41;
  74.   keyboard_Enhanced_122         = $AB85;
  75.   keyboard_SpaceSaver           = $AB54;
  76.  
  77. type
  78.   KbdKeyInfo = record           { Record for KbdCharIn and KbdPeek          }
  79.     chChar:     Char;           { ASCII char (0 or $E0 = extended ASCII)    }
  80.     chScan:     Byte;           { Scan code (or extended ASCII char)        }
  81.     fbStatus:   Byte;           { Miscellaneous status; key recieved flag   }
  82.     bNlsShift:  Byte;           { NLS Shift Status                          }
  83.     fsState:    SmallWord;      { State of shift keys                       }
  84.     time:       ULong;          { TimeStamp (unique number of milliseconds) }
  85.   end;
  86.  
  87.   StringInBuf = record          { Record for KbdStringIn                    }
  88.     cb:         SmallWord;      { Requested maximum number of characters    }
  89.     cchIn:      SmallWord;      { Expects: size of previous input(template) }
  90.   end;                          { Returns: the actual number of characters  }
  91.  
  92.   KbdInfo = record              { record for KbdSet / GetStatus             }
  93.     cb:           SmallWord;    { Size of this record                       }
  94.     fsMask:       SmallWord;    { Mode of operation                         }
  95.     chTurnAround: SmallWord;    { usually $000D; i.e. Enter                 }
  96.     fsInterim:    SmallWord;    { NLS control bits                          }
  97.     fsState:      SmallWord;    { Shift key status                          }
  98.   end;
  99.  
  100.   KbdHwId = record              { record for KbdGetHWID                     }
  101.     cb:          SmallWord;     { Size of this record                       }
  102.     idKbd:       SmallWord;     { Id number generated by keyboard hardware  }
  103.     usReserved1: SmallWord;     { Reserved                                  }
  104.     usReserved2: SmallWord;     { Reserved                                  }
  105.   end;
  106.  
  107.   KbdTrans = record             { record for KbdXlate                       }
  108.     chChar:     Char;           { Returns: ASCII Char(0 for X-ASCII)        }
  109.     chScan:     Byte;           { Expects: Scan Code; Returns: 0 (or X-ASCII) }
  110.     fbStatus:   Byte;           { Indicates return status                   }
  111.     bNlsShift:  Byte;           { NLS shift status                          }
  112.     fsState:    SmallWord;      { Shift key status                          }
  113.     time:       ULong;          { TimeStamp (unique number of milliseconds  }
  114.     fsDD:       SmallWord;      { Device driver returned flags              }
  115.     fsXlate:    SmallWord;      { Different flags (translation complete flag) }
  116.     fsShift:    SmallWord;      { Used in multi-key keystroke translation   }
  117.     sZero:      SmallWord;      { Reserved, must be zero                    }
  118.   end;
  119.  
  120. function KBDCHARIN(var Key: KbdKeyInfo; WaitFlag: SmallWord; KbdHandle: SmallWord): ApiRet16;
  121. function KBDCLOSE(KbdHandle: SmallWord): ApiRet16;
  122. function KBDDEREGISTER: ApiRet16;
  123. function KBDFLUSHBUFFER(KbdHandle: SmallWord): ApiRet16;
  124. function KBDFREEFOCUS(KbdHandle: SmallWord): ApiRet16;
  125. function KBDGETCP(Reserved: ULong; var CodePage: SmallWord; KbdHandle: SmallWord): ApiRet16;
  126. function KBDGETFOCUS(WaitFlag: SmallWord; KbdHandle: SmallWord): ApiRet16;
  127. function KBDGETHWID(var HwId: KbdHwId; KbdHandle: SmallWord): ApiRet16;
  128. function KBDGETSTATUS(var Status: KbdInfo; KbdHandle: SmallWord): ApiRet16;
  129. function KBDOPEN(var KbdHandle: SmallWord): ApiRet16;
  130. function KBDPEEK(var Key: KbdKeyInfo; KbdHandle: SmallWord): ApiRet16;
  131. function KBDREGISTER(ModuleName,ProcName: PChar; FnMask: ULong): ApiRet16;
  132. function KBDSETCP(usReserved: SmallWord; CodePage: SmallWord; KbdHandle: SmallWord): ApiRet16;
  133. function KBDSETCUSTXT(XLateTbl: Pointer; KbdHandle: SmallWord): ApiRet16;
  134. function KBDSETFGND: ApiRet16;
  135. function KBDSETHWID(var HwId: KbdHwId; KbdHandle: SmallWord): ApiRet16;
  136. function KBDSETSTATUS(var Status: KbdInfo; KbdHandle: SmallWord): ApiRet16;
  137. function KBDSTRINGIN(CharBuf: Pointer; var LenInOut: StringInBuf; WaitFlag: SmallWord; KbdHandle: SmallWord): ApiRet16;
  138. function KBDSYNCH(WaitFlag: SmallWord): ApiRet16;
  139. function KBDXLATE(var TransData: KbdTrans; KbdHandle: SmallWord): ApiRet16;
  140.  
  141. {----[ MOUCALLS ]----}
  142.  
  143. const
  144.   mr_MouGetNumButtons           = $00000001;    { MouRegsiter FnMask }
  145.   mr_MouGetNumMickeys           = $00000002;
  146.   mr_MouGetDevStatus            = $00000004;
  147.   mr_MouGetNumQueEl             = $00000008;
  148.   mr_MouReadEventQue            = $00000010;
  149.   mr_MouGetScaleFact            = $00000020;
  150.   mr_MouGetEventMask            = $00000040;
  151.   mr_MouSetScaleFact            = $00000080;
  152.   mr_MouSetEventMask            = $00000100;
  153.   mr_MouOpen                    = $00000800;
  154.   mr_MouClose                   = $00001000;
  155.   mr_MouGetPtrShape             = $00002000;
  156.   mr_MouSetPtrShape             = $00004000;
  157.   mr_MouDrawPtr                 = $00008000;
  158.   mr_MouRemovePtr               = $00010000;
  159.   mr_MouGetPtrPos               = $00020000;
  160.   mr_MouSetPtrPos               = $00040000;
  161.   mr_MouInitReal                = $00080000;
  162.   mr_MouSetDevStatus            = $00100000;
  163.  
  164.   mhk_Button1                   = $0001;        { MouGetHotKey / MouSetHotKey }
  165.   mhk_Button2                   = $0002;        { Mouse Hot Key bits          }
  166.   mhk_Button3                   = $0004;
  167.  
  168.   mouse_QueueBusy               = $0001;        { MouGetDevStatus /           }
  169.   mouse_BlockRead               = $0002;        { MouSetDevStatus             }
  170.   mouse_Flush                   = $0004;        { device status constants     }
  171.   mouse_Unsupported_Mode        = $0008;
  172.   mouse_Disabled                = $0100;
  173.   mouse_Mickeys                 = $0200;
  174.  
  175.   mou_NoWait                    = $0000;        { WaitFlag                    }
  176.   mou_Wait                      = $0001;
  177.  
  178.   mouse_Motion                  = $0001;        { MouGetEventMask /           }
  179.   mouse_Motion_With_Bn1_Down    = $0002;        { MouSetEventMask events      }
  180.   mouse_Bn1_Down                = $0004;
  181.   mouse_Motion_With_Bn2_Down    = $0008;
  182.   mouse_Bn2_Down                = $0010;
  183.   mouse_Motion_With_Bn3_Down    = $0020;
  184.   mouse_Bn3_Down                = $0040;
  185.  
  186.   mou_NoDraw                    = $0001;        { MouSetDevStatus Status      }
  187.   mou_Draw                      = $0000;
  188.   mou_Mickeys                   = $0002;
  189.   mou_Pels                      = $0000;
  190.  
  191. type
  192.   PtrLoc = record               { Record for MouGet / SetPtrPos               }
  193.     Row:        SmallWord;      { Current row (vertical coordinate)           }
  194.     Col:        SmallWord;      { Current column (horizontal coordinate)      }
  195.   end;
  196.  
  197.   PtrShape = record             { Record for MouGetPtrShape / MouSetPtrShape  }
  198.     cb:         SmallWord;      { Length of image buffer in bytes             }
  199.     Col:        SmallWord;      { Pointer width in characters or pixels       }
  200.     Row:        SmallWord;      { Pointer height in characters or pixels      }
  201.     ColHot:     SmallWord;      { Hotspot offset from left side               }
  202.     RowHot:     SmallWord;      { Hotspot offset from top                     }
  203.   end;
  204.  
  205.   MouEventInfo = record         { Record for MouReadEventQue                  }
  206.     fs:         SmallWord;      { Event bits                                  }
  207.     Time:       ULong;          { Event timestamp (unique number of milliseconds)}
  208.     Row:        SmallWord;      { Pointer current row position                }
  209.     Col:        SmallWord;      { Pointer current column position             }
  210.   end;
  211.  
  212.   MouQueInfo = record           { Record for MouGetNumQueEl                   }
  213.     cEvents:    SmallWord;      { Number of elements in event queue           }
  214.     cMaxEvents: SmallWord;      { Maximum queue size in elements              }
  215.   end;
  216.  
  217.   ScaleFact = record            { Record for MouGetScaleFact / MouSetScaleFact}
  218.     RowScale:   SmallWord;      { Scaling factor of current row               }
  219.     ColScale:   SmallWord;      { Scaling factor of current column            }
  220.   end;
  221.  
  222.   NoPtrRect = record            { Record for MouRemovePtr                     }
  223.     Row:        SmallWord;      { Row of top of the rectangle                 }
  224.     Col:        SmallWord;      { Column of left edge of the rectangle        }
  225.     cRow:       SmallWord;      { Row of bottom right edge of the rectangle   }
  226.     cCol:       SmallWord;      { Column of botton right edge of the rectangle}
  227.   end;
  228.  
  229.   Threshold = record            { Record for MouGetThreshold / MouSetThreshold}
  230.     Length:     SmallWord;      { Length Field                                }
  231.     Level1:     SmallWord;      { First movement level                        }
  232.     Lev1Mult:   SmallWord;      { First level multiplier                      }
  233.     Level2:     SmallWord;      { Second movement level                       }
  234.     Lev2Mult:   SmallWord;      { Second level multiplier                     }
  235.   end;
  236.  
  237. function MOUCLOSE(MouHandle: SmallWord): ApiRet16;
  238. function MOUDEREGISter: ApiRet16;
  239. function MOUDRAWPTR(MouHandle: SmallWord): ApiRet16;
  240. function MOUFLUSHQUE(MouHandle: SmallWord): ApiRet16;
  241. function MOUGETDEVSTATUS(var Status: SmallWord; MouHandle: SmallWord): ApiRet16;
  242. function MOUGETEVENTMASK(var EventMask: SmallWord; MouHandle: SmallWord): ApiRet16;
  243. function MOUGETHOTKEY(var ButtonBits: SmallWord; MouHandle: SmallWord): ApiRet16;
  244. function MOUGETNUMBUTTONS(var ButtonCount: SmallWord; MouHandle: SmallWord): ApiRet16;
  245. function MOUGETNUMMICKEYS(var MickeyCnt: SmallWord; MouHandle: SmallWord): ApiRet16;
  246. function MOUGETNUMQUEEL(var MouseQInfo: MouQueInfo; MouHandle: SmallWord): ApiRet16;
  247. function MOUGETPTRPOS(var MouPtr: PtrLoc; MouHandle: SmallWord): ApiRet16;
  248. function MOUGETPTRSHAPE(ImageBuf: Pointer; var ImageInfo: PtrShape; MouHandle: SmallWord): ApiRet16;
  249. function MOUGETSCALEFACT(var Scale: ScaleFact; MouHandle: SmallWord): ApiRet16;
  250. function MOUGETTHRESHOLD(var MouThreshold: Threshold; MouHandle: SmallWord): ApiRet16;
  251. function MOUINITREAL(DriverName: PChar): ApiRet16;
  252. function MOUOPEN(DriverName: PChar; var MouHandle: SmallWord): ApiRet16;
  253. function MOUREADEVENTQUE(var Event: MouEventInfo; var WaitFlag: SmallWord; MouHandle: SmallWord): ApiRet16;
  254. function MOUREGISTER(ModuleName,ProcName: PChar; FnMask: ULong): ApiRet16;
  255. function MOUREMOVEPTR(var ProtectArea: NoPtrRect; MouHandle: SmallWord): ApiRet16;
  256. function MOUSETDEVSTATUS(var Status: SmallWord; MouHandle: SmallWord): ApiRet16;
  257. function MOUSETEVENTMASK (var EventMask: SmallWord; MouHandle: SmallWord): ApiRet16;
  258. function MOUSETHOTKEY(var ButtonBits: SmallWord; MouHandle: SmallWord): ApiRet16;
  259. function MOUSETPTRPOS (var MouPtr: PtrLoc; MouHandle: SmallWord): ApiRet16;
  260. function MOUSETPTRSHAPE(ImageBuf: Pointer; var ImageInfo: PtrShape; MouHandle: SmallWord): ApiRet16;
  261. function MOUSETSCALEFACT (var Scale: ScaleFact; MouHandle: SmallWord): ApiRet16;
  262. function MOUSETTHRESHOLD(var MouThreshold: Threshold; MouHandle: SmallWord): ApiRet16;
  263. function MOUSYNCH(WaitFlag: SmallWord): ApiRet16;
  264.  
  265. {----[ VIOCALLS ]----}
  266.  
  267. const
  268.   vr_VioGetCurPos               = $00000001;    { First parameter registration }
  269.   vr_VioGetCurType              = $00000002;    { constants                    }
  270.   vr_VioGetMode                 = $00000004;
  271.   vr_VioGetBuf                  = $00000008;
  272.   vr_VioGetPhysBuf              = $00000010;
  273.   vr_VioSetCurPos               = $00000020;
  274.   vr_VioSetCurType              = $00000040;
  275.   vr_VioSetMode                 = $00000080;
  276.   vr_VioShowBuf                 = $00000100;
  277.   vr_VioReadCharStr             = $00000200;
  278.   vr_VioReadCellStr             = $00000400;
  279.   vr_VioWrtNChar                = $00000800;
  280.   vr_VioWrtNAttr                = $00001000;
  281.   vr_VioWrtNCell                = $00002000;
  282.   vr_VioWrtTTy                  = $00004000;
  283.   vr_VioWrtCharStr              = $00008000;
  284.   vr_VioWrtCharStrAtt           = $00010000;
  285.   vr_VioWrtCellStr              = $00020000;
  286.   vr_VioScrollUp                = $00040000;
  287.   vr_VioScrollDn                = $00080000;
  288.   vr_VioScrollLf                = $00100000;
  289.   vr_VioScrollRt                = $00200000;
  290.   vr_VioSetAnsi                 = $00400000;
  291.   vr_VioGetAnsi                 = $00800000;
  292.   vr_VioPrtSc                   = $01000000;
  293.   vr_VioScrLock                 = $02000000;
  294.   vr_VioScrUnlock               = $04000000;
  295.   vr_VioSavRedrawWait           = $08000000;
  296.   vr_VioSavRedrawUndo           = $10000000;
  297.   vr_VioPopup                   = $20000000;
  298.   vr_VioEndPopup                = $40000000;
  299.   vr_VioPrtScToggle             = $80000000;
  300.  
  301.   vr_VioModeWait                = $00000001;    { Second parameter registration}
  302.   vr_VioModeUndo                = $00000002;    { constants                    }
  303.   vr_VioGetFont                 = $00000004;
  304.   vr_VioGetConfig               = $00000008;
  305.   vr_VioSetCp                   = $00000010;
  306.   vr_VioGetCp                   = $00000020;
  307.   vr_VioSetFont                 = $00000040;
  308.   vr_VioGetState                = $00000080;
  309.   vr_VioSetState                = $00000100;
  310.  
  311.   colors_2                      = $0001;        { VioModeInfo.Color constants }
  312.   colors_4                      = $0002;
  313.   colors_16                     = $0004;
  314.   colors_256                    = $0008;
  315.  
  316.   vgmt_Other                    = $01;          { VioModeInfo.fbType          }
  317.   vgmt_Graphics                 = $02;
  318.   vgmt_DisableBurst             = $04;
  319.  
  320.   vcc_SbCsChar                  = 0;            { VioCheckCharType.pType      }
  321.   vcc_DbCsFullChar              = 1;
  322.   vcc_DbCs1stHalf               = 2;
  323.   vcc_DbCs2ndHalf               = 3;
  324.  
  325.   ansi_On                       = 1;            { VioGetAnsi / VioSetAnsi Mode}
  326.   ansi_Off                      = 0;
  327.  
  328.   vsrwi_SaveAndRedraw           = 0;            { VioSavRedrawWait RequestType}
  329.   vsrwi_Redraw                  = 1;
  330.   vsrwn_Save                    = 0;            { VioSavRedrawWait NotifyType }
  331.   vsrwn_Redraw                  = 1;
  332.  
  333.   undoi_GetOwner                = 0;            { VioSavRedrawUndo Ownership  }
  334.   undoi_ReleaseOwner            = 1;
  335.   undok_ErrorCode               = 0;            { VioSavRedrawUndo KillThread }
  336.   undok_Terminate               = 1;
  337.  
  338.   vmwr_Popup                    = 0;            { VioModeWait RequestType     }
  339.   vmwn_Popup                    = 0;            { VioModeWait NotifyType      }
  340.  
  341.   lockIO_NoWait                 = 0;            { VioScrLock WaitFlag         }
  342.   lockIO_Wait                   = 1;
  343.   lock_Success                  = 0;            { VioScrLock Status           }
  344.   lock_Fail                     = 1;
  345.  
  346.   vp_NoWait                     = $0000;        { VioPopup OptionFlags        }
  347.   vp_Wait                       = $0001;
  348.   vp_Opaque                     = $0000;
  349.   vp_Transparent                = $0002;
  350.  
  351.   vio_Config_Current            = 0;            { VioGetConfig.Configuration  }
  352.   vio_Config_Primary            = 1;
  353.   vio_Config_Secondary          = 2;
  354.  
  355.   display_Monochrome            = $0000;        { VioConfigInfo.Adapter       }
  356.   display_CGA                   = $0001;
  357.   display_EGA                   = $0002;
  358.   display_VGA                   = $0003;
  359.   display_8514a                 = $0007;
  360.  
  361.   monitor_Monochrome            = $0000;        { VioConfigInfo.Display       }
  362.   monitor_Color                 = $0001;
  363.   monitor_Enhanced              = $0002;
  364.   monitor_8503                  = $0003;
  365.   monitor_851x_Color            = $0004;
  366.   monitor_8514                  = $0009;
  367.  
  368.   vgfi_GetCurFont               = 0;            { VioFontInfo.Type            }
  369.   vgfi_GetROMFont               = 1;
  370.  
  371. type
  372.   VioCursorInfo = record        { Record for VioSetCurType / VioGetCurType    }
  373.     yStart:     SmallWord;      { Cursor start scan line (0-based)            }
  374.     cEnd:       SmallWord;      { Cursor end scan line                        }
  375.     cx:         SmallWord;      { Cursor width (0=default width)              }
  376.     Attr:       SmallWord;      { Cursor color attribute (-1 = hidden)        }
  377.   end;
  378.  
  379.   VioModeInfo = record          { Record for VioSetMode / VioGetMode          }
  380.     cb:         SmallWord;      { Size of this structure                      }
  381.     fbType:     Byte;           { 8-bit mask identifying the mode             }
  382.     Color:      Byte;           { Colors available. Power of 2 (1=2,2=4,4=16) }
  383.     Col:        SmallWord;      { Number of text character columns            }
  384.     Row:        SmallWord;      { Number of text character rows               }
  385.     HRes:       SmallWord;      { Display width in pixels                     }
  386.     VRes:       SmallWord;      { Display height in pixels                    }
  387.     fmt_ID:     Byte;           { Format of the attributes                    }
  388.     Attrib:     Byte;           { Number of attributes in the attribfmt field }
  389.     Buf_Addr:   ULong;          { Address of the physical display buffer      }
  390.     Buf_Length: ULong;          { Length of the physical display buffer       }
  391.     Full_Length: ULong;         { Size of the buffer to save entire phis. buf.}
  392.     Partial_Length: ULong;      { Size of the buffer to save part of the phis. buf. overwritten by VioPopup }
  393.     Ext_Data_Addr: Pointer;     { Address of an extended-mode structure       }
  394.   end;
  395.  
  396.   VioPhysBuf = record           { Record for VioGetPhysBuf                    }
  397.     pBuf:       Pointer;        { Absolute screen address                     }
  398.     cb:         ULong;          { Length of the buffer in bytes               }
  399.     Sel:        SmallWord;      { Receives selector for video access          }
  400.   end;
  401.  
  402.   VioConfigInfo = record        { Record for VioGetConfig                     }
  403.     cb:         SmallWord;      { Size of this structure                      }
  404.     Adapter:    SmallWord;      { Adapter type                                }
  405.     Display:    SmallWord;      { Display type                                }
  406.     cbMemory:   ULong;          { Amount of RAM in bytes on the adapter       }
  407.     Configuration: SmallWord;   { Configuration Id (Primary,Secondary,Current)}
  408.     VDHVersion: SmallWord;      { Reserved; must be zero                      }
  409.     Flags:      SmallWord;      { Flags: $0001 sets default power-on config   }
  410.     HWBufferSize: ULong;        { Size of the buffer to save full adapter state(not including phis buf)}
  411.     FullSaveSize: ULong;        { Size of the buffer to save entire adapter state}
  412.     PartSaveSize: ULong;        { Size of the buffer to save part of the phis. buf. overwritten by VioPopup }
  413.     EMAdaptersOFF: SmallWord;   { Offset of the info that describes emulated adapter types}
  414.     EMDisplaysOFF: SmallWord;   { Offset of the info that describes emulated display types}
  415.   end;
  416.  
  417.   VioFontInfo = record          { Record for VioGetFont / VioSetFont          }
  418.     cb:         SmallWord;      { Size of this structure                      }
  419.     rType:      SmallWord;      { Request type                                }
  420.     cxCell:     SmallWord;      { Column per cell                             }
  421.     cyCell:     SmallWord;      { Rows per cell                               }
  422.     pbData:     Pointer;        { Address of caller's data area               }
  423.     cbData:     SmallWord;      { Size in bytes of the callers data area      }
  424.   end;
  425.  
  426.   VioPalState = record          { Record for VioGetState / VioSetState        }
  427.     cb:         SmallWord;      { Size of this structure                      }
  428.     rType:      SmallWord;      { 0 = palette                                 }
  429.     iFirst:     SmallWord;      { Specifies the first register                }
  430.     Acolor:     array [0..15] of SmallWord; { Up to 16 register values             }
  431.   end;
  432.  
  433.   VioOverScan = record          { Record for VioGetState / VioSetState        }
  434.     cb:         SmallWord;      { Size of this structure                      }
  435.     rType:      SmallWord;      { 1 = border color                            }
  436.     Color:      SmallWord;      { The color of the border area                }
  437.   end;
  438.  
  439.   VioIntensity = record         { Record for VioGetState / VioSetState        }
  440.     cb:         SmallWord;      { Size of this structure                      }
  441.     rType:      SmallWord;      { 2 = Blink/bold settings                     }
  442.     fs:         SmallWord;      { The blink/bold background switch            }
  443.   end;
  444.  
  445.   VioColorReg = record          { Record for VioGetState / VioSetState        }
  446.     cb:         SmallWord;      { Size of this structure                      }
  447.     rType:      SmallWord;      { 3 = Color registers                         }
  448.     FirstColorReg: SmallWord;   { Specifies the first color registers         }
  449.     NumColorRegs: SmallWord;    { Number of color registers                   }
  450.     ColorRegAddr: Pointer;      { Pointer to array with color values          }
  451.   end;
  452.  
  453.   VioSetULineLoc = record       { Record for VioGetState / VioSetState        }
  454.     cb:         SmallWord;      { Size of this structure                      }
  455.     rType:      SmallWord;      { 5 = Underline                               }
  456.     ScanLine:   SmallWord;      { Location of the underline (32=no underline) }
  457.   end;
  458.  
  459.   VioSetTarget = record         { Record for VioGetState / VioSetState        }
  460.     cb:         SmallWord;      { Size of this structure                      }
  461.     rType:      SmallWord;      { 6 = Target for VioSetMode                   }
  462.     DefaultAlgorithm: SmallWord;{ $0000=default, $0001=Primary, $0002=Secondary}
  463.   end;
  464.  
  465. function VIOCHECKCHARTYPE(var CharType: SmallWord; Row,Column,VioHandle: SmallWord): ApiRet16;
  466. function VIODEREGISTer: ApiRet16;
  467. function VIOENDPOPUP(VioHandle: SmallWord): ApiRet16;
  468. function VIOGETANSI(var Mode: SmallWord; VioHandle: SmallWord): ApiRet16;
  469. function VIOGETBUF(var LVBAddr: Pointer; var LVBLength: SmallWord; VioHandle: SmallWord): ApiRet16;
  470. function VIOGETCONFIG(ConfigId: SmallWord; var VideoConfig: VioConfigInfo; VioHandle: SmallWord): ApiRet16;
  471. function VIOGETCP(Reserved: SmallWord; var CodePage: SmallWord; VioHandle: SmallWord): ApiRet16;
  472. function VIOGETCURPOS(var Row,Col: SmallWord; VioHandle: SmallWord): ApiRet16;
  473. function VIOGETCURTYPE(var CurData: VioCursorInfo; VioHandle: SmallWord): ApiRet16;
  474. function VIOGETFONT(var FontData: VioFontInfo; VioHandle: SmallWord): ApiRet16;
  475. function VIOGETMODE(var Mode: VioModeInfo; VioHandle: SmallWord): ApiRet16;
  476. function VIOGETPHYSBUF(var PBData: VioPhysBuf; Reserved: SmallWord): ApiRet16;
  477. function VIOGETSTATE(var State; VioHandle: SmallWord): ApiRet16;
  478. function VIOMODEUNDO(OwnerShip,KillFlag,Reserved: SmallWord): ApiRet16;
  479. function VIOMODEWAIT(RequestType: SmallWord; var NotifyType: SmallWord; Reserved: SmallWord): ApiRet16;
  480. function VIOPOPUP(var OptionFlags: SmallWord; VioHandle: SmallWord): ApiRet16;
  481. function VIOPRTSC(VioHandle: SmallWord): ApiRet16;
  482. function VIOPRTSCTOGGLE(VioHandle: SmallWord): ApiRet16;
  483. function VIOREADCELLSTR(var Buf; var BufLen: SmallWord; Row,Column,VioHandle: SmallWord): ApiRet16;
  484. function VIOREADCHARSTR(var Buf; var BufLen: SmallWord; Row,Column,VioHandle: SmallWord): ApiRet16;
  485. { Stealth function: it's declared in the C header file, but it's not }
  486. { available in the VIOCALLS dynamic link library                     }
  487. {function VioRedrawSize(var RedrawSize: ULong): ApiRet16;            }
  488. function VIOREGISTER(ModuleName,ProcName: PChar; FnMask1,FnMask2: ULong): ApiRet16;
  489. function VIOSAVREDRAWUNDO(Ownership,KillThread,Reserved: SmallWord): ApiRet16;
  490. function VIOSAVREDRAWWAIT(RequestType: SmallWord; var NotifyType: SmallWord; Reserved: SmallWord): ApiRet16;
  491. function VIOSCRLOCK(WaitFlag: SmallWord; var Status: Byte; VioHandle: SmallWord): ApiRet16;
  492. function VIOSCRUNLOCK(VioHandle: SmallWord): ApiRet16;
  493. function VIOSCROLLDN(TopRow,LeftCol,BotRow,RightCol,Lines: SmallWord; var Cell: SmallWord; VioHandle: SmallWord): ApiRet16;
  494. function VIOSCROLLLF(TopRow,LeftCol,BotRow,RightCol,cbCol: SmallWord; var Cell: SmallWord; VioHandle: SmallWord): ApiRet16;
  495. function VIOSCROLLRT(TopRow,LeftCol,BotRow,RightCol,cbCol: SmallWord; var Cell: SmallWord; VioHandle: SmallWord): ApiRet16;
  496. function VIOSCROLLUP(TopRow,LeftCol,BotRow,RightCol,Lines: SmallWord; var Cell: SmallWord; VioHandle: SmallWord): ApiRet16;
  497. function VIOSETANSI(Mode,VioHandle: SmallWord): ApiRet16;
  498. function VIOSETCP(Reserved: SmallWord; CodePage: SmallWord; VioHandle: SmallWord): ApiRet16;
  499. function VIOSETCURPOS(Row,Column: SmallWord; VioHandle: SmallWord): ApiRet16;
  500. function VIOSETCURTYPE(var CurData: VioCursorInfo; VioHandle: SmallWord): ApiRet16;
  501. function VIOSETFONT(var FontData: VioFontInfo; VioHandle: SmallWord): ApiRet16;
  502. function VIOSETMODE(var Mode: VioModeInfo; VioHandle: SmallWord): ApiRet16;
  503. function VIOSETSTATE(var State; VioHandle: SmallWord): ApiRet16;
  504. function VIOSHOWBUF(BufOfs,Len,VioHandle: SmallWord): ApiRet16;
  505. function VIOWRTCELLSTR(CellStr: Pointer; Len,Row,Column,VioHandle: SmallWord): ApiRet16;
  506. function VIOWRTCHARSTR(CharStr: Pointer; Len,Row,Column,VioHandle: SmallWord): ApiRet16;
  507. function VIOWRTCHARSTRATT(CharStr: Pointer; Len,Row,Column: SmallWord; var Attr: Byte; VioHandle: SmallWord): ApiRet16;
  508. function VIOWRTNATTR(var Attr: Byte; Times,Row,Column,VioHandle: SmallWord): ApiRet16;
  509. function VIOWRTNCELL(var Cell: SmallWord; Times,Row,Column,VioHandle: SmallWord): ApiRet16;
  510. function VIOWRTNCHAR(var Char: Byte; Times,Row,Column,VioHandle: SmallWord): ApiRet16;
  511. function VIOWRTTTY(CharStr: Pointer; Len,VioHandle: SmallWord): ApiRet16;
  512.  
  513. {----[ MONCALLS ]----}
  514.  
  515. const
  516.   monitor_Default               = $0000;        { DosMonReg PosCode           }
  517.   monitor_Begin                 = $0001;
  518.   monitor_End                   = $0002;
  519.  
  520. type
  521.   MonIn = record                { Record for DosMonRead / DosMonReg           }
  522.     cb:       SmallWord;        { Size of this structure                      }
  523.     Reserved: array [0..17] of Byte;    { Reserved                            }
  524.     Buffer:   array [0..107] of Byte;   { Input buffer                        }
  525.   end;
  526.  
  527.   MonOut = record               { Record for DosMonWrite / DosMonReg          }
  528.     cb:       SmallWord;        { Size of this structure                      }
  529.     Reserved: array [0..17] of Byte;    { Reserved                            }
  530.     Buffer:   array [0..107] of Byte;   { Output buffer                       }
  531.   end;
  532.  
  533. function DOSMONCLOSE(MonHandle: SmallWord): ApiRet16;
  534. function DOSMONOPEN(DevName: PChar; var MonHandle: SmallWord): ApiRet16;
  535. function DOSMONREAD(InBuf: Pointer; WaitFlag: SmallWord; DataBuf: Pointer; var BytesRead: SmallWord): ApiRet16;
  536. function DOSMONREG(MonHandle: SmallWord; InBuf,OutBuf: Pointer; PosCode,Index: SmallWord): ApiRet16;
  537. function DOSMONWRITE(OutBuf,DataBuf: Pointer; ByteCount: SmallWord): ApiRet16;
  538.  
  539. {----[ BDCALLS ]----}
  540.  
  541. { BidiHotKeys in BIDISTRUCT                                                }
  542. { The following defined value may be used to Enable/Disable the Bidi       }
  543. { keyboard hot keys.                                                       }
  544. { To enable a hot key, perform an 'OR' operation on the Bidi hot key flag  }
  545. { Word in the KBVCBTYPE  structure with the required defined value.        }
  546. { To disable a hot key, perform an 'AND NOT' operation on the Bidi hot key }
  547. { flag Word in the KBVCBTYPE  structure with the required defined value.   }
  548. const
  549.   bdhkflag_Push                 = $0004;
  550.   bdhkflag_End_Push             = $0008;
  551.   bdhkflag_Auto_Push            = $0010;
  552.   bdhkflag_Field_Rev            = $0020;
  553.   bdhkflag_Screen_Rev           = $0040;
  554.   bdhkflag_Bidi_Popup           = $0200;
  555.   bdhkflag_Automatic            = $0400;
  556.   bdhkflag_Initial              = $0800;
  557.   bdhkflag_Middle               = $1000;
  558.   bdhkflag_Final                = $2000;
  559.   bdhkflag_Isolated             = $4000;
  560. { Bidi Flags in BIDISTRUCT                                                 }
  561. { The following defined value may be used to Enable/Disable the Bidi       }
  562. { functions.                                                               }
  563. { To enable a Bidi function, perform an 'OR' operation on the Bidi flags   }
  564. { Word in the BDKBVCB  structure with the required defined value.          }
  565. { To disable a Bidi fuction, perform an 'AND NOT' operation on the Bidi    }
  566. { flags Word in the BDKBVCB  structure with the required defined value.    }
  567.   bdflag_AutoPush_Rtl           = $0001;
  568.   bdflag_AutoPush_Ltr           = $0002;
  569.   bdflag_PushLevel              = $0004;
  570.   bdflag_Layer                  = $0010;
  571.   bdflag_Field_Rev              = $0020;
  572. { CSD in BIDIATT                                                           }
  573. { The following defined value may be used to select the specified          }
  574. { bit in the Bidi Attributes.                                              }
  575.   bdcsd_Automatic               = $00000000;
  576.   bdcsd_PassThru                = $00000001;
  577.   bdcsd_Base                    = $00000010;
  578.   bdcsd_Initial                 = $00000011;
  579.   bdcsd_Middle                  = $00000012;
  580.   bdcsd_Final                   = $00000013;
  581.   bdcsd_Isolated                = $00000014;
  582.   bdnum_Arabic                  = $00000000;
  583.   bdnum_PassThru                = $00001000;
  584.   bdnum_Hindu                   = $00002000;
  585.   bdorient_Ltr                  = $00000000;
  586.   bdorient_Rtl                  = $00010000;
  587.   bd_Level                      = $30000000;
  588.   bd_Support                    = $00000000;
  589.  
  590. { The keyboard control block structure }
  591. type
  592.   BdKvCb = record
  593.     BDLength:      SmallWord;
  594.     BDVersionId:   SmallWord;
  595.     BDAtts:        ULong;
  596.     Reserved:      ULong;
  597.     BDHotKeyFlags: SmallWord;
  598.     BDFlags:       SmallWord;
  599.     Reserved2:     array [0..63] of Byte;
  600.   end;
  601.  
  602. { The printer control block structure }
  603.   BdPrCb = record
  604.     PRLength: SmallWord;
  605.     PRAtts:   ULong;
  606.     Reserved: array [0..13] of Byte;
  607.   end;
  608.  
  609. { The Character Shape Determination structure }
  610.  
  611.   PCSDRec = ^CSDRec;
  612.   CSDRec = record
  613.     RecLength:    ULong;
  614.     Buffer:       Pointer;
  615.     BufferLength: ULong;
  616.     BufferIndex:  ULong;
  617.   end;
  618.  
  619.   PRetInfo = Pointer;
  620.   PSetInfo = Pointer;
  621.  
  622. function NLSQUERYBIDIATT(Effect: Long; RetInfo: PRetInfo): ApiRet16;
  623. function NLSSETBIDIATT(Effect: Long; SetInfo: PSetInfo): ApiRet16;
  624. function NLSSHAPEBIDISTRING(BidiAtts,Reserved: ULong; Src,Target: PChar; Length,Increment: ULong): ApiRet16;
  625. function NLSEDITSHAPE(BidiAtts: ULong; Effect: Long; var Src,Target: CSDRec; var CSDState: ULong; Increment: ULong): ApiRet16;
  626. function NLSINVERSESTRING(Src,Target: PChar; Length,Increment: ULong): ApiRet16;
  627. function NLSCONVERTBIDINUMERICS(BidiAtts: ULong; Reserved: Long; Src,Tagret: PChar; Length,Increment: ULong): ApiRet16;
  628. function NLSSETBIDIPRINT(BidiAtts,Length: ULong; FileHandle: SmallWord): ApiRet16;
  629. function NLSCONVERTBIDISTRING(Src,Target: PChar; Length,Increment,SBidiAtts,TBidiAtts,Reserved: ULong): ApiRet16;
  630.  
  631. {----[ DOSCALLS ]----}
  632.  
  633. {$Cdecl+}
  634.  
  635. { General services }
  636. function DosBeep(Freq,Dur: Longint): ApiRet;
  637.  
  638. { Process and Thread support }
  639. function DosExit(Action,Result: Longint): ApiRet;
  640.  
  641. { DosExit codes }
  642. const
  643.   exit_Thread                   = 0;
  644.   exit_Process                  = 1;
  645.  
  646. type
  647.   FnThread  = function(P: ULong): ApiRet;
  648.  
  649.   PTib2 = ^Tib2;                        { Thread Information Block (TIB)      }
  650.   Tib2  = record                        { System specific portion             }
  651.     Tib2_ulTid:           ULong;        { Thread I.D.                         }
  652.     Tib2_ulPri:           ULong;        { Thread priority                     }
  653.     Tib2_Version:         ULong;        { Version number for this structure   }
  654.     Tib2_usMCCount:       SmallWord;    { Must Complete count                 }
  655.     Tib2_fMCForceFlag:    SmallWord;    { Must Complete force flag            }
  656.   end;
  657.  
  658.   PTib = ^Tib;
  659.   Tib  = record                         { TIB Thread Information Block        }
  660.     Tib_PExchain:         Pointer;      { Head of exception handler chain     }
  661.     Tib_PStack:           Pointer;      { Pointer to base of stack            }
  662.     Tib_PStackLimit:      Pointer;      { Pointer to end of stack             }
  663.     Tib_PTib2:            PTib2;        { Pointer to system specific TIB      }
  664.     Tib_Version:          ULong;        { Version number for this TIB structure}
  665.     Tib_Ordinal:          ULong;        { Thread ordinal number               }
  666.   end;
  667.  
  668.   PPib = ^Pib;
  669.   Pib  = record                         { Process Information Block (PIB)     }
  670.     Pib_ulPid:            ULong;        { Process I.D.                        }
  671.     Pib_ulPPid:           ULong;        { Parent process I.D.                 }
  672.     Pib_hMte:             ULong;        { Program (.EXE) module handle        }
  673.     Pib_pchCmd:           PChar;        { Command line pointer                }
  674.     Pib_pchEnv:           PChar;        { Environment pointer                 }
  675.     Pib_flStatus:         ULong;        { Process' status bits                }
  676.     Pib_ulType:           ULong;        { Process' type code                  }
  677.   end;
  678.  
  679. function DosCreateThread(var Tid: Tid; Fn: FnThread; Param,Flag,cbStack: ULong): ApiRet;
  680. function DosResumeThread(Tid: Tid): ApiRet;
  681. function DosSuspendThread(Tid: Tid): ApiRet;
  682. function DosGetInfoBlocks(var Tib: PTib; var TPib: PPib): ApiRet;
  683. function DosKillThread(TTid: Tid): ApiRet;
  684. function DosAllocThreadLocalMemory(cb: ULong; var P: PLong): ApiRet;
  685. function DosFreeThreadLocalMemory(P: PLong): ApiRet;
  686.  
  687. { Action code values }
  688. const
  689.   dcwa_Process                  = 0;
  690.   dcwa_ProcessTree              = 1;
  691.  
  692. { Wait option values }
  693.   dcww_Wait                     = 0;
  694.   dcww_NoWait                   = 1;
  695.  
  696. { Thread Flags for DosCreateThread options }
  697.  
  698.   create_Ready                  = 0;
  699.   create_Suspended              = 1;
  700.   stack_Sparse                  = 0;
  701.   stack_Committed               = 2;
  702.  
  703. type
  704.   PResultCodes = ^ResultCodes;
  705.   ResultCodes = record
  706.     codeTerminate: ULong;
  707.     codeResult:    ULong;
  708.   end;
  709.  
  710. function DosWaitChild(Action,Option: ULong; var Result: ResultCodes; var RetPID: Pid; Pid: Pid): ApiRet;
  711. function DosWaitThread(var Tid: Tid; Option: ULong): ApiRet;
  712. function DosSleep(MSec: ULong): ApiRet;
  713.  
  714. { Buffer for DosDebug }
  715. type
  716.   PDebug_Buffer = ^Debug_Buffer;
  717.   Debug_Buffer = record
  718.    Pid:    Longint;     {  Debuggee Process ID        }
  719.    Tid:    Longint;     {  Debuggee Thread ID         }
  720.    Cmd:    Longint;     {  Command or Notification    }
  721.    Value:  Longint;     {  Generic Data Value         }
  722.    Addr:   Longint;     {  Debuggee Address           }
  723.    Buffer: Longint;     {  Debugger Buffer Address    }
  724.    Len:    Longint;     {  Length of Range            }
  725.    Index:  Longint;     {  Generic Identifier Index   }
  726.    MTE:    Longint;     {  Module Handle              }
  727.    EAX:    Longint;     {  Register Set               }
  728.    ECX:    Longint;
  729.    EDX:    Longint;
  730.    EBX:    Longint;
  731.    ESP:    Longint;
  732.    EBP:    Longint;
  733.    ESI:    Longint;
  734.    EDI:    Longint;
  735.    EFlags: Longint;
  736.    EIP:    Longint;
  737.    CSLim:  Longint;     {  Byte Granular Limits }
  738.    CSBase: Longint;     {  Byte Granular Base   }
  739.    CSAcc:  Byte;        {  Access Rights        }
  740.    CSAtr:  Byte;        {  Attributes           }
  741.    CS:     SmallWord;
  742.    DSLim:  Longint;
  743.    DSBase: Longint;
  744.    DSAcc:  Byte;
  745.    DSAtr:  Byte;
  746.    DS:     SmallWord;
  747.    ESLim:  Longint;
  748.    ESBase: Longint;
  749.    ESAcc:  Byte;
  750.    ESAtr:  Byte;
  751.    ES:     SmallWord;
  752.    FSLim:  Longint;
  753.    FSBase: Longint;
  754.    FSAcc:  Byte;
  755.    FSAtr:  Byte;
  756.    FS:     SmallWord;
  757.    GSLim:  Longint;
  758.    GSBase: Longint;
  759.    GSAcc:  Byte;
  760.    GSAtr:  Byte;
  761.    GS:     SmallWord;
  762.    SSLim:  Longint;
  763.    SSBase: Longint;
  764.    SSAcc:  Byte;
  765.    SSAtr:  Byte;
  766.    SS:     SmallWord;
  767.   end;
  768.  
  769. { DosDebug Commands }
  770. const
  771.   dbg_c_Null                    = 0;
  772.   dbg_c_ReadMem                 = 1;
  773.   dbg_c_ReadReg                 = 3;
  774.   dbg_c_WriteMem                = 4;
  775.   dbg_c_WriteReg                = 6;
  776.   dbg_c_Go                      = 7;
  777.   dbg_c_Term                    = 8;
  778.   dbg_c_SStep                   = 9;
  779.   dbg_c_Stop                    = 10;
  780.   dbg_c_Freeze                  = 11;
  781.   dbg_c_Resume                  = 12;
  782.   dbg_c_NumToAddr               = 13;
  783.   dbg_c_ReadCoRegs              = 14;
  784.   dbg_c_WriteCoRegs             = 15;
  785.   dbg_c_ThrdStat                = 17;
  786.   dbg_c_MapROAlias              = 18;
  787.   dbg_c_MapRWAlias              = 19;
  788.   dbg_c_UnMapAlias              = 20;
  789.   dbg_c_Connect                 = 21;
  790.   dbg_c_ReadMemBuf              = 22;
  791.   dbg_c_WriteMemBuf             = 23;
  792.   dbg_c_SetWatch                = 24;
  793.   dbg_c_ClearWatch              = 25;
  794.   dbg_c_RangeStep               = 26;
  795.   dbg_c_Continue                = 27;
  796.   dbg_c_AddrToObject            = 28;
  797.   dbg_c_XchngOpcode             = 29;
  798.   dbg_c_LinToSel                = 30;
  799.   dbg_c_SelToLin                = 31;
  800.  
  801. { DosDebug Notifications }
  802.   dbg_n_Success                 =  0;
  803.   dbg_n_Error                   = -1;
  804.   dbg_n_ProcTerm                = -6;
  805.   dbg_n_Exception               = -7;
  806.   dbg_n_ModuleLoad              = -8;
  807.   dbg_n_CoError                 = -9;
  808.   dbg_n_ThreadTerm              = -10;
  809.   dbg_n_AsyncStop               = -11;
  810.   dbg_n_NewProc                 = -12;
  811.   dbg_n_AliasFree               = -13;
  812.   dbg_n_Watchpoint              = -14;
  813.   dbg_n_ThreadCreate            = -15;
  814.   dbg_n_ModuleFree              = -16;
  815.   dbg_n_RangeStep               = -17;
  816. { Object flags }
  817.   dbg_o_ObjMte                  = $10000000;
  818. { Watchpoint Scopes }
  819.   dbg_w_Global                  = $00000001;
  820.   dbg_w_Local                   = $00000002;
  821. { Watchpoint types }
  822.   dbg_w_Execute                 = $00010000;
  823.   dbg_w_Write                   = $00020000;
  824.   dbg_w_ReadWrite               = $00030000;
  825. { Thread debugging state }
  826.   dbg_d_Thawed                  = 0;
  827.   dbg_d_Frozen                  = 1;
  828. { Thread scheduling state }
  829.   dbg_t_Runnable                = 0;
  830.   dbg_t_Suspended               = 1;
  831.   dbg_t_Blocked                 = 2;
  832.   dbg_t_CritSec                 = 3;
  833. { DosDebug debugging level }
  834.   dbg_l_386                     = 1;
  835. { Coprocessor type identifier }
  836.   dbg_co_387                    = 1;
  837. { The length of the coprocessor buffer }
  838.   dbg_len_387                   = 108;
  839.   dbg_x_Pre_First_Chance        = $00000000;
  840.   dbg_x_First_Chance            = $00000001;
  841.   dbg_x_Last_Chance             = $00000002;
  842.   dbg_x_Stack_Invalid           = $00000003;
  843.  
  844. type
  845.   PTStat = ^TStat;
  846.   TStat = record
  847.     DbgState:  Byte;            { Thread's Debugging State    }
  848.     TState:    Byte;            { Thread's Scheduler State    }
  849.     TPriority: SmallWord;       { Thread's Scheduler Priority }
  850.   end;
  851.  
  852. function DosDebug(var DbgBuf: Debug_Buffer): ApiRet;
  853.  
  854. { codeTerminate values (also passed to ExitList routines) }
  855. const
  856.   tc_Exit                       = 0;
  857.   tc_HardError                  = 1;
  858.   tc_Trap                       = 2;
  859.   tc_KillProcess                = 3;
  860.   tc_Exception                  = 4;
  861.  
  862. type
  863.   FnExitList = procedure(Parm: ULong);
  864.  
  865. function DosEnterCritSec: ApiRet;
  866. function DosExitCritSec:  ApiRet;
  867. function DosExitList(OrderCode: ULong; ExitFn: FnExitList): ApiRet;
  868.  
  869. { DosExitList functions }
  870. const
  871.   exlst_Add                     = 1;
  872.   exlst_Remove                  = 2;
  873.   exlst_Exit                    = 3;
  874.  
  875. function DosExecPgm(ObjName: PChar; cbObjName: Long; ExecFlag: ULong;
  876.   Arg,Env: PChar; var Result: ResultCodes; Name: PChar): ApiRet;
  877.  
  878. { DosExecPgm functions }
  879. const
  880.   exec_Sync                     = 0;
  881.   exec_Async                    = 1;
  882.   exec_AsyncResult              = 2;
  883.   exec_Trace                    = 3;
  884.   exec_BackGround               = 4;
  885.   exec_Load                     = 5;
  886.   exec_AsyncResultDb            = 6;
  887.  
  888. function DosSetPriority(Scope,PrtyClass: ULong; Delta: Long; PorTid: ULong): ApiRet;
  889.  
  890. { Priority scopes }
  891. const
  892.   prtys_Process                 = 0;
  893.   prtys_ProcessTree             = 1;
  894.   prtys_Thread                  = 2;
  895.  
  896. { Priority classes }
  897.   prtyc_NoChange                = 0;
  898.   prtyc_IdleTime                = 1;
  899.   prtyc_Regular                 = 2;
  900.   prtyc_TimeCritical            = 3;
  901.   prtyc_ForegroundServer        = 4;
  902.  
  903. { Priority deltas }
  904.   prtyd_Minimum                 = -31;
  905.   prtyd_Maximum                 = +31;
  906.  
  907. function DosKillProcess(Action: ULong; Pid: Pid): ApiRet;
  908.  
  909. const
  910.   dkp_ProcessTree               = 0;
  911.   dkp_Process                   = 1;
  912.  
  913. {*** File manager ***}
  914.  
  915. { DosSetFilePtr file position codes }
  916.   file_Begin                    = $0000; { Move relative to beginning of = file }
  917.   file_Current                  = $0001; { Move relative to current fptr = position }
  918.   file_End                      = $0002; { Move relative to end of = file }
  919.  
  920. { DosFindFirst/Next Directory handle types }
  921.   hdir_System                   =  1;    { Use system handle (= 1)         }
  922.   hdir_Create                   = -1;    { Allocate a new, unused = handle }
  923.  
  924. { DosCopy control bits; may be or'ed together }
  925.   dcpy_Existing                 = $0001; { Copy even if target = exists }
  926.   dcpy_Append                   = $0002; { Append to existing file, do not = replace }
  927.   dcpy_FailEas                  = $0004; { Fail if EAs not supported on = target }
  928.  
  929. { DosOpen/DosQFHandState/DosQueryFileInfo et al file attributes; also }
  930. { known as Dos File Mode bits... }
  931.   file_Normal                   = $0000;
  932.   file_ReadOnly                 = $0001;
  933.   file_Hidden                   = $0002;
  934.   file_System                   = $0004;
  935.   file_Directory                = $0010;
  936.   file_Archived                 = $0020;
  937.   file_Ignore                   = $10000;       { ignore file attribute = in }
  938.                                                 { DosSetPath/File Info if    }
  939.                                                 { this bit is set            }
  940.  
  941.   must_have_ReadOnly    = (file_ReadOnly  shl 8) or file_ReadOnly;
  942.   must_have_Hidden      = (file_Hidden    shl 8) or file_Hidden;
  943.   must_have_System      = (file_System    shl 8) or file_System;
  944.   must_have_Directory   = (file_Directory shl 8) or file_Directory;
  945.   must_have_Archived    = (file_Archived  shl 8) or file_Archived;
  946.  
  947. { DosOpen actions }
  948.   file_Existed                  = $0001;
  949.   file_Created                  = $0002;
  950.   file_Truncated                = $0003;
  951.  
  952. { DosOpen open flags }
  953.   file_Open                     = $0001;
  954.   file_Truncate                 = $0002;
  955.   file_Create                   = $0010;
  956.  
  957. { This nibble applies if file already exists              xxxx }
  958.   open_action_Fail_If_Exists    = $0000; { ---- ---- ---- 0000 }
  959.   open_action_Open_If_Exists    = $0001; { ---- ---- ---- 0001 }
  960.   open_action_Replace_If_Exists = $0002; { ---- ---- ---- 0010 }
  961.  
  962. { This nibble applies if file does not exist         xxxx      }
  963.   open_action_Fail_If_New       = $0000; { ---- ---- 0000 ---- }
  964.   open_action_Create_If_New     = $0010; { ---- ---- 0001 ---- }
  965.  
  966. { DosOpen/DosSetFHandState flags }
  967.   open_access_ReadOnly          = $0000; { ---- ---- ---- -000 }
  968.   open_access_WriteOnly         = $0001; { ---- ---- ---- -001 }
  969.   open_access_ReadWrite         = $0002; { ---- ---- ---- -010 }
  970.   open_share_DenyReadWrite      = $0010; { ---- ---- -001 ---- }
  971.   open_share_DenyWrite          = $0020; { ---- ---- -010 ---- }
  972.   open_share_DenyRead           = $0030; { ---- ---- -011 ---- }
  973.   open_share_DenyNone           = $0040; { ---- ---- -100 ---- }
  974.   open_flags_NoInherit          = $0080; { ---- ---- 1--- ---- }
  975.   open_flags_No_Locality        = $0000; { ---- -000 ---- ---- }
  976.   open_flags_Sequential         = $0100; { ---- -001 ---- ---- }
  977.   open_flags_Random             = $0200; { ---- -010 ---- ---- }
  978.   open_flags_RandomSequential   = $0300; { ---- -011 ---- ---- }
  979.   open_flags_No_Cache           = $1000; { ---1 ---- ---- ---- }
  980.   open_flags_Fail_On_Error      = $2000; { --1- ---- ---- ---- }
  981.   open_flags_Write_Through      = $4000; { -1-- ---- ---- ---- }
  982.   open_flags_Dasd               = $8000; { 1--- ---- ---- ---- }
  983.   open_flags_NonSpooled         = $00040000;
  984.  
  985.   search_Path                   = $0000;
  986.   search_Cur_Directory          = $0001;
  987.   search_Environment            = $0002;
  988.   search_IgnoreNetErrs          = $0004;
  989.  
  990. {
  991.   EA Info Levels & Find First/Next
  992.   API's: DosFindFirst, DosQueryFileInfo, DosQueryPathInfo, DosSetFileInfo,
  993.           DosSetPathInfo
  994. }
  995.  
  996. { File info levels&gml All listed API's }
  997.   fil_Standard                  = 1;    { Info level 1, standard file info }
  998.   fil_QueryEaSize               = 2;    { Level 2, return Full EA size     }
  999.   fil_QueryEasFromList          = 3;    { Level 3, return requested EA's   }
  1000.  
  1001. { File info levels: Dos...PathInfo only }
  1002.   fil_QueryFullName             = 5;    { Level 5, return fully qualified name of file }
  1003. { DosFsAttach: Attact or detach }
  1004.   fs_Attach                     = 0;    { Attach file server }
  1005.   fs_Detach                     = 1;    { Detach file server }
  1006.   fs_SpoolAttach                = 2;    { Register a spooler device }
  1007.   fs_SpoolDetach                = 3;    { De-register a spooler device }
  1008.  
  1009. { DosFsCtl: Routing type }
  1010.   fsctl_Handle                  = 1;    { File Handle directs req routing }
  1011.   fsctl_PathName                = 2;    { Path Name directs req routing }
  1012.   fsctl_FsdName                 = 3;    { FSD Name directs req routing }
  1013.  
  1014. { defined FSCTL functions }
  1015.   fsctl_Error_Info              = 1;    { return error info from FSD }
  1016.   fsctl_Max_EaSize              = 2;    { Max ea size for the FSD }
  1017.  
  1018. type
  1019.   PEaSizeBuf = ^EaSizeBuf;
  1020.   EaSizeBuf = record                    { Record for FSCTL fn 2 - max ea size }
  1021.     cbMaxEASize:     SmallWord;         { max. size of one EA }
  1022.     cbMaxEAListSize: ULong;             { max size of the full EA List }
  1023.   end;
  1024.  
  1025. { DosQueryFSAttach: Information level types (defines method of query) }
  1026. const
  1027.   fsail_QueryName               = 1;    { Return data for a Drive or Device }
  1028.   fsail_DevNumber               = 2;    { Return data for Ordinal Device # }
  1029.   fsail_DrvNumber               = 3;    { Return data for Ordinal Drive # }
  1030.  
  1031. { Item types (from data structure item "iType") }
  1032.   fsat_CharDev                  = 1;    { Resident character device }
  1033.   fsat_PseudoDev                = 2;    { Pusedu-character device }
  1034.   fsat_LocalDrv                 = 3;    { Local drive }
  1035.   fsat_RemoteDrv                = 4;    { Remote drive attached to FSD }
  1036.  
  1037. type
  1038.   PFsqBuffer = ^FsqBuffer;
  1039.   FsqBuffer = record                    { fsqbuf Data structure for QFSAttach}
  1040.     iType:        SmallWord;            { Item type }
  1041.     cbName:       SmallWord;            { Length of item name, sans NULL }
  1042.     szName:    array [0..0] of Char;    { ASCIIZ item name }
  1043.     cbFSDName:    SmallWord;            { Length of FSD name, sans NULL }
  1044.     szFSDName: array [0..0] of Char;    { ASCIIZ FSD name }
  1045.     cbFSAData:    SmallWord;            { Length of FSD Attach data returned }
  1046.     rgFSAData: array [0..0] of Byte;    { FSD Attach data from FSD }
  1047.   end;
  1048.  
  1049.   PFsqBuffer2 = ^FsqBuffer2;            { fsqbuf Data structure for QFSAttach}
  1050.   FsqBuffer2 = record
  1051.     iType:        SmallWord;
  1052.     cbName:       SmallWord;
  1053.     cbFSDName:    SmallWord;
  1054.     cbFSAData:    SmallWord;
  1055.     szName:    array [0..0] of Char;
  1056.     szFSDName: array [0..0] of Char;
  1057.     rgFSAData: array [0..0] of Byte;
  1058.   end;
  1059.  
  1060.   PSpoolAttach = ^SpoolAttach;  { Data structure for spooler operations }
  1061.   SpoolAttach = record
  1062.     hNmPipe: SmallWord;         { Named pipe handle }
  1063.     ulKey:   ULong;             { Attached key }
  1064.   end;
  1065.  
  1066. { File System Drive Information&gml DosQueryFSInfo DosSetFSInfo }
  1067. { FS Drive Info Levels }
  1068. const
  1069.   fsil_Alloc                    = 1;    { Drive allocation info (Query only) }
  1070.   fsil_VolSer                   = 2;    { Drive Volum/Serial info }
  1071.  
  1072. { DosQueryFHType: Handle classes (low 8 bits of Handle Type) }
  1073.   fht_DiskFile                  = $0000;  { Disk file handle }
  1074.   fht_ChrDev                    = $0001;  { Character device handle }
  1075.   fht_Pipe                      = $0002;  { Pipe handle }
  1076.  
  1077. { Handle bits (high 8 bits of Handle Type)}
  1078.   fhb_DskRemote                 = $8000;  { Remote disk }
  1079.   fhb_ChrDevRemote              = $8000;  { Remote character device }
  1080.   fhb_PipeRemote                = $8000;  { Remote pipe }
  1081.  
  1082. { File time and date types }
  1083. (*
  1084.       typedef struct _FTIME
  1085.               {
  1086.               UINT   twosecs : 5;
  1087.               UINT   minutes : 6;
  1088.               UINT   hours   : 5;
  1089.               } FTIME;
  1090. *)
  1091.  
  1092. type
  1093.   PFTime = ^FTime;
  1094.   FTime = SmallWord;
  1095.  
  1096. const
  1097.   mftTwoSecs                    = $001F;
  1098.   sftTwoSecs                    = 0;
  1099.   mftMinutes                    = $07E0;
  1100.   sftMinutes                    = 5;
  1101.   mftHours                      = $F800;
  1102.   sftHours                      = 11;
  1103.  
  1104. (*    typedef struct _FDATE
  1105.               {
  1106.               UINT   day     : 5;
  1107.               UINT   month   : 4;
  1108.               UINT   year    : 7;
  1109.               } FDATE;
  1110. *)
  1111.  
  1112. type
  1113.   PFDate = ^FDate;
  1114.   FDate = SmallWord;
  1115.  
  1116. const
  1117.   mfdDay                        = $001F;
  1118.   sfdDay                        = 0;
  1119.   mfdMonth                      = $01E0;
  1120.   sfdMonth                      = 5;
  1121.   mfdYear                       = $FE00;
  1122.   sfdYear                       = 9;
  1123.  
  1124. type
  1125.   PVolumeLabel = ^VolumeLabel;
  1126.   VolumeLabel = String[12];
  1127.  
  1128.   PFsInfo = ^FsInfo;
  1129.   FsInfo = record
  1130.     fdateCreation:  FDate;
  1131.     ftimeCreation:  FTime;
  1132.     vol:            VolumeLabel;
  1133.   end;
  1134.  
  1135. { HandType values }
  1136. const
  1137.   handtype_File                 = $0000;
  1138.   handtype_Device               = $0001;
  1139.   handtype_Pipe                 = $0002;
  1140.   handtype_Network              = $8000;
  1141.  
  1142. type
  1143.   PFileLock = ^FileLock;
  1144.   FileLock = record
  1145.     lOffset: Long;
  1146.     lRange:  Long;
  1147.   end;
  1148.  
  1149.   PHFile = ^HFile;
  1150.   HFile  = LHandle;
  1151.   PHEv   = ^HEv;
  1152.   HEv    = ULong;
  1153.  
  1154. function DosSetFileLocks(F: HFile; var UnLock,Lock: FileLock; Timeout,Flags: ULong): ApiRet;
  1155. function DosCancelLockRequest(F: HFile; var Lock: FileLock): ApiRet;
  1156.  
  1157. type
  1158.   PFileFindBuf = ^FileFindBuf;
  1159.   FileFindBuf = record
  1160.     fdateCreation:   FDate;
  1161.     ftimeCreation:   FTime;
  1162.     fdateLastAccess: FDate;
  1163.     ftimeLastAccess: FTime;
  1164.     fdateLastWrite:  FDate;
  1165.     ftimeLastWrite:  FTime;
  1166.     cbFile:          ULong;
  1167.     cbFileAlloc:     ULong;
  1168.     attrFile:        SmallWord;
  1169.     achName:         String[cchMaxPathComp-1];
  1170.   end;
  1171.  
  1172.   PFileFindBuf2 = ^FileFindBuf2;
  1173.   FileFindBuf2 = record
  1174.     fdateCreation:   FDate;
  1175.     ftimeCreation:   FTime;
  1176.     fdateLastAccess: FDate;
  1177.     ftimeLastAccess: FTime;
  1178.     fdateLastWrite:  FDate;
  1179.     ftimeLastWrite:  FTime;
  1180.     cbFile:          ULong;
  1181.     cbFileAlloc:     ULong;
  1182.     attrFile:        SmallWord;
  1183.     cbList:          ULong;
  1184.     achName:         String[cchMaxPathComp-1];
  1185.   end;
  1186.  
  1187.   PFileFindBuf3 = ^FileFindBuf3;
  1188.   FileFindBuf3 = record
  1189.     oNextEntryOffset: ULong;    { new field }
  1190.     fdateCreation:    FDate;
  1191.     ftimeCreation:    FTime;
  1192.     fdateLastAccess:  FDate;
  1193.     ftimeLastAccess:  FTime;
  1194.     fdateLastWrite:   FDate;
  1195.     ftimeLastWrite:   FTime;
  1196.     cbFile:           ULong;
  1197.     cbFileAlloc:      ULong;
  1198.     attrFile:         ULong;    { widened field }
  1199.     achName:          String[cchMaxPathComp-1];
  1200.   end;
  1201.  
  1202.   PFileFindBuf4 = ^FileFindBuf4;
  1203.   FileFindBuf4 = record
  1204.     oNextEntryOffset: ULong;    { new field }
  1205.     fdateCreation:    FDate;
  1206.     ftimeCreation:    FTime;
  1207.     fdateLastAccess:  FDate;
  1208.     ftimeLastAccess:  FTime;
  1209.     fdateLastWrite:   FDate;
  1210.     ftimeLastWrite:   FTime;
  1211.     cbFile:           ULong;
  1212.     cbFileAlloc:      ULong;
  1213.     attrFile:         ULong;    { widened field }
  1214.     cbList:           ULong;
  1215.     achName:          String[cchMaxPathComp-1];
  1216.   end;
  1217.  
  1218. { extended attribute structures }
  1219.   PGea  = ^Gea;
  1220.   Gea = record
  1221.     cbName: Byte;                 { name length not including NULL }
  1222.     szName: array [0..0] of Char; { attribute name }
  1223.   end;
  1224.  
  1225.   PGeaList = ^GeaList;
  1226.   GeaList = record
  1227.     cbList: ULong;              { total bytes of structure including full list }
  1228.     list: array[0..0] of Gea;   { variable length GEA structures }
  1229.   end;
  1230.  
  1231.   PFea = ^Fea;
  1232.   Fea = record
  1233.     fEA:     Byte;               { flags }
  1234.     cbName:  Byte;               { name length not including NULL }
  1235.     cbValue: SmallWord;          { value length }
  1236.   end;
  1237.  
  1238. { flags for _FEA.fEA }
  1239. const
  1240.   fea_NeedEA                    = $80;  { need EA bit }
  1241.  
  1242. type
  1243.   PFeaList = ^FeaList;
  1244.   FeaList = record
  1245.     cbList:  ULong;             { total bytes of structure including full list }
  1246.     list: array [0..0] of Fea;  { variable length FEA structures }
  1247.   end;
  1248.  
  1249.   PEaop = ^Eaop;
  1250.   Eaop = record
  1251.     fpGEAList: PGeaList;        { general EA list }
  1252.     fpFEAList: PFeaList;        { full EA list }
  1253.     oError:    ULong;
  1254.   end;
  1255.  
  1256.   PFea2 = ^Fea2;
  1257.   Fea2 = record
  1258.     oNextEntryOffset: ULong;    { new field }
  1259.     fEA:              Byte;
  1260.     cbName:           Byte;
  1261.     cbValue:          SmallWord;
  1262.     szName:           Char;     { new field }
  1263.   end;
  1264.  
  1265.   PFea2List = ^Fea2List;
  1266.   Fea2List = record
  1267.     cbList:           ULong;
  1268.     list: array [0..0] of Fea2;
  1269.   end;
  1270.  
  1271.   PGea2 = ^Gea2;
  1272.   Gea2 = record
  1273.     oNextEntryOffset: ULong;      { new field }
  1274.     cbName:           Byte;
  1275.     szName: array [0..0] of Char;
  1276.   end;
  1277.  
  1278.   PGea2List = ^Gea2List;
  1279.   Gea2List = record
  1280.     cbList: ULong;
  1281.     list: array[0..0] of Gea2;
  1282.   end;
  1283.  
  1284.   PEaop2 = ^Eaop2;
  1285.   Eaop2 = record
  1286.     fpGEA2List: PGea2List;      { GEA set }
  1287.     fpFEA2List: PFea2List;      { FEA set }
  1288.     oError:    ULong;           { offset of FEA error }
  1289.   end;
  1290.  
  1291. { Constants for the types of EAs that follow the convention that we have established
  1292.   Values $FFFE thru $8000 are reserved.
  1293.   Values $0000 thru $7FFF are user definable.
  1294.   Value  $FFFC is not used
  1295. }
  1296. const
  1297.   eat_Binary                    = $FFFE;     { length preceeded binary }
  1298.   eat_Ascii                     = $FFFD;     { length preceeded ASCII }
  1299.   eat_BitMap                    = $FFFB;     { length preceeded bitmap }
  1300.   eat_MetaFile                  = $FFFA;     { length preceeded metafile }
  1301.   eat_Icon                      = $FFF9;     { length preceeded icon }
  1302.   eat_Ea                        = $FFEE;     { length preceeded ASCII }
  1303.                                              { name of associated data }
  1304.   eat_Mvmt                      = $FFDF;     { multi-valued, multi-typed field }
  1305.   eat_Mvst                      = $FFDE;     { multi-valued, single-typed field }
  1306.   eat_Asn1                      = $FFDD;     { ASN.1 field }
  1307.  
  1308. function DosOpen(FileName: PChar; var F: HFile; var Action: ULong;
  1309.   cbFile,Attribute,OpenFlags,OpenMode: ULong; EAs: PEaop2): ApiRet;
  1310. function DosClose(F: HFile): ApiRet;
  1311. function DosRead(F: HFile; var Buffer; cbRead: ULong; var Actual: ULong): ApiRet;
  1312. function DosWrite(F: HFile; const Buffer; cbWrite: ULong; var Actual: ULong): ApiRet;
  1313.  
  1314. function DosProtectClose(F: hFile; fhFileHandleLockID: FHLock): ApiRet;
  1315. function DosProtectEnumAttribute(ulRefType: ULong; pvFile: Pointer;
  1316.   ulEntry: ULong; Var pvBuf; cbBuf: ULong; Var Count: ULong;
  1317.   InfoLevel: ULong; fhFileHandleLockID: FHLock ): ApiRet;
  1318. function DosProtectOpen(FileName: PChar; var F: HFile; var Action: ULong;
  1319.   cbFile,Attribute,OpenFlags,OpenMode: ULong; EAs: PEaop2;
  1320.   Var fhFileHandleLockID: FHLock): ApiRet;
  1321. function DosProtectQueryFHState(hFile: HFile;Var Mode: ULong;
  1322.   fhFileHandleLockID: FHLock): ApiRet;
  1323. function DosProtectQueryFileInfo(F: HFile; InfoLevel: ULong; pInfo: Pointer;
  1324.   cbInfoBuf: ULong; fhFileHandleLockID: FHLock): ApiRet;
  1325. function DosProtectRead(F: HFile; var Buffer; cbRead: ULong;
  1326.   var Actual: ULong; fhFileHandleLockID: FHLock): ApiRet;
  1327. function DosProtectSetFHState(F: hFile; Mode: ULong;fhFileHandleLockID: FHLock): ApiRet;
  1328. function DosProtectSetFileInfo(F: hFile; InfoLevel: ULong; Var Buffer;
  1329.   cbInfoBuf: ULong; fhFileHandleLockID: FHLock): ApiRet;
  1330. function DosProtectSetFileLocks(F: HFile; var UnLock,Lock: FileLock;
  1331.   Timeout,Flags: ULong; fhFileHandleLockID: FHLock): ApiRet;
  1332. function DosProtectSetFilePtr(F: HFile; Distance: Long; Method: ULong;
  1333.   var Actual: ULong; fhFileHandleLockID: FHLock): ApiRet;
  1334. function DosProtectSetFileSize(F: HFile; Size: ULong; fhFileHandleLockID: FHLock): ApiRet;
  1335. function DosProtectWrite(F: HFile; const Buffer; cbWrite: ULong;
  1336.   var Actual: ULong; fhFileHandleLockID: FHLock): ApiRet;
  1337.  
  1338. { File time and date types }
  1339. type
  1340.   PFileStatus = ^FileStatus;
  1341.   FileStatus = record
  1342.     fdateCreation:   FDate;
  1343.     ftimeCreation:   FTime;
  1344.     fdateLastAccess: FDate;
  1345.     ftimeLastAccess: FTime;
  1346.     fdateLastWrite:  FDate;
  1347.     ftimeLastWrite:  FTime;
  1348.     cbFile:          ULong;
  1349.     cbFileAlloc:     ULong;
  1350.     attrFile:        SmallWord;
  1351.   end;
  1352.  
  1353.   PFileStatus2 = ^FileStatus2;
  1354.   FileStatus2 = record
  1355.     fdateCreation:   FDate;
  1356.     ftimeCreation:   FTime;
  1357.     fdateLastAccess: FDate;
  1358.     ftimeLastAccess: FTime;
  1359.     fdateLastWrite:  FDate;
  1360.     ftimeLastWrite:  FTime;
  1361.     cbFile:          ULong;
  1362.     cbFileAlloc:     ULong;
  1363.     attrFile:        SmallWord;
  1364.     cbList:          ULong;
  1365.   end;
  1366.  
  1367.   PFileStatus3 = ^FileStatus3;
  1368.   FileStatus3 = record
  1369.     fdateCreation:   FDate;
  1370.     ftimeCreation:   FTime;
  1371.     fdateLastAccess: FDate;
  1372.     ftimeLastAccess: FTime;
  1373.     fdateLastWrite:  FDate;
  1374.     ftimeLastWrite:  FTime;
  1375.     cbFile:          ULong;
  1376.     cbFileAlloc:     ULong;
  1377.     attrFile:        ULong;
  1378.   end;
  1379.  
  1380.   PFileStatus4 = ^FileStatus4;
  1381.   FileStatus4 = record
  1382.     fdateCreation:   FDate;
  1383.     ftimeCreation:   FTime;
  1384.     fdateLastAccess: FDate;
  1385.     ftimeLastAccess: FTime;
  1386.     fdateLastWrite:  FDate;
  1387.     ftimeLastWrite:  FTime;
  1388.     cbFile:          ULong;
  1389.     cbFileAlloc:     ULong;
  1390.     attrFile:        ULong;
  1391.     cbList:          ULong;
  1392.   end;
  1393.  
  1394.   PFsAllocate = ^FsAllocate;
  1395.   FsAllocate = record
  1396.     idFileSystem: ULong;
  1397.     cSectorUnit:  ULong;
  1398.     cUnit:        ULong;
  1399.     cUnitAvail:   ULong;
  1400.     cbSector:     SmallWord;
  1401.   end;
  1402.  
  1403.   PHDir = ^HDir;
  1404.   HDir = LHandle;
  1405.  
  1406. function DosDelete(FName: PChar): ApiRet;
  1407. function DosForceDelete(FName: PChar): ApiRet;
  1408. function DosDupHandle(OldHandle: HFile; var NewHandle: HFile): ApiRet;
  1409. function DosQueryFHState(F: HFile; var Mode: ULong): ApiRet;
  1410. function DosSetFHState(F: HFile; Mode: ULong): ApiRet;
  1411. function DosQueryHType(F: HFile; var pType,pAttr: ULong): ApiRet;
  1412. function DosFindFirst(FileSpec: PChar; var Dir: HDir; Attribute: ULong;
  1413.   var FindBuf; BufSize: ULong; var SearchCount: ULong; InfoLevel: ULong): ApiRet;
  1414. function DosFindNext(Dir: HDir; var FindBuf; BufSize: ULong; var SearchCount: ULong): ApiRet;
  1415. function DosFindClose(Dir: HDir): ApiRet;
  1416. function DosFSAttach(Device,FileSystem: PChar; pDate: Pointer; cbData,Flag: ULong): ApiRet;
  1417. function DosQueryFSAttach(DeviceName: PChar; Ordinal,FSAInfoLevel: ULong;
  1418.   pfsqb: pFsqBuffer2; var BufLen: ULong): ApiRet;
  1419. function DosFSCtl(pData: Pointer; cbData: ULong; var pcbData: PULong;
  1420.   pParms: Pointer; cbParams: ULong; var pcbParms: ULong; Func: ULong;
  1421.   Route: PChar; F: HFile; Method: ULong): ApiRet;
  1422. function DosSetFileSize(F: HFile; Size: ULong): ApiRet;
  1423. function DosResetBuffer(F: HFile): ApiRet;
  1424. function DosSetFilePtr(F: HFile; Distance: Long; Method: ULong; var Actual: ULong): ApiRet;
  1425. function DosMove(OldName,NewName: PChar): ApiRet;
  1426. function DosCopy(OldName,NewName: PChar; Option: ULong): ApiRet;
  1427. function DosEditName(MetaLevel: ULong; Source,Edit: PChar; Target: PChar; cbTarget: ULong): ApiRet;
  1428. function DosCreateDir(DirName: PChar; Eas: PEaop2): ApiRet;
  1429. function DosDeleteDir(Dir: PChar): ApiRet;
  1430. function DosSetDefaultDisk(DiskNum: ULong): ApiRet;
  1431. function DosQueryCurrentDisk(var DiskNum,Logical: ULong): ApiRet;
  1432. function DosSetCurrentDir(Dir: PChar): ApiRet;
  1433. function DosQueryCurrentDir(DiskNum: ULong; var Buf; var BufSize: ULong): ApiRet;
  1434. function DosQueryFSInfo(DiskNum,InfoLevel: ULong; var Buf; BufSize: ULong): ApiRet;
  1435. function DosSetFSInfo(DiskNum,InfoLevel: ULong; var Buf; BufSize: ULong): ApiRet;
  1436. function DosQueryVerify(var Flag: Bool): ApiRet;
  1437. function DosSetVerify(Flag: Bool): ApiRet;
  1438. function DosSetMaxFH(cFH: ULong): ApiRet;
  1439. function DosSetRelMaxFH(var cbReqCount,cbCurMaxFH: Long): ApiRet;
  1440. function DosQueryFileInfo(F: HFile; InfoLevel: ULong; var InfoBuf;
  1441.   cbInfoBuf: ULong): ApiRet;
  1442. function DosSetFileInfo(F: HFile; InfoLevel: ULong; var InfoBuf;
  1443.   cbInfoBuf: ULong): ApiRet;
  1444. function DosQueryPathInfo(PathName: PChar; InfoLevel: ULong; var InfoBuf;
  1445.   cbInfoBuf: ULong): ApiRet;
  1446. function DosSetPathInfo(PathName: PChar; InfoLevel: ULong; var InfoBuf;
  1447.   cbInfoBuf,Options: ULong): ApiRet;
  1448.  
  1449. { Constant for DosSetPathInfo: pathinfo flag }
  1450. const
  1451.   dspi_WrtThru                  = $10;  { write through }
  1452.  
  1453. function DosShutdown(Reserved: ULong): ApiRet;
  1454. function DosEnumAttribute(RefType: ULong; pvFile: Pointer; Entry: ULong;
  1455.   var pvBuf; cbBuf: ULong; var Count: ULong; InfoLevel: ULong): ApiRet;
  1456.  
  1457. type
  1458.   PDena1 = ^Dena1;
  1459.   Dena1 = record        { dena1 level 1 info returned from DosEnumAttribute }
  1460.     reserved:   Byte;              { 0 }
  1461.     cbName:     Byte;              { length of name exculding NULL }
  1462.     cbValue:    SmallWord;         { length of value }
  1463.     szName: array [0..0] of Char;  { variable length asciiz name }
  1464.   end;
  1465.  
  1466. { Infolevels for DosEnumAttribute  }
  1467. const
  1468.   enumea_Level_No_Value         = 1;     { FEA without value }
  1469. { Reference types for DosEnumAttribute }
  1470.   enumea_Reftype_FHandle        = 0;      { file handle }
  1471.   enumea_Reftype_Path           = 1;      { path name }
  1472.   enumea_Reftype_Max            = enumea_Reftype_Path;
  1473.  
  1474. { Memory management }
  1475.  
  1476. function DosAllocMem(var Base: Pointer; MemSize,Flags: ULong): ApiRet;
  1477. function DosFreeMem(Base: Pointer): ApiRet;
  1478. function DosSetMem(Base: Pointer; MemSize,Flags: ULong): ApiRet;
  1479. function DosGiveSharedMem(Base: Pointer; Pid: Pid; Flags: ULong): ApiRet;
  1480. function DosGetSharedMem(Base: Pointer; Flags: ULong): ApiRet;
  1481. function DosGetNamedSharedMem(var Base: Pointer; Name: PChar; Flags: ULong): ApiRet;
  1482. function DosAllocSharedMem(var Base: Pointer; Name: PChar; MemSize,Flags: ULong): ApiRet;
  1483. function DosQueryMem(Base: Pointer; var MemSize,Flags: ULong): ApiRet;
  1484. function DosSubAllocMem(Base: Pointer; var SubBase: Pointer; MemSize: ULong): ApiRet;
  1485. function DosSubFreeMem(Base,SubBase: Pointer; MemSize: ULong): ApiRet;
  1486. function DosSubSetMem(Base: Pointer; Flag,MemSize: ULong): ApiRet;
  1487. function DosSubUnsetMem(Base: Pointer): ApiRet;
  1488.  
  1489. {*** Memory flags ***}
  1490. { Access protection  }
  1491. const
  1492.   pag_Read                      = $00000001;    { read access              }
  1493.   pag_Write                     = $00000002;    { write access             }
  1494.   pag_Execute                   = $00000004;    { execute access           }
  1495.   pag_Guard                     = $00000008;    { guard protection         }
  1496.   pag_Default                   = $00000400;    { default (initial) access }
  1497.  { Commit }
  1498.   pag_Commit                    = $00000010;    { commit storage           }
  1499.   pag_Decommit                  = $00000020;    { decommit storage         }
  1500.  { Allocation attributes }
  1501.   obj_Tile                      = $00000040;    { tile object              }
  1502.   obj_Protected                 = $00000080;    { protect object;
  1503.                          NOTE: This flag is NOT available at the API level }
  1504.   obj_Gettable                  = $00000100;    { gettable by other processes}
  1505.   obj_Giveable                  = $00000200;    { giveable to other processes}
  1506.   fPerm                         = pag_Execute or pag_Read or pag_Write;
  1507.   fShare                        = obj_Gettable or obj_Giveable;
  1508.  { DosAllocMem flags }
  1509.   fAlloc                        = obj_Tile or pag_Commit or fPerm;
  1510.  { DosAllocSharedMem flags }
  1511.   fAllocShr                     = obj_Tile or pag_Commit or fShare or fPerm;
  1512.  { DosGetNamedSharedMem flags }
  1513.   fGetNmShr                     = fPerm;
  1514.  { DosGetSharedMem flags }
  1515.   fGetShr                       = fPerm;
  1516.  { DosGiveSharedMem flags }
  1517.   fGiveShr                      = fPerm;
  1518.  { DosSetMem flags }
  1519.   fSet                          = pag_Commit + pag_Decommit + pag_Default + fPerm;
  1520.  { DosSubSet flags }
  1521.   dossub_Init                   = $01;  { initialize memory object for suballocation }
  1522.   dossub_Grow                   = $02;  { increase size of memory pool for suballocation }
  1523.   dossub_Sparse_Obj             = $04;  { indicator for DosSub to manage the
  1524.                                           commitment of pages spanned by the memory pool }
  1525.   dossub_Serialize              = $08;  { indicates that access to the memory }
  1526.                                         { pool is to be serialized by DosSub  }
  1527.  { Allocation type (returned from DosQueryMem)                                }
  1528.   pag_Shared                    = $00002000;    { shared object        }
  1529.   pag_Free                      = $00004000;    { pages are free       }
  1530.   pag_Base                      = $00010000;    { first page in object }
  1531.  
  1532. {*** Semaphore Support ***}
  1533. { Semaphore Attributes }
  1534.  
  1535.   dc_Sem_Shared                 = $01;  { DosCreateMutex, DosCreateEvent, and     }
  1536.                                         {   DosCreateMuxWait use it to indicate   }
  1537.                                         {   whether the semaphore is shared or    }
  1538.                                         {   private when the PSZ is null          }
  1539.   dcmw_Wait_Any                 = $02;  { DosCreateMuxWait option for wait on any }
  1540.                                         {   event/mutex to occur                  }
  1541.   dcmw_Wait_All                 = $04;  { DosCreateMuxWait option for wait on all }
  1542.                                         {   events/mutexs to occur                }
  1543.  
  1544.   sem_Indefinite_Wait           = -1;
  1545.   sem_Immediate_Return          =  0;
  1546.  
  1547. type
  1548.   PHSem = ^HSem;
  1549.   HSem = Pointer;
  1550.  
  1551.   PSemRecord = ^SemRecord;
  1552.   SemRecord = record
  1553.     hsemCur: HSem;
  1554.     ulUser:  ULong;
  1555.   end;
  1556.  
  1557.   PHMtx = ^HMtx;
  1558.   HMtx  = ULong;
  1559.   PHMux = ^HMux;
  1560.   HMux  = ULong;
  1561.  
  1562. function DosCreateEventSem(Name: PChar; var EvSem: HEv; Attr: ULong; State: Bool): ApiRet;
  1563. function DosOpenEventSem(Name: PChar; var EvSem: HEv): ApiRet;
  1564. function DosCloseEventSem(EvSem: HEv): ApiRet;
  1565. function DosResetEventSem(EvSem: HEv; var PostCount: ULong): ApiRet;
  1566. function DosPostEventSem(EvSem: HEv): ApiRet;
  1567. function DosWaitEventSem(EvSem: HEv; Timeout: ULong): ApiRet;
  1568. function DosQueryEventSem(EvSem: HEv; var PosCount: ULong): ApiRet;
  1569. function DosCreateMutexSem(Name: PChar; var Mtx: HMtx; Attr: ULong; State: Bool): ApiRet;
  1570. function DosOpenMutexSem(Name: PChar; var Mtx: HMtx): ApiRet;
  1571. function DosCloseMutexSem(Mtx: HMtx): ApiRet;
  1572. function DosRequestMutexSem(Mxt: HMtx; Timeout: ULong): ApiRet;
  1573. function DosReleaseMutexSem(Mtx: HMtx): ApiRet;
  1574. function DosQueryMutexSem(Mtx: HMtx; var Pid: Pid; var Tid: Tid; var Count: ULong): ApiRet;
  1575. function DosCreateMuxWaitSem(Name: PChar; var Mux: HMux; cSemRec: ULong; var SemRec: SemRecord; Attr: ULong): ApiRet;
  1576. function DosOpenMuxWaitSem(Name: PChar; var Mux: HMux): ApiRet;
  1577. function DosCloseMuxWaitSem(Mux: HMux): ApiRet;
  1578. function DosWaitMuxWaitSem(Mux: HMux; Timeout: ULong; var User: ULong): ApiRet;
  1579. function DosAddMuxWaitSem(Mux: HMux; var SemRec: SemRecord): ApiRet;
  1580. function DosDeleteMuxWaitSem(Mux: HMux; Sem: HSem): ApiRet;
  1581. function DosQueryMuxWaitSem(Mux: HMux; var cSemRec: ULong; SemRec: SemRecord; var Attr: ULong): ApiRet;
  1582.  
  1583. { Time support }
  1584. type
  1585.   PDateTime = ^DateTime;
  1586.   DateTime = record
  1587.     hours:      Byte;
  1588.     minutes:    Byte;
  1589.     seconds:    Byte;
  1590.     hundredths: Byte;
  1591.     day:        Byte;
  1592.     month:      Byte;
  1593.     year:       SmallWord;
  1594.     timezone:   SmallInt;
  1595.     weekday:    Byte;
  1596.   end;
  1597.  
  1598. function DosGetDateTime(var DT: DateTime): ApiRet;
  1599. function DosSetDateTime(var DT: DateTime): ApiRet;
  1600.  
  1601. type
  1602.   PHTimer = ^HTimer;
  1603.   HTimer = LHandle;
  1604.  
  1605. function DosAsyncTimer(MSec: ULong; Sem: HSem; var Timer: HTimer): ApiRet;
  1606. function DosStartTimer(MSec: ULong; Sem: HSem; var Timer: HTimer): ApiRet;
  1607. function DosStopTimer(Timer: HTimer): ApiRet;
  1608.  
  1609. { Module manager }
  1610.  
  1611. function DosLoadModule(Name: PChar; cbName: ULong; ModName: PChar; var Module: HModule): ApiRet;
  1612. function DosFreeModule(Module: HModule): ApiRet;
  1613. function DosQueryProcAddr(Module: HModule; Ordinal: ULong; Name: PChar; var EntryAddr: Pointer): ApiRet;
  1614. function DosQueryModuleHandle(ModName: PChar; var Module: HModule): ApiRet;
  1615. function DosQueryModuleName(Module: HModule; cbName: ULong; Name: PChar): ApiRet;
  1616.  
  1617. const
  1618.   pt_16Bit                      = 0;
  1619.   pt_32Bit                      = 1;
  1620.  
  1621. function DosQueryProcType(Module: HModule; Ordinal: ULong; Name: PChar; var ProcType: ULong): ApiRet;
  1622.  
  1623. { Resource support }
  1624. { Predefined resource types }
  1625. const
  1626.   rt_Pointer                    = 1;  { mouse pointer shape }
  1627.   rt_Bitmap                     = 2;  { bitmap }
  1628.   rt_Menu                       = 3;  { menu template }
  1629.   rt_Dialog                     = 4;  { dialog template }
  1630.   rt_String                     = 5;  { string tables }
  1631.   rt_FontDir                    = 6;  { font directory }
  1632.   rt_Font                       = 7;  { font }
  1633.   rt_AccelTable                 = 8;  { accelerator tables }
  1634.   rt_RcData                     = 9;  { binary data }
  1635.   rt_Message                    = 10; { error msg tables }
  1636.   rt_DlgInclude                 = 11; { dialog include file name }
  1637.   rt_VKeyTbl                    = 12; { key to vkey tables }
  1638.   rt_KeyTbl                     = 13; { key to UGL tables }
  1639.   rt_CharTbl                    = 14; { glyph to character tables }
  1640.   rt_DisplayInfo                = 15; { screen display information }
  1641.   rt_FkaShort                   = 16; { function key area short form }
  1642.   rt_FkaLong                    = 17; { function key area Long form }
  1643.   rt_HelpTable                  = 18; { Help table for Cary Help manager }
  1644.   rt_HelpSubTable               = 19; { Help subtable for Cary Help manager }
  1645.   rt_FdDir                      = 20; { DBCS uniq/font driver directory }
  1646.   rt_Fd                         = 21; { DBCS uniq/font driver }
  1647.   rt_Max                        = 22; { 1st unused Resource Type }
  1648.   rf_OrdinalId                  = $80000000; { ordinal id flag in resource table }
  1649.  
  1650. function DosGetResource(Module: HModule; IdType,IdName: ULong; var ppb: Pointer): ApiRet;
  1651. function DosFreeResource(pb: Pointer): ApiRet;
  1652. function DosQueryResourceSize(Module: HModule; IdType,IdName: ULong; var Size: ULong): ApiRet;
  1653.  
  1654. { NLS Support }
  1655. type
  1656.   PCountryCode = ^CountryCode;
  1657.   CountryCode = record
  1658.     country:  ULong;
  1659.     codepage: ULong;
  1660.   end;
  1661.  
  1662.   PCountryInfo = ^CountryInfo;
  1663.   CountryInfo = record
  1664.     country:              ULong;
  1665.     codepage:             ULong;
  1666.     fsDateFmt:            ULong;
  1667.     szCurrency:           array [0..4] of Char;
  1668.     szThousandsSeparator: array [0..1] of Char;
  1669.     szDecimal:            array [0..1] of Char;
  1670.     szDateSeparator:      array [0..1] of Char;
  1671.     szTimeSeparator:      array [0..1] of Char;
  1672.     fsCurrencyFmt:        Byte;
  1673.     cDecimalPlace:        Byte;
  1674.     fsTimeFmt:            Byte;
  1675.     abReserved1:          array [0..1] of SmallWord;
  1676.     szDataSeparator:      array [0..1] of Char;
  1677.     abReserved2:          array [0..4] of SmallWord;
  1678.   end;
  1679.  
  1680. function DosQueryCtryInfo(cb: ULong; var ccode: CountryCode; var pci: CountryInfo; var Actual: ULong): ApiRet;
  1681. function DosQueryDBCSEnv(cb: ULong; var ccode: CountryCode; Buf: PChar): ApiRet;
  1682. function DosMapCase(cb: ULong; var ccode: CountryCode; pch: PChar): ApiRet;
  1683. function DosQueryCollate(cb: ULong; var ccode: CountryCode; pch: PChar; var DataLen: ULong): ApiRet;
  1684. function DosQueryCp(cb: ULong; var arCP,pcCP: ULong): ApiRet;
  1685. function DosSetProcessCp(cp: ULong): ApiRet;
  1686.  
  1687. { Signal support }
  1688. { DosSetSignalExceptionFocus codes }
  1689. const
  1690.   sig_UnSetFocus                = 0;
  1691.   sig_SetFocus                  = 1;
  1692.  
  1693. {*** Exception Management ***}
  1694. { User Exception Handler Return Codes: }
  1695.   xcpt_Continue_Search          = $00000000;     { exception not handled   }
  1696.   xcpt_Continue_Execution       = $FFFFFFFF;     { exception handled       }
  1697.   xcpt_Continue_Stop            = $00716668;     { exception handled by    }
  1698.                                                  { debugger (VIA DosDebug) }
  1699. { fHandlerFlags values (see ExceptionReportRecord):
  1700.   The user may only set (but not clear) the eh_NonContinuable flag.
  1701.   All other flags are set by the system.
  1702. }
  1703.  
  1704.   eh_NonContinuable             = $01;          { Noncontinuable exception }
  1705.   eh_Unwinding                  = $02;          { Unwind is in progress }
  1706.   eh_Exit_Unwind                = $04;          { Exit unwind is in progress }
  1707.   eh_Stack_Invalid              = $08;          { Stack out of limits or unaligned }
  1708.   eh_Nested_Call                = $10;          { Nested exception handler call }
  1709.  
  1710. { Unwind all exception handlers (see DosUnwindException API) }
  1711.   unwind_All                    = 0;
  1712. { Exception values are 32 bit values layed out as follows:
  1713.  
  1714.   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  1715.   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
  1716.   +---+-+-------------------------+-------------------------------+
  1717.   |Sev|C|       Facility          |               Code            |
  1718.   +---+-+-------------------------+-------------------------------+
  1719.  
  1720.   where
  1721.  
  1722.       Sev - is the severity code
  1723.           00 - Success
  1724.           01 - Informational
  1725.           10 - Warning
  1726.           11 - Error
  1727.  
  1728.       C - is the Customer code flag
  1729.  
  1730.       Facility - is the facility code
  1731.  
  1732.       Code - is the facility's status code
  1733.  
  1734.   Exceptions specific to OS/2 2.0 (e.g. xcpt_Signal) will be marked
  1735.   with a facility code of 1.
  1736.  
  1737.   System defined exceptions have a facility code of zero.
  1738.  
  1739.   Each exception may also have several pieces of additional information.
  1740.   These are stored in the ExceptionInfo fields of the
  1741.   ExceptionReportRecord. They are documented here with the exceptions
  1742.   only for ease of reference.
  1743.  }
  1744.   xcpt_Fatal_Exception          = $C0000000;
  1745.   xcpt_Severity_Code            = $C0000000;
  1746.   xcpt_Customer_Code            = $20000000;
  1747.   xcpt_Facility_Code            = $1FFF0000;
  1748.   xcpt_Exception_Code           = $0000FFFF;
  1749. { Violation flags in ExceptionInfo }
  1750.   xcpt_Unknown_Access           = $00000000;     { Unknown access }
  1751.   xcpt_Read_Access              = $00000001;     { Read access    }
  1752.   xcpt_Write_Access             = $00000002;     { Write access   }
  1753.   xcpt_Execute_Access           = $00000004;     { Execute access }
  1754.   xcpt_Space_Access             = $00000008;     { Address space access }
  1755.   xcpt_Limit_Access             = $00000010;     { Address space limit violation }
  1756.   xcpt_Data_Unknown             = $FFFFFFFF;
  1757. { Signal numbers for xcpt_Signal }
  1758.   xcpt_Signal_Intr              = 1;
  1759.   xcpt_Signal_KillProc          = 3;
  1760.   xcpt_Signal_Break             = 4;
  1761. { Portable non-fatal software generated exceptions }
  1762.   xcpt_Guard_Page_Violation     = $80000001;
  1763. { ExceptionInfo[ 0 ] - Access Code: xcpt_Read_Access
  1764.                                     xcpt_Write_Access }
  1765. { ExceptionInfo[ 1 ] - FaultAddr }
  1766.   xcpt_Unable_To_Grow_Stack     = $80010001;
  1767. { Portable fatal hardware generated exceptions }
  1768.   xcpt_DataType_Misalignment    = $C000009E;
  1769. { ExceptionInfo[ 0 ] - Access Code: xcpt_Read_Access
  1770.                                     xcpt_Write_Access }
  1771. { ExceptionInfo[ 1 ] - Alignment }
  1772. { ExceptionInfo[ 2 ] - FaultAddr }
  1773.   xcpt_Breakpoint               = $C000009F;
  1774.   xcpt_Single_Step              = $C00000A0;
  1775.   xcpt_Access_Violation         = $C0000005;
  1776. { ExceptionInfo[ 0 ] - Access Code: xcpt_Read_Access
  1777.                                     xcpt_Write_Access
  1778.                                     xcpt_Space_Access
  1779.                                     xcpt_Limit_Access
  1780.                                     xcpt_Unknown_Access }
  1781. { ExceptionInfo[ 1 ] - FaultAddr (xcpt_Read_Access/xcpt_Write_Access)
  1782.                        Selector  (xcpt_Space_Access)
  1783.                          -1      (xcpt_Limit_Access) }
  1784.   xcpt_Illegal_Instruction      = $C000001C;
  1785.   xcpt_Float_Denormal_Operand   = $C0000094;
  1786.   xcpt_Float_Divide_By_Zero     = $C0000095;
  1787.   xcpt_Float_Inexact_Result     = $C0000096;
  1788.   xcpt_Float_Invalid_Operation  = $C0000097;
  1789.   xcpt_Float_Overflow           = $C0000098;
  1790.   xcpt_Float_Stack_Check        = $C0000099;
  1791.   xcpt_Float_Underflow          = $C000009A;
  1792.   xcpt_Integer_Divide_By_Zero   = $C000009B;
  1793.   xcpt_Integer_Overflow         = $C000009C;
  1794.   xcpt_Privileged_Instruction   = $C000009D;
  1795. {  Portable fatal software generated exceptions }
  1796.   xcpt_In_Page_Error            = $C0000006;
  1797. { ExceptionInfo[ 0 ] - FaultAddr }
  1798.   xcpt_Process_Terminate        = $C0010001;
  1799.   xcpt_Async_Process_Terminate  = $C0010002;
  1800. { ExceptionInfo[ 0 ] - TID of 'terminator' thread }
  1801.   xcpt_NonContinuable_Exception = $C0000024;
  1802.   xcpt_Invalid_Disposition      = $C0000025;
  1803. { Non-portable fatal exceptions }
  1804.   xcpt_Invalid_Lock_Sequence    = $C000001D;
  1805.   xcpt_Array_Bounds_Exceeded    = $C0000093;
  1806.   xcpt_B1npx_Errata_02          = $C0010004;
  1807. { Misc exceptions }
  1808.   xcpt_Unwind                   = $C0000026;
  1809.   xcpt_Bad_Stack                = $C0000027;
  1810.   xcpt_Invalid_Unwind_Target    = $C0000028;
  1811. { Signal Exceptions }
  1812.   xcpt_Signal                   = $C0010003;
  1813. { ExceptionInfo[ 0 ] - Signal Number }
  1814.  
  1815. { ContextRecord
  1816.   This is the machine specific register contents for the thread
  1817.   at the time of the exception. Note that only the register sets
  1818.   specified by ContextFlags contain valid data. Conversely, only
  1819.   registers specified in ContextFlags will be restored if an exception
  1820.   is handled.
  1821.  
  1822.   The following flags control the contents of the CONTEXT structure.
  1823. }
  1824.   context_Control               = $00000001;    { SS:ESP, CS:EIP, EFLAGS, EBP  }
  1825.   context_Integer               = $00000002;    { EAX, EBX, ECX, EDX, ESI, EDI }
  1826.   context_Segments              = $00000004;    { DS, ES, FS, GS               }
  1827.   context_Floating_Point        = $00000008;    { numeric coprocessor state    }
  1828.   context_Full                  = context_Control  or context_Integer or
  1829.                                   context_Segments or context_Floating_Point;
  1830. { Coprocessor stack register element }
  1831. type
  1832.   PFpReg = ^FpReg;
  1833.   FpReg = record
  1834.     losig:   ULong;
  1835.     hisig:   ULong;
  1836.     signexp: SmallWord;
  1837.   end;
  1838.  
  1839.   PContextRecord = ^ContextRecord;
  1840.   ContextRecord = record
  1841. { The flags values within this flag control the contents of
  1842.   a ContextRecord.
  1843.   If the ContextRecord is used as an input parameter, then
  1844.   for each portion of the ContextRecord controlled by a flag
  1845.   whose value is set, it is assumed that that portion of the
  1846.   ContextRecord contains valid context. If the ContextRecord
  1847.   is being used to modify a thread's context, then only that
  1848.   portion of the thread's context will be modified.
  1849.  
  1850.   If the ContextRecord is used as an Input/Output parameter to
  1851.   capture the context of a thread, then only those portions of the
  1852.   thread's context corresponding to set flags will be returned.
  1853. }
  1854.     ContextFlags: ULong;
  1855. { This section is specified/returned if the ContextFlags
  1856.   contains the flag context_Floating_Point.
  1857. }
  1858.     ctx_env:   array [0..6] of ULong;    { coprocessor environment }
  1859.     ctx_stack: array [0..7] of FpReg;    { register set            }
  1860. { This section is specified/returned if the ContextFlags
  1861.    contains the flag context_Segments.
  1862. }
  1863.     ctx_SegGs:  ULong;
  1864.     ctx_SegFs:  ULong;
  1865.     ctx_SegEs:  ULong;
  1866.     ctx_SegDs:  ULong;
  1867. { This section is specified/returned if the ContextFlags
  1868.   contains the flag context_Integer.
  1869. }
  1870.     ctx_RegEdi: ULong;
  1871.     ctx_RegEsi: ULong;
  1872.     ctx_RegEax: ULong;
  1873.     ctx_RegEbx: ULong;
  1874.     ctx_RegEcx: ULong;
  1875.     ctx_RegEdx: ULong;
  1876. { This section is specified/returned if the ContextFlags
  1877.   contains the flag context_Control.
  1878. }
  1879.     ctx_RegEbp: ULong;
  1880.     ctx_RegEip: ULong;
  1881.     ctx_SegCs:  ULong;
  1882.     ctx_EFlags: ULong;
  1883.     ctx_RegEsp: ULong;
  1884.     ctx_SegSs:  ULong;
  1885.   end;
  1886.  
  1887. { ExceptionReportRecord
  1888.   This structure contains machine independant information about an
  1889.   exception/unwind. No system exception will ever have more than
  1890.   exception_Maximum_Parameters parameters. User exceptions are not
  1891.   bound to this limit.
  1892.  }
  1893. const
  1894.   exception_Maximum_Parameters  = 4;    { Enough for all system exceptions }
  1895. type
  1896.   PExceptionRegistrationRecord = ^ExceptionRegistrationRecord;
  1897.   PExceptionReportRecord = ^ExceptionReportRecord;
  1898.   ExceptionReportRecord = record
  1899.     ExceptionNum:     ULong;            { exception number }
  1900.     fHandlerFlags:    ULong;
  1901.     NestedExceptionReportRecord: PExceptionReportRecord;
  1902.     ExceptionAddress: Pointer;
  1903.     cParameters:      ULong;            { Size of Exception Specific Info }
  1904.     ExceptionInfo: array [0..exception_Maximum_Parameters-1] of ULong;
  1905.   end;                                  { Exception Specfic Info }
  1906.  
  1907.   Err = function(ExcpRep: PExceptionReportRecord;
  1908.                  ExcpReg: PExceptionRegistrationRecord;
  1909.                  Context: PContextRecord;
  1910.                  P:       Pointer): ULong;
  1911.  
  1912. { ExceptionRegistrationRecord
  1913.   These are linked together to form a chain of exception handlers that
  1914.   will be dispatched to upon receipt of an exception.
  1915. }
  1916.   ExceptionRegistrationRecord = record
  1917.     Prev_Structure:   PExceptionRegistrationRecord;
  1918.     ExceptionHandler: Err;
  1919.   end;
  1920.  
  1921. { End of exception chain marker }
  1922. const
  1923.   end_Of_Chain  = PExceptionRegistrationRecord(-1);
  1924.  
  1925. function DosSetExceptionHandler(var ERegRec: ExceptionRegistrationRecord): ApiRet;
  1926. function DosUnsetExceptionHandler(var ERegRec: ExceptionRegistrationRecord): ApiRet;
  1927. function DosRaiseException(var Xcpt: ExceptionReportRecord): ApiRet;
  1928. function DosSendSignalException(Pid: Pid; Exception: ULong): ApiRet;
  1929. function DosUnwindException(var Handler: ExceptionRegistrationRecord; TargetIP: Pointer;
  1930.   var ERepRec: ExceptionReportRecord): ApiRet;
  1931. function DosSetSignalExceptionFocus(Flag: Bool; var Times: ULong): ApiRet;
  1932. function DosEnterMustComplete(var Nesting: ULong): ApiRet;
  1933. function DosExitMustComplete(var Nesting: ULong): ApiRet;
  1934. function DosAcknowledgeSignalException(SignalNum: ULong): ApiRet;
  1935.  
  1936. {*** Pipe and queue support ***}
  1937.  
  1938. type
  1939.   PHQueue = ^HQueue;
  1940.   HQueue  = LHandle;
  1941.  
  1942.   PRequestData = ^RequestData;
  1943.   RequestData = record
  1944.     Pid:  Pid;
  1945.     Data: ULong;
  1946.   end;
  1947.  
  1948. const
  1949.   que_Fifo                      = 0;
  1950.   que_Lifo                      = 1;
  1951.   que_Priority                  = 2;
  1952.   que_NoConvert_Address         = 0;
  1953.   que_Convert_Address           = 4;
  1954.  
  1955. function DosCreatePipe(var Read,Write: HFile; cb: ULong): ApiRet;
  1956. function DosCloseQueue(Queue: HQueue): ApiRet;
  1957. function DosCreateQueue(var Queue: HQueue; Priority: ULong; Name: PChar): ApiRet;
  1958. function DosOpenQueue(var Pid: Pid; var Queue: HQueue; Name: PChar): ApiRet;
  1959. function DosPeekQueue(Queue: HQueue; var Request: RequestData; var cbData: ULong;
  1960.   var Buf; var Element: ULong; NoWait: ULong; var Priority: Byte; Sem: HEv): ApiRet;
  1961. function DosPurgeQueue(Queue: HQueue): ApiRet;
  1962. function DosQueryQueue(Queue: HQueue; var cbEntries: ULong): ApiRet;
  1963. function DosReadQueue(Queue: HQueue; var Request: RequestData;
  1964.   var cbData: ULong; var Buf; Element: ULong; NoWait: ULong; var Priority: Byte; Sem: HEv): ApiRet;
  1965. function DosWriteQueue(Queue: HQueue; Request: ULong; cbData: ULong; pbData: Pointer; Priority: ULong): ApiRet;
  1966.  
  1967. { definitions for DosSearchPath control Word }
  1968. const
  1969.   dsp_ImpliedCur                = 1;    { current dir will be searched first }
  1970.   dsp_PathRef                   = 2;    { from env.variable }
  1971.   dsp_IgnoreNetErr              = 4;    { ignore net errs & continue search }
  1972.  
  1973. { indices for DosQuerySysInfo }
  1974.   qsv_Max_Path_Length           = 1;
  1975.   q_Max_Path_Length             = qsv_Max_Path_Length;
  1976.   qsv_Max_Text_Sessions         = 2;
  1977.   qsv_Max_Pm_Sessions           = 3;
  1978.   qsv_Max_Vdm_Sessions          = 4;
  1979.   qsv_Boot_Drive                = 5;      { 1=A, 2=B, etc. }
  1980.   qsv_Dyn_Pri_Variation         = 6;      { 0=Absolute, 1=Dynamic }
  1981.   qsv_Max_Wait                  = 7;      { seconds }
  1982.   qsv_Min_Slice                 = 8;      { milli seconds }
  1983.   qsv_Max_Slice                 = 9;      { milli seconds }
  1984.   qsv_Page_Size                 = 10;
  1985.   qsv_Version_Major             = 11;
  1986.   qsv_Version_Minor             = 12;
  1987.   qsv_Version_Revision          = 13;     { Revision letter }
  1988.   qsv_Ms_Count                  = 14;     { Free running millisecond counter }
  1989.   qsv_Time_Low                  = 15;     { Low dWord of time in seconds }
  1990.   qsv_Time_High                 = 16;     { High dWord of time in seconds }
  1991.   qsv_TotPhysMem                = 17;     { Physical memory on system }
  1992.   qsv_TotResMem                 = 18;     { Resident memory on system }
  1993.   qsv_TotAvailMem               = 19;     { Available memory for all processes }
  1994.   qsv_MaxPrMem                  = 20;     { Avail private mem for calling proc }
  1995.   qsv_MaxShMem                  = 21;     { Avail shared mem for calling proc }
  1996.   qsv_Timer_Interval            = 22;     { Timer interval in tenths of ms }
  1997.   qsv_Max_Comp_Length           = 23;     { max len of one component in a name }
  1998. { OS/2 3.0+ only }
  1999.   qsv_Foreground_Fs_Session     = 24;     { Session ID of current fgnd FS session }
  2000.   qsv_Foreground_Process        = 25;     { Process ID of current fgnd process }
  2001.   qsv_Max                       = qsv_Foreground_Process;
  2002. { definitions for DosError - combine with OR }
  2003.   ferr_DisableHardErr           = $00000000;    { disable hard error popups }
  2004.   ferr_EnableHardErr            = $00000001;    { enable hard error popups  }
  2005.   ferr_EnableException          = $00000000;    { enable exception popups   }
  2006.   ferr_DisableException         = $00000002;    { disable exception popups  }
  2007. { definitions for DosQueryRASInfo Index }
  2008.   sis_MmioAddr                  = 0;
  2009.   sis_Mec_Table                 = 1;
  2010.   sis_Sys_Log                   = 2;
  2011. { definitions for DosQueryExtLIBPATH and DosSetExtLIBPATH flags parameter }
  2012.   Begin_Libpath                 = 1;
  2013.   End_Libpath                   = 2;
  2014.  
  2015. type
  2016.   PPChar = ^PChar;
  2017.  
  2018. function DosError(Error: ULong): ApiRet;
  2019. function DosGetMessage(Table: PPChar; cTable: ULong; Buf: PChar; cbBuf: ULong;
  2020.   MsgNumber: ULong; FileName: PChar; var cbMsg: ULong): ApiRet;
  2021. function DosErrClass(Code: ULong; var Cls,Action,Locus: ULong): ApiRet;
  2022. function DosInsertMessage(var Table: PChar; cTable: ULong; Msg: PChar; cbMsg: ULong;
  2023.   Buf: PChar; cbBuf: ULong; var cbMsg: ULong): ApiRet;
  2024. function DosPutMessage(F: HFile; cbMsg: ULong; Buf: PChar): ApiRet;
  2025. function DosQuerySysInfo(Start,Last: ULong; var Buf; cbBuf: ULong): ApiRet;
  2026. function DosScanEnv(Name: PChar; var Value: PChar): ApiRet;
  2027. function DosSearchPath(Flag: ULong; PathOrName,FileName,Buf: PChar; cbBuf: ULong): ApiRet;
  2028. function DosQueryMessageCP(pb: PChar; cb: ULong; FileName: PChar; var Buf: ULong): ApiRet;
  2029. function DosQueryRASInfo(Index: ULong; var Addr: Pointer): ApiRet;
  2030. function DosSetExtLIBPATH(ExtLIBPATH: PChar; Flags: ULong): ApiRet;
  2031. function DosQueryExtLIBPATH(ExtLIBPATH: PChar; Flags: ULong): ApiRet;
  2032.  
  2033. { Session manager support }
  2034. type
  2035.   StartData = record
  2036.     Length:        SmallWord;
  2037.     Related:       SmallWord;
  2038.     FgBg:          SmallWord;
  2039.     TraceOpt:      SmallWord;
  2040.     PgmTitle:      PChar;
  2041.     PgmName:       PChar;
  2042.     PgmInputs:     PChar;
  2043.     TermQ:         PChar;
  2044.     Environment:   PChar;
  2045.     InheritOpt:    SmallWord;
  2046.     SessionType:   SmallWord;
  2047.     IconFile:      PChar;
  2048.     PgmHandle:     ULong;
  2049.     PgmControl:    SmallWord;
  2050.     InitXPos:      SmallWord;
  2051.     InitYPos:      SmallWord;
  2052.     InitXSize:     SmallWord;
  2053.     InitYSize:     SmallWord;
  2054.     Reserved:      SmallWord;
  2055.     ObjectBuffer:  PChar;
  2056.     ObjectBuffLen: ULong;
  2057.   end;
  2058.  
  2059. const
  2060.   ssf_Related_Independent       = 0;
  2061.   ssf_Related_Child             = 1;
  2062.  
  2063.   ssf_Fgbg_Fore                 = 0;
  2064.   ssf_Fgbg_Back                 = 1;
  2065.  
  2066.   ssf_TraceOpt_None             = 0;
  2067.   ssf_TraceOpt_Trace            = 1;
  2068.   ssf_TraceOpt_TraceAll         = 2;
  2069.  
  2070.   ssf_InhertOpt_Shell           = 0;
  2071.   ssf_InhertOpt_Parent          = 1;
  2072.  
  2073. { note that these types are identical to those in PmShl unit for prog_* }
  2074.   ssf_Type_Default              = 0;
  2075.   ssf_Type_FullScreen           = 1;
  2076.   ssf_Type_WindowableVio        = 2;
  2077.   ssf_Type_Pm                   = 3;
  2078.   ssf_Type_Vdm                  = 4;
  2079.   ssf_Type_Group                = 5;
  2080.   ssf_Type_Dll                  = 6;
  2081.   ssf_Type_WindowedVdm          = 7;
  2082.   ssf_Type_Pdd                  = 8;
  2083.   ssf_Type_Vdd                  = 9;
  2084.  
  2085. { note that these flags are identical to those in PmShl unit for she_* }
  2086.   ssf_Control_Visible           = $0000;
  2087.   ssf_Control_Invisible         = $0001;
  2088.   ssf_Control_Maximize          = $0002;
  2089.   ssf_Control_Minimize          = $0004;
  2090.   ssf_Control_NoAutoClose       = $0008;
  2091.   ssf_Control_SetPos            = $8000;
  2092.  
  2093.   prog_Default                  = 0;
  2094.   prog_FullScreen               = 1;
  2095.   prog_WindowableVIO            = 2;
  2096.   prog_PM                       = 3;
  2097.   prog_Group                    = 5;
  2098.   prog_Real                     = 4;
  2099.   prog_VDM                      = 4;
  2100.   prog_WindowedVDM              = 7;
  2101.   prog_DLL                      = 6;
  2102.   prog_PDD                      = 8;
  2103.   prog_VDD                      = 9;
  2104.   prog_Window_Real              = 10;
  2105.   prog_Window_Prot              = 11;
  2106.   prog_30_Std                   = 11;
  2107.   prog_Window_Auto              = 12;
  2108.   prog_SeamlessVDM              = 13;
  2109.   prog_30_StdSeamlessVDM        = 13;
  2110.   prog_SeamlessCommon           = 14;
  2111.   prog_30_StdSeamlessCommon     = 14;
  2112.   prog_31_StdSeamlessVDM        = 15;
  2113.   prog_31_StdSeamlessCommon     = 16;
  2114.   prog_31_EnhSeamlessVDM        = 17;
  2115.   prog_31_EnhSeamlessCommon     = 18;
  2116.   prog_31_Enh                   = 19;
  2117.   prog_31_Std                   = 20;
  2118.   prog_Reserved                 = 255;
  2119.  
  2120. type
  2121.   PStatusData = ^StatusData;
  2122.   StatusData = record
  2123.     Length:    SmallWord;
  2124.     SelectInd: SmallWord;
  2125.     BondInd:   SmallWord;
  2126.   end;
  2127.  
  2128. { SelectInd and BondInd paramater values for DosSetSession }
  2129. const
  2130.   set_Session_Unchanged         = 0;
  2131.   set_Session_Selectable        = 1;
  2132.   set_Session_Non_Selectable    = 2;
  2133.   set_Session_Bond              = 1;
  2134.   set_Session_No_Bond           = 2;
  2135. { TargetOption (scope) parameter values for DosStopSession }
  2136.   stop_Session_Specified        = 0;
  2137.   stop_Session_All              = 1;
  2138.  
  2139. function DosStartSession(var Sd: StartData; var IdSession: ULong; var Pid: Pid): ApiRet;
  2140. function DosSetSession(IdSession: ULong; var Sd: StatusData): ApiRet;
  2141. function DosSelectSession(IdSession: ULong): ApiRet;
  2142. function DosStopSession(Scope: ULong; IdSession: ULong): ApiRet;
  2143. function DosQueryAppType(Name: PChar; var Flags: ULong): ApiRet;
  2144.  
  2145. { AppType returned in by DosQueryAppType in pFlags as follows }
  2146. const
  2147.   fapptyp_NotSpec               = $0000;
  2148.   fapptyp_NotWindowCompat       = $0001;
  2149.   fapptyp_WindowCompat          = $0002;
  2150.   fapptyp_WindowApi             = $0003;
  2151.   fapptyp_Bound                 = $0008;
  2152.   fapptyp_Dll                   = $0010;
  2153.   fapptyp_Dos                   = $0020;
  2154.   fapptyp_PhysDrv               = $0040; { physical device driver       }
  2155.   fapptyp_VirtDrv               = $0080; { virtual device driver        }
  2156.   fapptyp_ProtDll               = $0100; { 'protected memory' dll       }
  2157.   fapptyp_WindowsReal           = $0200; { Windows real mode app        }
  2158.   fapptyp_WindowsProt           = $0400; { Windows protect mode app     }
  2159.   fapptyp_32bit                 = $4000;
  2160.   fapptyp_ExeType               = fapptyp_WindowApi;
  2161.  
  2162.   fapptyp_Reserved              =
  2163.     not (fapptyp_WindowApi or fapptyp_Bound or fapptyp_Dll or fapptyp_Dos or
  2164.          fapptyp_PhysDrv or fapptyp_VirtDrv or fapptyp_ProtDll or fapptyp_32bit);
  2165.  
  2166.   eat_apptyp_PmApi              = $00;           { Uses PM API }
  2167.   eat_apptyp_Dos                = $01;           { DOS APP }
  2168.   eat_apptyp_PmW                = $02;           { Window compatible }
  2169.   eat_apptyp_NoPmW              = $03;           { Not Window compatible }
  2170.   eat_apptyp_ExeType            = $03;           { EXE type mask }
  2171.   eat_apptyp_Reserved           = not eat_apptyp_ExeType;
  2172.  
  2173. { Device support }
  2174.  
  2175. function DosDevConfig(DevInfo: Pointer; Item: ULong): ApiRet;
  2176.  
  2177. const
  2178.   devinfo_Printer               = 0;      { Number of printers attached }
  2179.   devinfo_Rs232                 = 1;      { Number of RS232 ports }
  2180.   devinfo_Floppy                = 2;      { Number of diskette drives }
  2181.   devinfo_Coprocessor           = 3;      { Presence of math coprocessor }
  2182.   devinfo_SubModel              = 4;      { PC Submodel Type }
  2183.   devinfo_Model                 = 5;      { PC Model Type }
  2184.   devinfo_Adapter               = 6;      { Primary display adapter type }
  2185.  
  2186. function DosDevIOCtl(Device: HFile; Category,Func: ULong; Params: Pointer;
  2187.   cbParmLenMax: ULong; cbParmLen: PULong; Data: Pointer; cbDataLenMax: ULong;
  2188.   cbDataLen: PULong): ApiRet;
  2189.  
  2190. { OS/2 Structures and constants for use with DosDevIOCtl }
  2191.  
  2192. { Input and Output Control Categories }
  2193.  
  2194. const
  2195.   ioctl_Async                   = $0001;
  2196.   ioctl_Scr_and_PtrDraw         = $0003;
  2197.   ioctl_Keyboard                = $0004;
  2198.   ioctl_Printer                 = $0005;
  2199.   ioctl_LightPen                = $0006;
  2200.   ioctl_PointingDevice          = $0007;
  2201.   ioctl_Disk                    = $0008;
  2202.   ioctl_PhysicalDisk            = $0009;
  2203.   ioctl_Monitor                 = $000A;
  2204.   ioctl_General                 = $000B;
  2205.   ioctl_Power                   = $000C;
  2206.   ioctl_OemHlp                  = $0080;
  2207.   ioctl_TestCfg_Sys             = $0080;
  2208.   ioctl_CdromDisk               = $0080;
  2209.   ioctl_CdromAudio              = $0081;
  2210.   ioctl_Touch_DevDep            = $0081;
  2211.   ioctl_Touch_DevIndep          = $0081;
  2212.  
  2213. { Serial-Device Control }
  2214.  
  2215.   async_SetBaudRate             = $0041;
  2216.   async_SetLineCtrl             = $0042;
  2217.   async_ExtSetBaudRate          = $0043;
  2218.   async_TransmitImm             = $0044;
  2219.   async_SetBreakOff             = $0045;
  2220.   async_SetModemCtrl            = $0046;
  2221.   async_SetBreakOn              = $004B;
  2222.   async_StopTransmit            = $0047;
  2223.   async_StartTransmit           = $0048;
  2224.   async_SetDcbInfo              = $0053;
  2225.   async_SetEnhancedModeParms    = $0054;
  2226.   async_GetBaudRate             = $0061;
  2227.   async_GetLineCtrl             = $0062;
  2228.   async_ExtGetBaudRate          = $0063;
  2229.   async_GetCommStatus           = $0064;
  2230.   async_GetLineStatus           = $0065;
  2231.   async_GetModemOutput          = $0066;
  2232.   async_GetModemInput           = $0067;
  2233.   async_GetInQueCount           = $0068;
  2234.   async_GetOutQueCount          = $0069;
  2235.   async_GetCommError            = $006D;
  2236.   async_GetCommEvent            = $0072;
  2237.   async_GetDcbInfo              = $0073;
  2238.   async_GetEnhancedModeParms    = $0074;
  2239.  
  2240. { Screen/Pointer-Draw Control }
  2241.  
  2242.   scr_AllocLdt                  = $0070;
  2243.   scr_DeallocLdt                = $0071;
  2244.   ptr_GetPtrDrawAddress         = $0072;
  2245.   vid_InitCallVector            = $0073;
  2246.   scr_ABiosPassThru             = $0074;
  2247.   scr_AllocLdtOff               = $0075;
  2248.   scr_AllocLdtBgVal             = $0076;
  2249.   scr_AllocVideoBuffer          = $007E;
  2250.   scr_GetRomFontAddr            = $007F;
  2251.  
  2252. { Keyboard Control }
  2253.  
  2254.   kbd_SetTransTable             = $0050;
  2255.   kbd_SetInputMode              = $0051;
  2256.   kbd_SetInterimFlag            = $0052;
  2257.   kbd_SetShiftState             = $0053;
  2258.   kbd_SetTypamaticRate          = $0054;
  2259.   kbd_SetFgndScreenGrp          = $0055;
  2260.   kbd_SetSesMgrHotKey           = $0056;
  2261.   kbd_SetFocus                  = $0057;
  2262.   kbd_SetKcb                    = $0058;
  2263.   kbd_SetReadNotification       = $0059;
  2264.   kbd_AlterKbdLed               = $005A;
  2265.   kbd_SetNls                    = $005C;
  2266.   kbd_Create                    = $005D;
  2267.   kbd_Destroy                   = $005E;
  2268.   kbd_GetInputMode              = $0071;
  2269.   kbd_GetInterimFlag            = $0072;
  2270.   kbd_GetShiftState             = $0073;
  2271.   kbd_ReadChar                  = $0074;
  2272.   kbd_PeekChar                  = $0075;
  2273.   kbd_GetSesMgrHotKey           = $0076;
  2274.   kbd_GetKeybdType              = $0077;
  2275.   kbd_GetCodePageId             = $0078;
  2276.   kbd_XlateScan                 = $0079;
  2277.   kbd_QueryKbdHardwareId        = $007A;
  2278.   kbd_QueryKbdCodePageSupport   = $007B;
  2279.  
  2280. { Printer Control }
  2281.  
  2282.   prt_QueryJobHandle            = $0021;
  2283.   prt_SetFrameCtl               = $0042;
  2284.   prt_SetInfiniteRetry          = $0044;
  2285.   prt_InitPrinter               = $0046;
  2286.   prt_ActivateFont              = $0048;
  2287.   prt_SetPrintJobTitle          = $004D;
  2288.   prt_SetIrqTimeout             = $004E;
  2289.   prt_GetFrameCtl               = $0062;
  2290.   prt_GetInfiniteRetry          = $0064;
  2291.   prt_GetPrinterStatus          = $0066;
  2292.   prt_QueryActiveFont           = $0069;
  2293.   prt_VerifyFont                = $006A;
  2294.   prt_QueryIrqTimeout           = $006E;
  2295.  
  2296. { Pointing-Device (Mouse) Control }
  2297.  
  2298.   mou_AllowPtrDraw              = $0050;
  2299.   mou_UpdateDisplayMode         = $0051;
  2300.   mou_ScreenSwitch              = $0052;
  2301.   mou_SetScaleFactors           = $0053;
  2302.   mou_SetEventMask              = $0054;
  2303.   mou_SetHotKeyButton           = $0055;
  2304.   mou_ReassignThresholdValues   = $0055;
  2305.   mou_SetPtrShape               = $0056;
  2306.   mou_DrawPtr                   = $0057;
  2307.   mou_UnmarkCollisionArea       = $0057;
  2308.   mou_RemovePtr                 = $0058;
  2309.   mou_MarkCollisionArea         = $0058;
  2310.   mou_SetPtrPos                 = $0059;
  2311.   mou_SetProtDrawAddress        = $005A;
  2312.   mou_SetRealDrawAddress        = $005B;
  2313.   mou_SetMouStatus              = $005C;
  2314.   mou_DisplayModeChange         = $005D;
  2315.   mou_GetButtonCount            = $0060;
  2316.   mou_GetMickeyCount            = $0061;
  2317.   mou_GetMouStatus              = $0062;
  2318.   mou_ReadEventQue              = $0063;
  2319.   mou_GetQueStatus              = $0064;
  2320.   mou_GetEventMask              = $0065;
  2321.   mou_GetScaleFactors           = $0066;
  2322.   mou_GetPtrPos                 = $0067;
  2323.   mou_GetPtrShape               = $0068;
  2324.   mou_GetHotKeyButton           = $0069;
  2325.   mou_QueryThresholdValues      = $0069;
  2326.   mou_Ver                       = $006A;
  2327.   mou_QueryPointerId            = $006B;
  2328.  
  2329. { Disk/Diskette Control }
  2330.  
  2331.   dsk_LockDrive                 = $0000;
  2332.   dsk_UnlockDrive               = $0001;
  2333.   dsk_RedetermineMedia          = $0002;
  2334.   dsk_SetLogicalMap             = $0003;
  2335.   dsk_BeginFormat               = $0004;
  2336.   dsk_BlockRemovable            = $0020;
  2337.   dsk_GetLogicalMap             = $0021;
  2338.   dsk_UnlockEjectMedia          = $0040;
  2339.   dsk_SetDeviceParams           = $0043;
  2340.   dsk_WriteTrack                = $0044;
  2341.   dsk_FormatVerify              = $0045;
  2342.   dsk_DisketteControl           = $005D;
  2343.   dsk_QueryMediaSense           = $0060;
  2344.   dsk_GetDeviceParams           = $0063;
  2345.   dsk_ReadTrack                 = $0064;
  2346.   dsk_VerifyTrack               = $0065;
  2347.   dsk_GetLockStatus             = $0066;
  2348.  
  2349. { Physical-Disk Control }
  2350.  
  2351.   pdsk_LockPhysDrive            = $0000;
  2352.   pdsk_UnlockPhysDrive          = $0001;
  2353.   pdsk_WritePhysTrack           = $0044;
  2354.   pdsk_GetPhysDeviceParams      = $0063;
  2355.   pdsk_ReadPhysTrack            = $0064;
  2356.   pdsk_VerifyPhysTrack          = $0065;
  2357.  
  2358. { Character-Monitor Control }
  2359.   mon_RegisterMonitor           = $0040;
  2360.  
  2361. { General Device Control }
  2362.  
  2363.   dev_FlushInput                = $0001;
  2364.   dev_FlushOutput               = $0002;
  2365.   dev_SystemNotifyPdd           = $0041;
  2366.   dev_QueryMonSupport           = $0060;
  2367.  
  2368. { Advanced Power Management }
  2369.  
  2370.   power_SendPowerEvent          = $0040;
  2371.   power_SetPowerEventRes        = $0041;
  2372.   power_GetPowerStatus          = $0060;
  2373.   power_GetPowerEvent           = $0061;
  2374.   power_GetPowerInfo            = $0062;
  2375.  
  2376. { OEMHlp }
  2377.  
  2378.   oemhlp_GetOemAdaptionInfo     = $0000;
  2379.   oemhlp_GetMachineInfo         = $0001;
  2380.   oemhlp_GetDisplayCombCode     = $0002;
  2381.   oemhlp_GetVideoFonts          = $0003;
  2382.   oemhlp_ReadEisaConfigInfo     = $0004;
  2383.   oemhlp_GetRomBiosInfo         = $0005;
  2384.   oemhlp_GetMiscVideoInfo       = $0006;
  2385.   oemhlp_GetVideoAdapter        = $0007;
  2386.   oemhlp_GetSvgaInfo            = $0008;
  2387.   oemhlp_GetMemInfo             = $0009;
  2388.   oemhlp_GetDmqsInfo            = $000A;
  2389.   oemhlp_Pci                    = $000B;
  2390.  
  2391.  { Test System Config }
  2392.  
  2393.   testcfg_Sys_GetBiosAdapter    = $0040;
  2394.   testcfg_Sys_IssueInIoInstr    = $0041;
  2395.   testcfg_Sys_IssueOutIoInstr   = $0042;
  2396.   testcfg_Sys_GetBusArch        = $0060;
  2397.   testcfg_Sys_GetAllPosIds      = $0061;
  2398.   testcfg_Sys_GetAllEisaIds     = $0062;
  2399.  
  2400. { CDROM Drive and Disk }
  2401.  
  2402.   cdromdisk_ResetDrive          = $0040;
  2403.   cdromdisk_EjectDisk           = $0044;
  2404.   cdromdisk_CloseTray           = $0045;
  2405.   cdromdisk_LockUnlockDoor      = $0046;
  2406.   cdromdisk_Seek                = $0050;
  2407.   cdromdisk_DeviceStatus        = $0060;
  2408.   cdromdisk_GetDriver           = $0061;
  2409.   cdromdisk_GetSectorSize       = $0063;
  2410.   cdromdisk_GetHeadLoc          = $0070;
  2411.   cdromdisk_ReadLong            = $0072;
  2412.   cdromdisk_GetVolumeSize       = $0078;
  2413.   cdromdisk_GetUpc              = $0079;
  2414.  
  2415. { CDROM Audio }
  2416.  
  2417.   cdromaudio_SetChannelCtrl     = $0040;
  2418.   cdromaudio_PlayAudio          = $0050;
  2419.   cdromaudio_StopAudio          = $0051;
  2420.   cdromaudio_ResumeAudio        = $0052;
  2421.   cdromaudio_GetChannel         = $0060;
  2422.   cdromaudio_GetAudioDisk       = $0061;
  2423.   cdromaudio_GetAudioTrack      = $0062;
  2424.   cdromaudio_GetSubChannelQ     = $0063;
  2425.   cdromaudio_GetAudioStatus     = $0065;
  2426.  
  2427. { Touch device-dependent IOCtls }
  2428.  
  2429.   touch_DevDep_SetCalibConst    = $0052;
  2430.   touch_DevDep_ReadData         = $0053;
  2431.   touch_DevDep_SetDataMode      = $0054;
  2432.   touch_DevDep_SetClickLock     = $0055;
  2433.   touch_DevDep_SetTouchThreshold = $0056;
  2434.   touch_DevDep_SetEmulXy        = $0057;
  2435.   touch_DevDep_SetDataReportRate = $0058;
  2436.   touch_DevDep_SetLowPassFilter = $0059;
  2437.   touch_DevDep_WriteMemLoc      = $005A;
  2438.   touch_DevDep_GetCalibConst    = $0060;
  2439.   touch_DevDep_GetDataMode      = $0061;
  2440.   touch_DevDep_GetClickLock     = $0062;
  2441.   touch_DevDep_GetTouchThreshold = $0063;
  2442.   touch_DevDep_GetEmulXy        = $0064;
  2443.   touch_DevDep_GetDataReportRate = $0065;
  2444.   touch_DevDep_GetLowPassFilter = $0066;
  2445.   touch_DevDep_ReadMemLoc       = $0067;
  2446.  
  2447. { Touch device-INdependent IOCtls }
  2448.  
  2449.   touch_DevIndep_SetCoordSys    = $0050;
  2450.   touch_DevIndep_SetSelectMech  = $0052;
  2451.   touch_DevIndep_SetEventMask   = $0053;
  2452.   touch_DevIndep_SetQueueSize   = $0054;
  2453.   touch_DevIndep_SetEmulState   = $0055;
  2454.   touch_DevIndep_GetCoordSys    = $0060;
  2455.   touch_DevIndep_GetSelectMech  = $0062;
  2456.   touch_DevIndep_GetEventMask   = $0063;
  2457.   touch_DevIndep_GetQueueSize   = $0064;
  2458.   touch_DevIndep_GetEmulState   = $0065;
  2459.   touch_DevIndep_GetReadEventQueue = $0066;
  2460.  
  2461. { async_GetCommError, async_SetBreakOff, async_SetBreakOn, async_SetModemCtrl }
  2462.   rx_Que_Overrun                = $0001;
  2463.   rx_Hardware_Overrun           = $0002;
  2464.   parity_Error                  = $0004;
  2465.   framing_Error                 = $0008;
  2466.  
  2467. { async_GetCommEvent }
  2468.   char_Received                 = $0001;
  2469.   last_Char_Sent                = $0004;
  2470.   cts_Changed                   = $0008;
  2471.   dsr_Changed                   = $0010;
  2472.   dcd_Changed                   = $0020;
  2473.   break_Detected                = $0040;
  2474.   error_Occurred                = $0080;
  2475.   ri_Detected                   = $0100;
  2476.  
  2477. { async_GetCommStatus }
  2478.   tx_Waiting_For_Cts            = $0001;
  2479.   tx_Waiting_For_Dsr            = $0002;
  2480.   tx_Waiting_For_Dcd            = $0004;
  2481.   tx_Waiting_For_Xon            = $0008;
  2482.   tx_Waiting_To_Send_Xon        = $0010;
  2483.   tx_Waiting_While_Break_On     = $0020;
  2484.   tx_Waiting_To_Send_Imm        = $0040;
  2485.   rx_Waiting_For_Dsr            = $0080;
  2486.  
  2487. { async_GetLineStatus }
  2488.   write_Request_Queued          = $0001;
  2489.   data_In_Tx_Que                = $0002;
  2490.   hardware_Transmitting         = $0004;
  2491.   char_Ready_To_Send_Imm        = $0008;
  2492.   waiting_To_Send_Xon           = $0010;
  2493.   waiting_To_Send_Xoff          = $0020;
  2494.  
  2495. { async_GetModemInput }
  2496.   cts_On                        = $10;
  2497.   dsr_On                        = $20;
  2498.   ri_On                         = $40;
  2499.   dcd_On                        = $80;
  2500.  
  2501. { dsk_SetDeviceParams }
  2502.   build_Bpb_From_Medium         = $00;
  2503.   replace_Bpb_For_Device        = $01;
  2504.   replace_Bpb_For_Medium        = $02;
  2505.  
  2506. { kbd_GetInputMode, kbd_PeekChar, kbd_SetInputMode }
  2507.   ascii_Mode                    = $00;
  2508.   binary_Mode                   = $80;
  2509.  
  2510. { kbd_GetInterimFlag }
  2511.   conversion_Request            = $20;
  2512.   interim_Char                  = $80;
  2513.  
  2514. { kbd_GetSesMgrHotKey }
  2515.   hotkey_Max_Count              = $0000;
  2516.   hotkey_Current_Count          = $0001;
  2517.  
  2518. { kbd_PeekChar }
  2519.   kbd_Data_Received             = $0001;
  2520.   kbd_Data_Binary               = $8000;
  2521.  
  2522. { kbd_ReadChar }
  2523.   kbd_Read_Wait                 = $0000;
  2524.   kbd_Read_NoWait               = $8000;
  2525.  
  2526. { kbd_SetInputMode }
  2527.   shift_Report_Mode             = $01;
  2528.  
  2529. { mou_GetHotKeyButton, mou_SetHotKeyButton }
  2530.   mhk_No_HotKey                 = $0000;
  2531.  
  2532. { PRT_GETPRINTERSTATUS }
  2533.   printer_Timeout               = $0001;
  2534.   printer_Io_Error              = $0008;
  2535.   printer_Selected              = $0010;
  2536.   printer_Out_Of_Paper          = $0020;
  2537.   printer_Acknowledged          = $0040;
  2538.   printer_Not_Busy              = $0080;
  2539.  
  2540. { fbCtlHndShake }
  2541.   mode_Dtr_Control              = $01;
  2542.   mode_Dtr_Handshake            = $02;
  2543.   mode_Cts_Handshake            = $08;
  2544.   mode_Dsr_Handshake            = $10;
  2545.   mode_Dcd_Handshake            = $20;
  2546.   mode_Dsr_Sensitivity          = $40;
  2547.  
  2548. { fbFlowReplace }
  2549.   mode_Auto_Transmit            = $01;
  2550.   mode_Auto_Receive             = $02;
  2551.   mode_Error_Char               = $04;
  2552.   mode_Null_Stripping           = $08;
  2553.   mode_Break_Char               = $10;
  2554.   mode_Rts_Control              = $40;
  2555.   mode_Rts_Handshake            = $80;
  2556.   mode_Transmit_Toggle          = $C0;
  2557.  
  2558. { fbTimeout }
  2559.   mode_No_Write_Timeout         = $01;
  2560.   mode_Read_Timeout             = $02;
  2561.   mode_Wait_Read_Timeout        = $04;
  2562.   mode_NoWait_Read_Timeout      = $06;
  2563.  
  2564. type
  2565.   PDcbInfo = ^DcbInfo;
  2566.   DcbInfo = record
  2567.     usWriteTimeout:        SmallWord;
  2568.     usReadTimeout:         SmallWord;
  2569.     fbCtlHndShake:         Byte;
  2570.     fbFlowReplace:         Byte;
  2571.     fbTimeout:             Byte;
  2572.     bErrorReplacementChar: Byte;
  2573.     bBreakReplacementChar: Byte;
  2574.     bXONChar:              Byte;
  2575.     bXOFFChar:             Byte;
  2576.   end;
  2577.  
  2578.   PTrackLayout = ^TrackLayout;
  2579.   TrackLayout = record
  2580.     bCommand:      Byte;
  2581.     usHead:        SmallWord;
  2582.     usCylinder:    SmallWord;
  2583.     usFirstSector: SmallWord;
  2584.     cSectors:      SmallWord;
  2585.     TrackTable: array[0..0] of record
  2586.       usSectorNumber: SmallWord;
  2587.       usSectorSize:   SmallWord;
  2588.     end;
  2589.   end;
  2590.  
  2591. const
  2592.   devtype_48TPI                 = $0000;
  2593.   devtype_96TPI                 = $0001;
  2594.   devtype_35                    = $0002;
  2595.   devtype_8SD                   = $0003;
  2596.   devtype_8DD                   = $0004;
  2597.   devtype_Fixed                 = $0005;
  2598.   devtype_Tape                  = $0006;
  2599.   devtype_Unknown               = $0007;
  2600.  
  2601. type
  2602.   PBiosParameterBlock = ^BiosParameterBlock;
  2603.   BiosParameterBlock = record
  2604.     usBytesPerSector:   SmallWord;
  2605.     bSectorsPerCluster: Byte;
  2606.     usReservedSectors:  SmallWord;
  2607.     cFATs:              Byte;
  2608.     cRootEntries:       SmallWord;
  2609.     cSectors:           SmallWord;
  2610.     bMedia:             Byte;
  2611.     usSectorsPerFAT:    SmallWord;
  2612.     usSectorsPerTrack:  SmallWord;
  2613.     cHeads:             SmallWord;
  2614.     cHiddenSectors:     ULong;
  2615.     cLargeSectors:      ULong;
  2616.     abReserved: array[0..5] of Byte;
  2617.     cCylinders:         SmallWord;
  2618.     bDeviceType:        Byte;
  2619.     fsDeviceAttr:       SmallWord;
  2620.   end;
  2621.  
  2622.   PScreenGroup = ^ScreenGroup;
  2623.   ScreenGroup = record
  2624.     idScreenGrp: SmallWord;
  2625.     fTerminate:  SmallWord;
  2626.   end;
  2627.  
  2628.   PFrame = ^Frame;
  2629.   Frame = record
  2630.     bCharsPerLine: Byte;
  2631.     bLinesPerInch: Byte;
  2632.   end;
  2633.  
  2634.   PKbdType = ^KbdType;
  2635.   KbdType = record
  2636.     usType:    SmallWord;
  2637.     reserved1: SmallWord;
  2638.     reserved2: SmallWord;
  2639.   end;
  2640.  
  2641.   PLineControl = ^LineControl;
  2642.   LineControl = record
  2643.     bDataBits:   Byte;
  2644.     bParity:     Byte;
  2645.     bStopBits:   Byte;
  2646.     fTransBreak: Byte;
  2647.   end;
  2648.  
  2649. { ModemStatus.fbModemOn, async_GetModemOutput }
  2650. const
  2651.   dtr_On                        = $01;
  2652.   rts_On                        = $02;
  2653.  
  2654. { ModemStatus.fbModemOff }
  2655.   dtr_Off                       = $FE;
  2656.   rts_Off                       = $FD;
  2657.  
  2658. type
  2659.   PModemStatus = ^ModemStatus;
  2660.   ModemStatus = record
  2661.     fbModemOn:  Byte;
  2662.     fbModemOff: Byte;
  2663.   end;
  2664.  
  2665.   PTrackFormat = ^TrackFormat;
  2666.   TrackFormat = record
  2667.     bCommand:   Byte;
  2668.     usHead:     SmallWord;
  2669.     usCylinder: SmallWord;
  2670.     usReserved: SmallWord;
  2671.     cSectors:   SmallWord;
  2672.     FormatTable: array [0..0] of record
  2673.       bCylinder:    Byte;
  2674.       bHead:        Byte;
  2675.       idSector:     Byte;
  2676.       bBytesSector: Byte;
  2677.     end;
  2678.   end;
  2679.  
  2680.   PRxQueue = ^RxQueue;
  2681.   RxQueue = record
  2682.     cch: SmallWord;
  2683.     cb:  SmallWord;
  2684.   end;
  2685.  
  2686.   PDeviceParameterBlock = ^DeviceParameterBlock;
  2687.   DeviceParameterBlock = record
  2688.     reserved1:        SmallWord;
  2689.     cCylinders:       SmallWord;
  2690.     cHeads:           SmallWord;
  2691.     cSectorsPerTrack: SmallWord;
  2692.     reserved2:        SmallWord;
  2693.     reserved3:        SmallWord;
  2694.     reserved4:        SmallWord;
  2695.     reserved5:        SmallWord;
  2696.   end;
  2697.  
  2698.   PPtrDrawFunction = ^PtrDrawFunction;
  2699.   PtrDrawFunction = record
  2700.     usReturnCode:     SmallWord;
  2701.     pfnDraw:          PFn;
  2702.     pchDataSeg:       PChar;
  2703.   end;
  2704.  
  2705.   PPtrDrawAddress = ^PtrDrawAddress;
  2706.   PtrDrawAddress = record
  2707.     reserved: SmallWord;
  2708.     ptrdfnc:  PtrDrawFunction;
  2709.   end;
  2710.  
  2711.   PShiftState = ^ShiftState;
  2712.   ShiftState = record
  2713.     fsState: SmallWord;
  2714.     fNLS:    Byte;
  2715.   end;
  2716.  
  2717. { HotKey.fsHotKey/ShiftState.fsState }
  2718. const
  2719.   RightShift                    = $0001;
  2720.   LeftShift                     = $0002;
  2721.   Control                       = $0004;
  2722.   Alt                           = $0008;
  2723.   ScrollLock_On                 = $0010;
  2724.   NumLock_On                    = $0020;
  2725.   CapsLock_On                   = $0040;
  2726.   Insert_On                     = $0080;
  2727.   LeftControl                   = $0100;
  2728.   LeftAlt                       = $0200;
  2729.   RightControl                  = $0400;
  2730.   RightAlt                      = $0800;
  2731.   ScrollLock                    = $1000;
  2732.   NumLock                       = $2000;
  2733.   CapsLock                      = $4000;
  2734.   SysReq                        = $8000;
  2735.  
  2736. type
  2737.   PHotKey = ^HotKey;
  2738.   HotKey = record
  2739.     fsHotKey:         SmallWord;
  2740.     uchScancodeMake:  Byte;
  2741.     uchScancodeBreak: Byte;
  2742.     idHotKey:         SmallWord;
  2743.   end;
  2744.  
  2745.   PMonitorPosition = ^MonitorPosition;
  2746.   MonitorPosition = record
  2747.     fPosition: SmallWord;
  2748.     index:     SmallWord;
  2749.     pbInBuf:   ULong;
  2750.     offOutBuf: SmallWord;
  2751.   end;
  2752.  
  2753.   PRateDelay = ^RateDelay;
  2754.   RateDelay = record
  2755.     usDelay: SmallWord;
  2756.     usRate:  SmallWord;
  2757.   end;
  2758.  
  2759.   PCodePageInfo = ^CodePageInfo;
  2760.   CodePageInfo = record
  2761.     pbTransTable: Pointer;
  2762.     idCodePage:   SmallWord;
  2763.     idTable:      SmallWord;
  2764.   end;
  2765.  
  2766.   PCpId = ^CpId;
  2767.   CpId = record
  2768.     idCodePage: SmallWord;
  2769.     Reserved:   SmallWord;
  2770.   end;
  2771.  
  2772.   PLdtAddrInfo = ^LdtAddrInfo;
  2773.   LdtAddrInfo = record
  2774.     pulPhysAddr: PULong;
  2775.     cb:          SmallWord;
  2776.   end;
  2777.  
  2778.   PPtrDrawData = ^PtrDrawData;
  2779.   PtrDrawData = record
  2780.     cb:       SmallWord;
  2781.     usConfig: SmallWord;
  2782.     usFlag:   SmallWord;
  2783.   end;
  2784.  
  2785. { ScreenDd IoCtl definitions  }
  2786. const
  2787.   screendd_GetCurrentBank       = $00;   { Get current bank }
  2788.   screendd_SetCurrentBank       = $01;   { Set current bank }
  2789.   screendd_Svga_Id              = $08;   { Get SVGA info IOCTL }
  2790.   screendd_Svga_Oem             = $09;   { Get OEM info IOCTL }
  2791.   screendd_UpdateMemory         = $0A;   { Update Memory    IoCtl }
  2792.   screendd_GetLinearAccess      = $0B;   { GetLinearAccess  IoCtl }
  2793.   screendd_GetGlobalAccess      = $0C;   { GetGlobalAccess  IoCtl }
  2794.   screendd_FreeGlobalAccess     = $0D;   { FreeGlobalAccess IoCtl }
  2795.   screendd_Register_Ring0_Caller = $0E;  { Register VVID as Ring0 PMI caller }
  2796.   screendd_Wait_On_Ring0_Caller = $0F;   { Wait for RING0 caller to register }
  2797.   screendd_Category             = $80;
  2798.   screendd_Name                 = 'SCREEN$';
  2799.  
  2800.   getlinear_Flag_MapPhysical    = $00000010;
  2801.   getlinear_Flag_MapProcess     = $00000020;
  2802.   getlinear_Flag_MapShared      = $00000400;
  2803.   getlinear_Flag_MapAttach      = $80000000;
  2804.  
  2805.   Ega_Bit                       = 4;
  2806.   Vga_Bit                       = 8;
  2807.   EgaVga_Bit                    = Ega_Bit+Vga_Bit;
  2808.  
  2809. { screendd_GetLinearAccess }
  2810. type
  2811.   PGetLinIoCtlData = ^GetLinIoCtlData;
  2812.   GetLinIoCtlData = record
  2813.     PacketLength:    ULong;
  2814.     PhysicalAddress: ULong;
  2815.     ApertureSize:    ULong;
  2816.     LinearAddress:   Pointer;
  2817.     LinearFlags:     ULong;
  2818.   end;
  2819.  
  2820. {  screendd_SetCurrentBank/GetCurrentBank }
  2821.  
  2822. PBankInfo = ^BankInfo;
  2823. BankInfo = record
  2824.   ulBankLength:    ULong;
  2825.   usBank:          SmallWord;
  2826.   usVideoModeType: SmallWord;
  2827.   usReadWriteMode: SmallWord;
  2828. end;
  2829.  
  2830. const
  2831.   read_Bank                     = 0;
  2832.   write_Bank                    = 1;
  2833.   mode_Text                     = 0;
  2834.   mode_Planar                   = 1;
  2835.   mode_Linear                   = 2;
  2836.  
  2837. { screendd_GetGlobalAccess }
  2838. type
  2839.   PGlobalIoCtlData = ^GlobalIoCtlData;
  2840.   GlobalIoCtlData = record
  2841.     ProcessAddress: ULong;
  2842.     AddressLength:  ULong;
  2843.     GlobalAddress:  ULong;
  2844.   end;
  2845.  
  2846. { data packet for screendd_Svga_Id }
  2847.   POemSvgaInfo = ^OemSvgaInfo;
  2848.   OemSvgaInfo = record
  2849.     AdapterType: SmallWord;
  2850.     ChipType:    SmallWord;
  2851.     Memory:      ULong;
  2852.   end;
  2853.  
  2854. { data packet for screendd_Svga_Oem }
  2855.  
  2856. { OEM data packet format must contain total length in bytes as its first Word. }
  2857. { The rest of it can be in manufacturer/adapter specific format. }
  2858.  
  2859.   POemInfo = ^OemInfo;
  2860.   OemInfo = record
  2861.     OEMLength:        ULong;
  2862.     Manufacturer:     SmallWord;
  2863.     ManufacturerData: ULong;
  2864.   end;
  2865.  
  2866. { paramter packet for GetGlobalAccess }
  2867.  
  2868.   PGetGlobalPacket = ^GetGlobalPacket;
  2869.   GetGlobalPacket = record
  2870.     GlobalPktLength: ULong;
  2871.     GlobalPktData: array[0..0] of GlobalIoCtlData;
  2872.   end;
  2873.  
  2874. function DosPhysicalDisk(Func: ULong; Buf: Pointer; cbBuf: ULong; Params: Pointer;
  2875.   cbParams: ULong): ApiRet;
  2876.  
  2877. const
  2878.   info_Count_Partitionable_Disks = 1;   { # of partitionable disks }
  2879.   info_GetIoctlHandle            = 2;   { Obtain handle            }
  2880.   info_FreeIoctlHandle           = 3;   { Release handle           }
  2881.  
  2882. { DosNamedPipes API Support }
  2883. { Data structures used with named pipes }
  2884.  
  2885. type
  2886.   PHPipe = ^HPipe;
  2887.   HPipe  = LHandle;
  2888.  
  2889.   PAvailData = ^AvailData;
  2890.   AvailData = record
  2891.     cbpipe:    SmallWord;               { bytes left in the pipe }
  2892.     cbmessage: SmallWord;               { bytes left in the current message }
  2893.   end;
  2894.  
  2895.   PPipeInfo = ^PipeInfo;
  2896.   PipeInfo = record
  2897.     cbOut:     SmallWord;          { length of outgoing I/O buffer }
  2898.     cbIn:      SmallWord;          { length of incoming I/O buffer }
  2899.     cbMaxInst: Byte;               { maximum number of instances   }
  2900.     cbCurInst: Byte;               { current number of instances   }
  2901.     cbName:    Byte;               { length of pipe name           }
  2902.     szName: array [0..0] of Char;  { start of name                 }
  2903.   end;
  2904.  
  2905.   PPipeSemState = ^PipeSemState;
  2906.   PipeSemState = record
  2907.     fStatus: Byte;          { type of record, 0 = EOI, 1 = read ok, }
  2908.                             { 2 = write ok, 3 = pipe closed         }
  2909.     fFlag:   Byte;          { additional info, 01 = waiting thread  }
  2910.     usKey:   SmallWord;     { user's key value                      }
  2911.     usAvail: SmallWord;     { available data/space if status = 1/2  }
  2912.   end;
  2913.  
  2914. const
  2915.   np_Indefinite_Wait            = -1;
  2916.   np_Default_Wait               =  0;
  2917. { DosPeekNmPipe pipe states }
  2918.   np_State_Disconnected         = $0001;
  2919.   np_State_Listening            = $0002;
  2920.   np_State_Connected            = $0003;
  2921.   np_State_Closing              = $0004;
  2922. { DosCreateNPipe open modes }
  2923.   np_Access_InBound             = $0000;
  2924.   np_Access_OutBound            = $0001;
  2925.   np_Access_Duplex              = $0002;
  2926.   np_Inherit                    = $0000;
  2927.   np_NoInherit                  = $0080;
  2928.   np_WriteBehind                = $0000;
  2929.   np_NoWriteBehind              = $4000;
  2930. { DosCreateNPipe and DosQueryNPHState state }
  2931.   np_ReadMode_Byte              = $0000;
  2932.   np_ReadMode_Message           = $0100;
  2933.   np_Type_Byte                  = $0000;
  2934.   np_Type_Message               = $0400;
  2935.   np_End_Client                 = $0000;
  2936.   np_End_Server                 = $4000;
  2937.   np_Wait                       = $0000;
  2938.   np_NoWait                     = $8000;
  2939.   np_UnLimited_Instances        = $00FF;
  2940.  
  2941. function DosCallNPipe(Name: PChar; var InBuf; cbIn: ULong; var OutBuf;
  2942.   cbOut: ULong; var cbActual: ULong; MSec: ULong): ApiRet;
  2943. function DosConnectNPipe(Pipe: HPipe): ApiRet;
  2944. function DosDisConnectNPipe(Pipe: HPipe): ApiRet;
  2945. function DosCreateNPipe(Name: PChar; var Pipe: HPipe; OpenMode,PipeMode,cbInBuf,cbOutbuf,MSec: ULong): ApiRet;
  2946. function DosPeekNPipe(Pipe: HPipe; var Buf; cbBuf: ULong; var cbActual: ULong;
  2947.   var Avail: AvailData; var State: ULong): ApiRet;
  2948. function DosQueryNPHState(Pipe: HPipe; var State: ULong): ApiRet;
  2949. function DosQueryNPipeInfo(Pipe: HPipe; InfoLevel: ULong; var Buf; cbBuf: ULong): ApiRet;
  2950. function DosQueryNPipeSemState(Sem: HSem; var NpSS: PipeSemState; cbBuf: ULong): ApiRet;
  2951. function DosRawReadNPipe(Name: PChar; cb: ULong; var Len: ULong; var Buf): ApiRet;
  2952. function DosRawWriteNPipe(Name: PChar; cb: ULong): ApiRet;
  2953. function DosSetNPHState(Pipe: HPipe; State: ULong): ApiRet;
  2954. function DosSetNPipeSem(Pipe: HPipe; Sem: HSem; Key: ULong): ApiRet;
  2955. function DosTransactNPipe(Pipe: HPipe; var OutBuf; cbOut: ULong; var InBuf;
  2956.   cbIn: ULong; cbRead: ULong): ApiRet;
  2957. function DosWaitNPipe(Name: PChar; MSec: ULong): ApiRet;
  2958.  
  2959. { values in fStatus }
  2960. const
  2961.   npss_EOI                      = 0;    { End Of Information    }
  2962.   npss_RData                    = 1;    { read data available   }
  2963.   npss_WSpace                   = 2;    { write space available }
  2964.   npss_Close                    = 3;    { pipe in Closing state }
  2965.  
  2966. { values in npss_flag }
  2967.   npss_Wait                     = $01;  { waiting thread on end of pipe }
  2968. { defined bits in pipe mode }
  2969.   np_NBlk                       = $8000;{ non-blocking read/write }
  2970.   np_Server                     = $4000;{ set if server end       }
  2971.   np_WMesg                      = $0400;{ write messages          }
  2972.   np_RMesg                      = $0100;{ read as messages        }
  2973.   np_ICount                     = $00FF;{ instance count field    }
  2974. { Named pipes may be in one of several states depending on the actions
  2975.   that have been taken on it by the server end and client end.  The
  2976.   following state/action table summarizes the valid state transitions:
  2977.   Current state           Action                  Next state
  2978.  
  2979.    <none>             server DosMakeNmPipe        DISCONNECTED
  2980.    DISCONNECTED       server connect              LISTENING
  2981.    LISTENING          client open                 CONNECTED
  2982.    CONNECTED          server disconn              DISCONNECTED
  2983.    CONNECTED          client close                CLOSING
  2984.    CLOSING            server disconn              DISCONNECTED
  2985.    CONNECTED          server close                CLOSING
  2986.    <any other>        server close                <pipe deallocated>
  2987.  
  2988.   If a server disconnects his end of the pipe, the client end will enter a
  2989.   special state in which any future operations (except close) on the file
  2990.   descriptor associated with the pipe will return an error.
  2991. }
  2992.  
  2993. { Values for named pipe state }
  2994.   np_DisConnected               = 1;        { after pipe creation or Disconnect }
  2995.   np_Listening                  = 2;        { after DosNmPipeConnect            }
  2996.   np_Connected                  = 3;        { after Client open                 }
  2997.   np_Closing                    = 4;        { after Client or Server close      }
  2998. { DosProfile API support }
  2999. { Perfview API support   }
  3000. function DosTmrQueryFreq(var TmrFreq: ULong): ApiRet;
  3001. function DosTmrQueryTime(var TmrTime: QWord): ApiRet;
  3002. function DosRegisterPerfCtrs(DataBlk,TextBlk: Pointer; Flags: ULong): ApiRet;
  3003. { DosProfile ordinal number }
  3004. const
  3005.   prof_Ordinal                  = 133;
  3006. { DosProfile usType }
  3007.   prof_System                   = 0;
  3008.   prof_User                     = 1;
  3009.   prof_Usedd                    = 2;
  3010.   prof_Kernel                   = 4;
  3011.   prof_Verbose                  = 8;
  3012.   prof_Enable                   = 16;
  3013. { DosProfile usFunc }
  3014.   prof_Alloc                    = 0;
  3015.   prof_Clear                    = 1;
  3016.   prof_On                       = 2;
  3017.   prof_Off                      = 3;
  3018.   prof_Dump                     = 4;
  3019.   prof_Free                     = 5;
  3020. { DosProfile tic count granularity (DWord) }
  3021.   prof_Shift                    = 2;
  3022. { DosProfile module name string length }
  3023.   prof_Mod_Name_Size            = 10;
  3024. { DosProfile error code for end of data }
  3025.   prof_End_Of_Data              = 13;
  3026. { Virtual DOS Machine API support }
  3027. type
  3028.   PHVdd = ^HVdd;
  3029.   HVdd = LHandle;
  3030.  
  3031. function DosOpenVDD(VDD: PChar; var Vdd: HVdd): ApiRet;
  3032. function DosRequestVDD(VDD: HVdd; Sgid: Sgid; Cmd: ULong; cbInput: ULong;
  3033.   Input: Pointer; cbOutput: ULong; Output: Pointer): ApiRet;
  3034. function DosCloseVDD(Vdd: HVdd): ApiRet;
  3035. function DosQueryDOSProperty(Sgid: Sgid; Name: PChar; cb: ULong; pch: PChar): ApiRet;
  3036. function DosSetDOSProperty(gid: Sgid; Name: PChar; cb: ULong; pch: PChar): ApiRet;
  3037.  
  3038. function DosSuppressPopUps(Flag: ULong; Ch: Char): ApiRet;
  3039.  
  3040. { Undocumented OS/2 routines that perform pointer conversion    }
  3041. { NOTE: These routines can be called from BASM code only        }
  3042. { EXPECTS:      eax     = Source pointer value                  }
  3043. { RETURNS:      eax     = Converted pointer value               }
  3044. { Instead of calling these routines directly, use System unit   }
  3045. { procedures FlatToSel and SelToFlat, they will do it for you.  }
  3046.  
  3047. procedure DosFlatToSel;
  3048. procedure DosSelToFlat;
  3049.  
  3050.  
  3051. { Ordinal values for OS/2 API functions }
  3052.  
  3053. const
  3054.  
  3055. { ANSICALL }
  3056.  
  3057.   ord_AnsiInject                = 1;
  3058.   ord_AnsiKeyDef                = 2;
  3059.   ord_AnsiInterp                = 3;
  3060. { BDCALLS }
  3061.   ord_NlsConvertBidiNumerics    = 1;
  3062.   ord_NlsConvertBidiString      = 2;
  3063.   ord_NlsIntSetBidiAtt          = 3;
  3064.   ord_NlsIntQueryBidiAtt        = 4;
  3065.   ord_NlsSetBidiAtt             = 5;
  3066.   ord_NlsQueryBidiAtt           = 6;
  3067.   ord_NlsInverseString          = 7;
  3068.   ord_NlsSetBidiPrint           = 8;
  3069.   ord_NlsEditShape              = 9;
  3070.   ord_NlsShapeBidiString        = 10;
  3071.   ord_NlPopup                   = 11;
  3072. { BKSCALLS/BMSCALLS/BVSCALLS }
  3073.   ord_BksMain                   = 1;
  3074. { PMDRAG }
  3075.   ord_DrgAccessDragInfo         = 1;
  3076.   ord_DrgAddStrHandle           = 2;
  3077.   ord_DrgAllocDragInfo          = 3;
  3078.   ord_DrgAllocDragTransfer      = 4;
  3079.   ord_DrgDeleteDragInfoStrHandles = 5;
  3080.   ord_DrgDeleteStrHandle        = 6;
  3081.   ord_DrgDrag                   = 7;
  3082.   ord_DrgFreeDragInfo           = 8;
  3083.   ord_DrgFreeDragTransfer       = 9;
  3084.   ord_DrgGetPs                  = 10;
  3085.   ord_DrgPostTransferMsg        = 11;
  3086.   ord_DrgPushDragInfo           = 12;
  3087.   ord_DrgQueryDragItem          = 13;
  3088.   ord_DrgQueryDragItemCount     = 14;
  3089.   ord_DrgQueryDragItemPtr       = 15;
  3090.   ord_DrgQueryNativeRmf         = 16;
  3091.   ord_DrgQueryNativeRmfLen      = 17;
  3092.   ord_DrgQueryStrName           = 18;
  3093.   ord_DrgQueryStrNameLen        = 19;
  3094.   ord_DrgQueryTrueType          = 20;
  3095.   ord_DrgQueryTrueTypeLen       = 21;
  3096.   ord_DrgReleasePs              = 22;
  3097.   ord_DrgSendTransferMsg        = 23;
  3098.   ord_DrgSetDragPointer         = 24;
  3099.   ord_DrgSetDragImage           = 25;
  3100.   ord_DrgSetDragItem            = 26;
  3101.   ord_DrgVerifyNativeRmf        = 27;
  3102.   ord_DrgVerifyRmf              = 28;
  3103.   ord_DrgVerifyTrueType         = 29;
  3104.   ord_DrgVerifyType             = 30;
  3105.   ord_DrgVerifyTypeSet          = 31;
  3106.   ord_Drg32AccessDragInfo       = 32;
  3107.   ord_Drg32AddStrHandle         = 33;
  3108.   ord_Drg32AllocDragInfo        = 34;
  3109.   ord_Drg32AllocDragTransfer    = 35;
  3110.   ord_Drg32DeleteDragInfoStrHandles = 36;
  3111.   ord_Drg32DeleteStrHandle      = 37;
  3112.   ord_Drg32Drag                 = 38;
  3113.   ord_Drg32FreeDragInfo         = 39;
  3114.   ord_Drg32FreeDragTransfer     = 40;
  3115.   ord_Drg32GetPs                = 41;
  3116.   ord_Drg32PostTransferMsg      = 42;
  3117.   ord_Drg32PushDragInfo         = 43;
  3118.   ord_Drg32QueryDragItem        = 44;
  3119.   ord_Drg32QueryDragItemCount   = 45;
  3120.   ord_Drg32QueryDragItemPtr     = 46;
  3121.   ord_Drg32QueryNativeRmf       = 47;
  3122.   ord_Drg32QueryNativeRmfLen    = 48;
  3123.   ord_Drg32QueryStrName         = 49;
  3124.   ord_Drg32QueryStrNameLen      = 50;
  3125.   ord_Drg32QueryTrueType        = 51;
  3126.   ord_Drg32QueryTrueTypelen     = 52;
  3127.   ord_Drg32ReleasePs            = 53;
  3128.   ord_Drg32SendTransferMsg      = 54;
  3129.   ord_Drg32SetDragPointer       = 55;
  3130.   ord_Drg32SetDragImage         = 56;
  3131.   ord_Drg32SetDragItem          = 57;
  3132.   ord_Drg32VerifyNativeRmf      = 58;
  3133.   ord_Drg32VerifyRmf            = 59;
  3134.   ord_Drg32VerifyTrueType       = 60;
  3135.   ord_Drg32VerifyType           = 61;
  3136.   ord_Drg32VerifyTypeSet        = 62;
  3137.   ord_DrgDragFiles              = 63;
  3138.   ord_DrgAcceptdroppedFiles     = 64;
  3139.   ord_Drg32DragFiles            = 65;
  3140.   ord_Drg32AcceptDroppedFiles   = 66;
  3141. { FKA }
  3142.   ord_FkaInit                   = 64;
  3143.   ord_QueryFkaDisplayDetails    = 65;
  3144.   ord_WinFkaWndProc             = 66;
  3145.   ord_WinLoadFka                = 67;
  3146.   ord_WinCreateFKA              = 68;
  3147.   ord_WinSetFkaForm             = 69;
  3148.   ord_WinQueryFkaForm           = 70;
  3149.   ord_WinGotoFka                = 71;
  3150.   ord_WinGoFromFka              = 72;
  3151. { HELPMGR }
  3152.   ord_WinCreateHelpInstance     = 1;
  3153.   ord_WinDestroyHelpInstance    = 2;
  3154.   ord_WinQueryHelpInstance      = 3;
  3155.   ord_WinAssociateHelpInstance  = 4;
  3156.   ord_WinLoadHelpTable          = 5;
  3157.   ord_WinCreateHelpTable        = 6;
  3158.   ord_Win32CreateHelpInstance   = 51;
  3159.   ord_Win32DestroyHelpInstance  = 52;
  3160.   ord_Win32QueryHelpInstance    = 53;
  3161.   ord_Win32AssociateHelpInstance= 54;
  3162.   ord_Win32LoadHelpTable        = 55;
  3163.   ord_Win32CreateHelpTable      = 56;
  3164.   ord_DdfInitialize             = 74;
  3165.   ord_DdfPara                   = 75;
  3166.   ord_DdfSetFormat              = 76;
  3167.   ord_DdfSetTextAlign           = 77;
  3168.   ord_DdfSetColor               = 78;
  3169.   ord_DdfInfoRm                 = 79;
  3170.   ord_DdfSetFontStyle           = 80;
  3171.   ord_DdfHyperText              = 81;
  3172.   ord_DdfBeginList              = 82;
  3173.   ord_DdfListItem               = 83;
  3174.   ord_DdfEndList                = 84;
  3175.   ord_DdfText                   = 85;
  3176.   ord_DdfMetaFile               = 86;
  3177.   ord_DdfSetFont                = 87;
  3178.   ord_DdfBitMap                 = 88;
  3179. { KBDCALLS }
  3180.   ord_KbdSetCusTxt              = 1;
  3181.   ord_KbdGetCP                  = 3;
  3182.   ord_KbdCharIn                 = 4;
  3183.   ord_KbdSetCP                  = 5;
  3184.   ord_KbdSynch                  = 7;
  3185.   ord_KbdRegister               = 8;
  3186.   ord_KbdStringIn               = 9;
  3187.   ord_KbdGetStatus              = 10;
  3188.   ord_KbdSetStatus              = 11;
  3189.   ord_KbdGetFocus               = 12;
  3190.   ord_KbdFlushBuffer            = 13;
  3191.   ord_KbdXlate                  = 14;
  3192.   ord_KbdClose                  = 17;
  3193.   ord_KbdFreeFocus              = 18;
  3194.   ord_KbdDeRegister             = 20;
  3195.   ord_KbdSetFgnd                = 21;
  3196.   ord_KbdPeek                   = 22;
  3197.   ord_KbdOpen                   = 23;
  3198.   ord_KbdGetHwId                = 24;
  3199.   ord_KbdSetHwId                = 25;
  3200. { MONCALLS }
  3201.   ord_DosMonWrite               = 1;
  3202.   ord_DosMonRead                = 2;
  3203.   ord_DosMonClose               = 3;
  3204.   ord_DosMonOpen                = 4;
  3205.   ord_DosMonReg                 = 5;
  3206. { MOUCALLS }
  3207.   ord_MouGetPtrShape            = 1;
  3208.   ord_MouSetPtrShape            = 2;
  3209.   ord_MouGetNumMicKeys          = 3;
  3210.   ord_MouGetHotKey              = 4;
  3211.   ord_MouGetScaleFact           = 6;
  3212.   ord_MouFlushQue               = 7;
  3213.   ord_MouGetNumButtons          = 8;
  3214.   ord_MouClose                  = 9;
  3215.   ord_MouSetHotKey              = 10;
  3216.   ord_MouSetScaleFact           = 11;
  3217.   ord_MouGetNumQueEl            = 13;
  3218.   ord_MouDeRegister             = 14;
  3219.   ord_MouGetEventMask           = 15;
  3220.   ord_MouSetEventMask           = 16;
  3221.   ord_MouOpen                   = 17;
  3222.   ord_MouRemovePtr              = 18;
  3223.   ord_MouGetPtrPos              = 19;
  3224.   ord_MouReadEventQue           = 20;
  3225.   ord_MouSetPtrPos              = 21;
  3226.   ord_MouGetDevStatus           = 22;
  3227.   ord_MouSynch                  = 23;
  3228.   ord_MouRegister               = 24;
  3229.   ord_MouSetDevStatus           = 25;
  3230.   ord_MouDrawPtr                = 26;
  3231.   ord_MouInitReal               = 27;
  3232.   ord_MouGetThreshold           = 29;
  3233.   ord_MouSetThreshold           = 30;
  3234. { MSG }
  3235.   ord_DosPutMessage             = 1;
  3236.   ord_DosTrueGetMessage         = 2;
  3237.   ord_DosInsMessage             = 3;
  3238.   ord_Dos32InsertMessage        = 4;
  3239.   ord_Dos32PutMessage           = 5;
  3240.   ord_Dos32TrueGetMessage       = 6;
  3241.   ord_DosIQueryMessageCP        = 7;
  3242.   ord_Dos32IQueryMessageCP      = 8;
  3243. { NLS }
  3244.   ord_DosCaseMap                = 1;
  3245.   ord_DosGetCollate             = 2;
  3246.   ord_DosGetCtryInfo            = 3;
  3247.   ord_DosGetDbcsEv              = 4;
  3248.   ord_Dos32QueryCtryInfo        = 5;
  3249.   ord_Dos32QueryDbcsEnv         = 6;
  3250.   ord_Dos32MapCase              = 7;
  3251.   ord_Dos32QueryCollate         = 8;
  3252. { NAMPIPES }
  3253.   ord_DosMakeNmPipe             = 1;
  3254.   ord_DosQNmPipeInfo            = 2;
  3255.   ord_DosConnectNmPipe          = 3;
  3256.   ord_DosDisConnectNmPipe       = 4;
  3257.   ord_DosQNmpHandState          = 5;
  3258.   ord_DosSetNmpHandState        = 6;
  3259.   ord_DosPeekNmPipe             = 7;
  3260.   ord_DosWaitNmPipe             = 8;
  3261.   ord_DosTransactNmPipe         = 9;
  3262.   ord_DosCallNMPipe             = 10;
  3263.   ord_DosRawReadNmPipe          = 11;
  3264.   ord_DosRawWriteNmPipe         = 12;
  3265.   ord_DosSetNmPipeSem           = 13;
  3266.   ord_DosQNmPipeSemState        = 14;
  3267. { DOSCALLS }
  3268.   ord_DosCWait                  = 2;
  3269.   ord_DosEnterCritSec           = 3;
  3270.   ord_DosExit                   = 5;
  3271.   ord_DosExitCritSec            = 6;
  3272.   ord_DosExitList               = 7;
  3273.   ord_DosGetInfoSeg             = 8;
  3274.   ord_DosGetPrty                = 9;
  3275.   ord_DosKillProcess            = 10;
  3276.   ord_DosSetPrty                = 11;
  3277.   ord_DosPTrace                 = 12;
  3278.   ord_DosHoldSignal             = 13;
  3279.   ord_DosSetSigHandler          = 14;
  3280.   ord_DosFlagProcess            = 15;
  3281.   ord_DosMakePipe               = 16;
  3282.   ord_DosSemSetWait             = 20;
  3283.   ord_DosMuxSemWait             = 22;
  3284.   ord_DosCloseSem               = 23;
  3285.   ord_DosCreateSem              = 24;
  3286.   ord_DosOpenSem                = 25;
  3287.   ord_DosResumeThread           = 26;
  3288.   ord_DosSUSPEndThread          = 27;
  3289.   ord_DosSetDateTime            = 28;
  3290.   ord_DosTimerAsync             = 29;
  3291.   ord_DosTimerStart             = 30;
  3292.   ord_DosTimerStop              = 31;
  3293.   ord_DosSleep                  = 32;
  3294.   ord_DosGetDateTime            = 33;
  3295.   ord_DosAllocSeg               = 34;
  3296.   ord_DosAllocShrSeg            = 35;
  3297.   ord_DosGetShrSeg              = 36;
  3298.   ord_DosGiveSeg                = 37;
  3299.   ord_DosReallocSeg             = 38;
  3300.   ord_DosFreeSeg                = 39;
  3301.   ord_DosAllocHuge              = 40;
  3302.   ord_DosGetHugeShift           = 41;
  3303.   ord_DosReallocHuge            = 42;
  3304.   ord_DosCreateCSAlias          = 43;
  3305.   ord_DosLoadModule             = 44;
  3306.   ord_DosGetProcAddr            = 45;
  3307.   ord_DosFreeModule             = 46;
  3308.   ord_DosGetModHandle           = 47;
  3309.   ord_DosGetModName             = 48;
  3310.   ord_DosGetMachineMode         = 49;
  3311.   ord_DosBeep                   = 50;
  3312.   ord_DosCLIAccess              = 51;
  3313.   ord_DosDevConfig              = 52;
  3314.   ord_DosDevIOCTL               = 53;
  3315.   ord_DosBufReset               = 56;
  3316.   ord_DosChDir                  = 57;
  3317.   ord_DosChgFilePtr             = 58;
  3318.   ord_DosClose                  = 59;
  3319.   ord_DosDelete                 = 60;
  3320.   ord_DosDupHandle              = 61;
  3321.   ord_DosFileLocks              = 62;
  3322.   ord_DosFindClose              = 63;
  3323.   ord_DosFindFirst              = 64;
  3324.   ord_DosFindNext               = 65;
  3325.   ord_DosMkDir                  = 66;
  3326.   ord_DosMove                   = 67;
  3327.   ord_DosNewSize                = 68;
  3328.   ord_DosPortAccess             = 69;
  3329.   ord_DosOpen                   = 70;
  3330.   ord_DosQCurDir                = 71;
  3331.   ord_DosQCurDisk               = 72;
  3332.   ord_DosQFHandState            = 73;
  3333.   ord_DosQFileInfo              = 74;
  3334.   ord_DosQFileMode              = 75;
  3335.   ord_DosQFSInfo                = 76;
  3336.   ord_DosQHandType              = 77;
  3337.   ord_DosQVerify                = 78;
  3338.   ord_DosRmDir                  = 80;
  3339.   ord_DosSelectDisk             = 81;
  3340.   ord_DosSetFHandState          = 82;
  3341.   ord_DosSetFileInfo            = 83;
  3342.   ord_DosSetFileMode            = 84;
  3343.   ord_DosSetMaxFH               = 85;
  3344.   ord_DosSetVerify              = 86;
  3345.   ord_DosSystemService          = 88;
  3346.   ord_DosSetVec                 = 89;
  3347.   ord_DosSysTrace               = 90;
  3348.   ord_DosGetEnv                 = 91;
  3349.   ord_DosGetVersion             = 92;
  3350.   ord_DosGetPID                 = 94;
  3351.   ord_DosOpen2                  = 95;
  3352.   ord_DosLIBInit                = 96;
  3353.   ord_DosSetFSInfo              = 97;
  3354.   ord_DosQPathInfo              = 98;
  3355.   ord_DosDevIOCTL2              = 99;
  3356.   ord_DosSetPathInfo            = 104;
  3357.   ord_DosISetRelMaxFH           = 108;
  3358.   ord_DosIDevIOCTL              = 109;
  3359.   ord_Dos32ForceDelete          = 110;
  3360.   ord_Dos32KillThread           = 111;
  3361.   ord_DosQueryRasInfo           = 112;
  3362.   ord_DosError                  = 120;
  3363.   ord_DosGetSeg                 = 121;
  3364.   ord_DosLockSeg                = 122;
  3365.   ord_DosUnLockSeg              = 123;
  3366.   ord_DosSizeSeg                = 126;
  3367.   ord_DosMemAvail               = 127;
  3368.   ord_DosPhysicalDisk           = 129;
  3369.   ord_DosGetCP                  = 130;
  3370.   ord_DosSendSignal             = 134;
  3371.   ord_DosHugeShift              = 135;
  3372.   ord_DosHugeIncr               = 136;
  3373.   ord_DosRead                   = 137;
  3374.   ord_DosWrite                  = 138;
  3375.   ord_DosErrClass               = 139;
  3376.   ord_DosSemRequest             = 140;
  3377.   ord_DosSemClear               = 141;
  3378.   ord_DosSemWait                = 142;
  3379.   ord_DosSemSet                 = 143;
  3380.   ord_DosExecPgm                = 144;
  3381.   ord_DosCreateThread           = 145;
  3382.   ord_DosSubSet                 = 146;
  3383.   ord_DosSubAlloc               = 147;
  3384.   ord_DosSubFree                = 148;
  3385.   ord_DosReadASync              = 149;
  3386.   ord_DosWriteAsync             = 150;
  3387.   ord_DosSearchPath             = 151;
  3388.   ord_DosScanEnv                = 152;
  3389.   ord_DosSetCP                  = 153;
  3390.   ord_DosGetResource            = 155;
  3391.   ord_DosGetPPID                = 156;
  3392.   ord_DosCallBack               = 157;
  3393.   ord_DosR2StackRealloc         = 160;
  3394.   ord_DosFSRamSemRequest        = 161;
  3395.   ord_DosFSRamSemClear          = 162;
  3396.   ord_DosQAppType               = 163;
  3397.   ord_DosSetProcCP              = 164;
  3398.   ord_DosDynamicTrace           = 165;
  3399.   ord_DosQSysInfo               = 166;
  3400.   ord_DosFsAttach               = 181;
  3401.   ord_DosQFsAttach              = 182;
  3402.   ord_DosFsCtl                  = 183;
  3403.   ord_DosFindFirst2             = 184;
  3404.   ord_DosMkDir2                 = 185;
  3405.   ord_DosFileIO                 = 186;
  3406.   ord_DosFindNotifyClose        = 187;
  3407.   ord_DosFindNotifyFirst        = 188;
  3408.   ord_DosFindNotifyNext         = 189;
  3409.   ord_DosEditName               = 191;
  3410.   ord_DosCopy                   = 201;
  3411.   ord_DosForceDelete            = 203;
  3412.   ord_DosEnumAttribute          = 204;
  3413.   ord_DosShutDown               = 206;
  3414.   ord_DosGetResource2           = 207;
  3415.   ord_DosFreeResource           = 208;
  3416.   ord_Dos32SetMaxFh             = 209;
  3417.   ord_Dos32SetVerify            = 210;
  3418.   ord_Dos32ErrClass             = 211;
  3419.   ord_Dos32Error                = 212;
  3420.   ord_DosMaxPathLen             = 214;
  3421.   ord_DosPageSize               = 215;
  3422.   ord_DosLocalInfo              = 216;
  3423.   ord_DosGlobalInfo             = 217;
  3424.   ord_Dos32SetFileInfo          = 218;
  3425.   ord_Dos32SetPathInfo          = 219;
  3426.   ord_Dos32SetDefaultDisk       = 220;
  3427.   ord_Dos32SetFHState           = 221;
  3428.   ord_Dos32SetFSInfo            = 222;
  3429.   ord_Dos32QueryPathInfo        = 223;
  3430.   ord_Dos32QueryHType           = 224;
  3431.   ord_Dos32QueryVerify          = 225;
  3432.   ord_Dos32DeleteDir            = 226;
  3433.   ord_Dos32ScanEnv              = 227;
  3434.   ord_Dos32SearchPath           = 228;
  3435.   ord_Dos32Sleep                = 229;
  3436.   ord_Dos32GetDateTime          = 230;
  3437.   ord_Dos32DevConfig            = 231;
  3438.   ord_Dos32EnterCritSec         = 232;
  3439.   ord_Dos32ExitCritSec          = 233;
  3440.   ord_Dos32Exit                 = 234;
  3441.   ord_Dos32KillProcess          = 235;
  3442.   ord_Dos32SetPriority          = 236;
  3443.   ord_Dos32ResumeThread         = 237;
  3444.   ord_Dos32SuspendThread        = 238;
  3445.   ord_Dos32CreatePipe           = 239;
  3446.   ord_Dos32CallNPipe            = 240;
  3447.   ord_Dos32ConnectNPipe         = 241;
  3448.   ord_Dos32DisconnectNPipe      = 242;
  3449.   ord_Dos32CreateNPipe          = 243;
  3450.   ord_Dos32PeekNPipe            = 244;
  3451.   ord_Dos32QueryNpHState        = 245;
  3452.   ord_Dos32RawReadNPipe         = 246;
  3453.   ord_Dos32RawWriteNPipe        = 247;
  3454.   ord_Dos32QueryNPipeInfo       = 248;
  3455.   ord_Dos32QueryNPipeSemState   = 249;
  3456.   ord_Dos32SetNpHState          = 250;
  3457.   ord_Dos32SetNPipeSem          = 251;
  3458.   ord_Dos32TransactNPipe        = 252;
  3459.   ord_Dos32WaitNPipe            = 253;
  3460.   ord_Dos32ResetBuffer          = 254;
  3461.   ord_Dos32SetCurrentDir        = 255;
  3462.   ord_Dos32SetFilePtr           = 256;
  3463.   ord_Dos32Close                = 257;
  3464.   ord_Dos32Copy                 = 258;
  3465.   ord_Dos32Delete               = 259;
  3466.   ord_Dos32DupHandle            = 260;
  3467.   ord_Dos32EditName             = 261;
  3468.   ord_Dos32FindClose            = 263;
  3469.   ord_Dos32FindFirst            = 264;
  3470.   ord_Dos32FindNext             = 265;
  3471.   ord_DosOpenVDD                = 266;
  3472.   ord_DosRequestVDD             = 267;
  3473.   ord_DosCloseVDD               = 268;
  3474.   ord_Dos32FsAttach             = 269;
  3475.   ord_Dos32CreateDir            = 270;
  3476.   ord_Dos32Move                 = 271;
  3477.   ord_Dos32SetFileSize          = 272;
  3478.   ord_Dos32Open                 = 273;
  3479.   ord_Dos32QueryCurrentDir      = 274;
  3480.   ord_Dos32QueryCurrentDisk     = 275;
  3481.   ord_Dos32QueryFHState         = 276;
  3482.   ord_Dos32QueryFSAttach        = 277;
  3483.   ord_Dos32QueryFSInfo          = 278;
  3484.   ord_Dos32QueryFileInfo        = 279;
  3485.   ord_Dos32WaitChild            = 280;
  3486.   ord_Dos32Read                 = 281;
  3487.   ord_Dos32Write                = 282;
  3488.   ord_Dos32ExecPgm              = 283;
  3489.   ord_Dos32DevIOCTL             = 284;
  3490.   ord_Dos32FsCtl                = 285;
  3491.   ord_Dos32Beep                 = 286;
  3492.   ord_Dos32PhysicalDisk         = 287;
  3493.   ord_Dos32SetCP                = 288;
  3494.   ord_Dos32SetProcessCP         = 289;
  3495.   ord_Dos32StopTimer            = 290;
  3496.   ord_Dos32QueryCP              = 291;
  3497.   ord_Dos32SetDateTime          = 292;
  3498.   ord_Dos32ExitList             = 296;
  3499.   ord_Dos32AllocMem             = 299;
  3500.   ord_Dos32AllocSharedMem       = 300;
  3501.   ord_Dos32GetNamedSharedMem    = 301;
  3502.   ord_Dos32GetSharedMem         = 302;
  3503.   ord_Dos32GiveSharedMem        = 303;
  3504.   ord_Dos32FreeMem              = 304;
  3505.   ord_Dos32SetMem               = 305;
  3506.   ord_Dos32QueryMem             = 306;
  3507.   ord_Dos32OpenVDD              = 308;
  3508.   ord_Dos32RequestVDD           = 309;
  3509.   ord_Dos32CloseVDD             = 310;
  3510.   ord_Dos32CreateThread         = 311;
  3511.   ord_Dos32GetInfoBlocks        = 312;
  3512.   ord_Dos32DynamicTrace         = 316;
  3513.   ord_Dos32Debug                = 317;
  3514.   ord_Dos32LoadModule           = 318;
  3515.   ord_Dos32QueryModuleHandle    = 319;
  3516.   ord_Dos32QueryModuleName      = 320;
  3517.   ord_Dos32QueryProcAddr        = 321;
  3518.   ord_Dos32FreeModule           = 322;
  3519.   ord_Dos32QueryAppType         = 323;
  3520.   ord_Dos32CreateEventSem       = 324;
  3521.   ord_Dos32OpenEventSem         = 325;
  3522.   ord_Dos32CloseEventSem        = 326;
  3523.   ord_Dos32ResetEventSem        = 327;
  3524.   ord_Dos32PostEventSem         = 328;
  3525.   ord_Dos32WaitEventSem         = 329;
  3526.   ord_Dos32QueryEventSem        = 330;
  3527.   ord_Dos32CreateMutexSem       = 331;
  3528.   ord_Dos32OpenMutexSem         = 332;
  3529.   ord_Dos32CloseMutexSem        = 333;
  3530.   ord_Dos32RequestMutexSem      = 334;
  3531.   ord_Dos32ReleaSeMutexSem      = 335;
  3532.   ord_Dos32QueryMutexSem        = 336;
  3533.   ord_Dos32CreateMuxWaitSem     = 337;
  3534.   ord_Dos32OpenMuxWaitSem       = 338;
  3535.   ord_Dos32CloseMuxWaitSem      = 339;
  3536.   ord_Dos32WaitMuxWaitSem       = 340;
  3537.   ord_Dos32AddMuxWaitSem        = 341;
  3538.   ord_Dos32DeleteMuxWaitSem     = 342;
  3539.   ord_Dos32QueryMuxWaitSem      = 343;
  3540.   ord_Dos32SubSetMem            = 344;
  3541.   ord_Dos32SubAllocMem          = 345;
  3542.   ord_Dos32SubFreeMem           = 346;
  3543.   ord_Dos32SubUnsetMem          = 347;
  3544.   ord_Dos32QuerySysInfo         = 348;
  3545.   ord_Dos32WaitThread           = 349;
  3546.   ord_Dos32AsyncTimer           = 350;
  3547.   ord_Dos32StartTimer           = 351;
  3548.   ord_Dos32GetResource          = 352;
  3549.   ord_Dos32FreeResource         = 353;
  3550.   ord_Dos32SetExceptionHandler  = 354;
  3551.   ord_Dos32UnsetExceptionHandler= 355;
  3552.   ord_Dos32RaiseException       = 356;
  3553.   ord_Dos32UnwindException      = 357;
  3554.   ord_Dos32TmrQueryFreq         = 362;
  3555.   ord_Dos32TmrQueryTime         = 363;
  3556.   ord_Dos32RegisterPerfctRs     = 367;
  3557.   ord_Dos32EnumAttribute        = 372;
  3558.   ord_Dos32QueryDosProperty     = 373;
  3559.   ord_Dos32SetDosProperty       = 374;
  3560.   ord_DosQueryDosProperty       = 375;
  3561.   ord_DosSetDosProperty         = 376;
  3562.   ord_Dos32ProFile              = 377;
  3563.   ord_Dos32SetSignalExceptionFocus = 378;
  3564.   ord_Dos32SendSignalException  = 379;
  3565.   ord_Dos32EnterMustComplete    = 380;
  3566.   ord_Dos32ExitMustComplete     = 381;
  3567.   ord_Dos32SetRelMaxFh          = 382;
  3568.   ord_Dos32ShutDown             = 415;
  3569.   ord_Dos32ReplaceModule        = 417;
  3570.   ord_Dos32AcknowledgeSignalException = 418;
  3571.   ord_Dos32TIB                  = 419;
  3572.   ord_DosTmrQueryFreq           = 420;
  3573.   ord_DosTmrQueryTime           = 421;
  3574.   ord_DosRegisterPerfctRs       = 422;
  3575.   ord_DosFlatToSel              = 423;
  3576.   ord_DosSelToFlat              = 424;
  3577.   ord_Dos32FlatToSel            = 425;
  3578.   ord_Dos32SelToFlat            = 426;
  3579.   ord_Dos32SetFileLocks         = 428;
  3580.   ord_Dos32CancelLockRequest    = 429;
  3581.   ord_DosOpenChangeNotify       = 437;
  3582.   ord_DosRESetChangeNotify      = 438;
  3583.   ord_DosCloseChangeNotify      = 439;
  3584.   ord_Dos32OpenChangeNotify     = 440;
  3585.   ord_Dos32RESetChangeNotify    = 441;
  3586.   ord_Dos32CloseChangeNotify    = 442;
  3587.   ord_Dos32AllocThreadLocalMemory= 454;
  3588.   ord_Dos32FreeThreadLocalMemory = 455;
  3589.   ord_Dos32QueryResourceSize    = 572;
  3590.   ord_DosQueryResourceSize      = 573;
  3591.   ord_Dos32InitializePortHole   = 580;
  3592.   ord_Dos32QueryHeaderInfo      = 582;
  3593.   ord_DosInitializePortHole     = 583;
  3594.   ord_DosQueryHeaderInfo        = 584;
  3595.   ord_Dos32QueryProcType        = 586;
  3596.   ord_DosQueryProcType          = 587;
  3597.   ord_Dos32SetExtLibpath        = 873;
  3598.   ord_Dos32QueryExtLibpath      = 874;
  3599.   ord_DosSetExtLibpath          = 998;
  3600.   ord_DosQueryExtLibpath        = 999;
  3601. { PMGPI }
  3602.   ord_DevOpendC                 = 1;
  3603.   ord_DevCloseDC                = 2;
  3604.   ord_DevPostDeviceModes        = 3;
  3605.   ord_DevESCAPE                 = 4;
  3606.   ord_DevQueryHardCopyCaps      = 5;
  3607.   ord_DevQueryCaps              = 6;
  3608.   ord_GpiCreatePS               = 7;
  3609.   ord_GpiQueryPS                = 9;
  3610.   ord_GpiDestroyPS              = 10;
  3611.   ord_GpiResetPS                = 11;
  3612.   ord_GpiSavePS                 = 12;
  3613.   ord_GpiRestorePS              = 13;
  3614.   ord_GpiAssociate              = 14;
  3615.   ord_GpiErrorSegmentData       = 15;
  3616.   ord_GpiErase                  = 16;
  3617.   ord_GpiSetDrawControl         = 17;
  3618.   ord_GpiQueryDrawControl       = 18;
  3619.   ord_GpiDrawChain              = 19;
  3620.   ord_GpiDrawFROM               = 20;
  3621.   ord_GpiDrawSegment            = 21;
  3622.   ord_GpiSetStopDraw            = 22;
  3623.   ord_GpiQueryStopDraw          = 23;
  3624.   ord_GpiRemoveDynamics         = 24;
  3625.   ord_GpiDrawDynamics           = 25;
  3626.   ord_GpiSetDrawinGMode         = 26;
  3627.   ord_GpiQueryDrawinGMode       = 27;
  3628.   ord_GpiGetData                = 28;
  3629.   ord_GpiPutData                = 29;
  3630.   ord_GpiSetPickApertureSize    = 30;
  3631.   ord_GpiQueryPickApertureSize  = 31;
  3632.   ord_GpiSetPickAperturePosition= 32;
  3633.   ord_GpiQueryPickAperturePosition=33;
  3634.   ord_GpiSetTag                 = 34;
  3635.   ord_GpiQueryTag               = 35;
  3636.   ord_GpiCorrelateChain         = 36;
  3637.   ord_GpiCorrelateFrom          = 37;
  3638.   ord_GpiCorrelateSegment       = 38;
  3639.   ord_GpiResetBoundaryData      = 42;
  3640.   ord_GpiQueryBoundaryData      = 43;
  3641.   ord_GpiOpenSegment            = 44;
  3642.   ord_GpiCloseSegment           = 46;
  3643.   ord_GpiDeleteSegment          = 47;
  3644.   ord_GpiDeleteSegments         = 48;
  3645.   ord_GpiQuerySegmentNames      = 49;
  3646.   ord_GpiSetInitialSegmentAttrs = 51;
  3647.   ord_GpiQueryInitialSegmentAttrs=52;
  3648.   ord_GpiSetSegmentAttrs        = 53;
  3649.   ord_GpiQuerySegmentAttrs      = 54;
  3650.   ord_GpiSetSegmentPriority     = 55;
  3651.   ord_GpiQuerySegmentPriority   = 56;
  3652.   ord_GpiSetEditMode            = 57;
  3653.   ord_GpiQueryEditMode          = 58;
  3654.   ord_GpiSetElementPointer      = 59;
  3655.   ord_GpiQueryElementPointer    = 60;
  3656.   ord_GpiOffsetElementPointer   = 61;
  3657.   ord_GpiDeleteElement          = 62;
  3658.   ord_GpiDeleteElementRange     = 63;
  3659.   ord_GpiLabel                  = 64;
  3660.   ord_GpiSetElementPointerAtLabel=65;
  3661.   ord_GpiDeleteElementsBetweenLabels=66;
  3662.   ord_GpiQueryElementType       = 67;
  3663.   ord_GpiQueryElement           = 68;
  3664.   ord_GpiElement                = 69;
  3665.   ord_GpiBeginElement           = 70;
  3666.   ord_GpiEndElement             = 71;
  3667.   ord_GpiSetSegmentTransformMatrix= 78;
  3668.   ord_GpiQuerySegmentTransformMatrix=79;
  3669.   ord_GpiSetModelTransformMatrix= 80;
  3670.   ord_GpiQueryModelTransformMatrix=81;
  3671.   ord_GpiCallSegmentMatrix      = 82;
  3672.   ord_GpiSetDefaultViewMatrix   = 83;
  3673.   ord_GpiQueryDefaultViewMatrix = 84;
  3674.   ord_GpiSetPageViewPort        = 85;
  3675.   ord_GpiQueryPageViewPort      = 86;
  3676.   ord_GpiSetViewinGTransformMatrix=87;
  3677.   ord_GpiQueryViewinGTransformMatrix=88;
  3678.   ord_GpiSetGraphicsField       = 89;
  3679.   ord_GpiQueryGraphicsField     = 90;
  3680.   ord_GpiSetViewInGLimits       = 91;
  3681.   ord_GpiQueryViewInGLimits     = 92;
  3682.   ord_GpiConvert                = 93;
  3683.   ord_GpiSetAttrMode            = 94;
  3684.   ord_GpiQueryAttrMode          = 95;
  3685.   ord_GpiPop                    = 96;
  3686.   ord_GpiSetAttrs               = 97;
  3687.   ord_GpiQueryAttrs             = 98;
  3688.   ord_GpiCreateLogColorTable    = 99;
  3689.   ord_GpiRealizeColorTable      = 100;
  3690.   ord_GpiUnrealizeColorTable    = 101;
  3691.   ord_GpiQueryColorData         = 102;
  3692.   ord_GpiQueryLogColorTable     = 103;
  3693.   ord_GpiQueryRealColors        = 104;
  3694.   ord_GpiQueryNearestColor      = 105;
  3695.   ord_GpiQueryColorIndex        = 106;
  3696.   ord_GpiQueryRGBColor          = 107;
  3697.   ord_GpiSetColor               = 108;
  3698.   ord_GpiQueryColor             = 109;
  3699.   ord_GpiSetBackColor           = 110;
  3700.   ord_GpiQueryBackColor         = 111;
  3701.   ord_GpiSetMix                 = 112;
  3702.   ord_GpiQueryMix               = 113;
  3703.   ord_GpiSetBackMix             = 114;
  3704.   ord_GpiQueryBackMix           = 115;
  3705.   ord_GpiSetLineType            = 116;
  3706.   ord_GpiQueryLineType          = 117;
  3707.   ord_GpiSetLineWidth           = 118;
  3708.   ord_GpiQueryLineWidth         = 119;
  3709.   ord_GpiSetLineWidthGeom       = 120;
  3710.   ord_GpiQueryLineWidthGeom     = 121;
  3711.   ord_GpiSetLineEnd             = 122;
  3712.   ord_GpiQueryLineEnd           = 123;
  3713.   ord_GpiSetLineJoin            = 124;
  3714.   ord_GpiQueryLineJoin          = 125;
  3715.   ord_GpiSetCurrentPosition     = 126;
  3716.   ord_GpiQueryCurrentPosition   = 127;
  3717.   ord_GpiMove                   = 128;
  3718.   ord_GpiLine                   = 129;
  3719.   ord_GpiPolyLine               = 130;
  3720.   ord_GpiBox                    = 131;
  3721.   ord_GpiPtVisible              = 132;
  3722.   ord_GpiRectVisible            = 133;
  3723.   ord_GpiSetArcParams           = 134;
  3724.   ord_GpiQueryArcParams         = 135;
  3725.   ord_GpiPointArc               = 136;
  3726.   ord_GpiFullArc                = 137;
  3727.   ord_GpiPartialArc             = 138;
  3728.   ord_GpiPolyFillet             = 139;
  3729.   ord_GpiPolyFilletSharp        = 140;
  3730.   ord_GpiPolySPLine             = 141;
  3731.   ord_GpiSetBitMapId            = 142;
  3732.   ord_GpiQueryBitMapHandle      = 143;
  3733.   ord_GpiSetPatternSet          = 144;
  3734.   ord_GpiQueryPatternSet        = 145;
  3735.   ord_GpiSetPattern             = 146;
  3736.   ord_GpiQueryPattern           = 147;
  3737.   ord_GpiSetPatternREFPoint     = 148;
  3738.   ord_GpiQueryPatternREFPoint   = 149;
  3739.   ord_GpiBeginArea              = 150;
  3740.   ord_GpiEndArea                = 151;
  3741.   ord_GpiLoadFonts              = 152;
  3742.   ord_GpiUnloadFonts            = 153;
  3743.   ord_GpiCreateLogFont          = 154;
  3744.   ord_GpiDeleteSetId            = 155;
  3745.   ord_GpiQueryNumberSetIDS      = 156;
  3746.   ord_GpiQuerySetIds            = 157;
  3747.   ord_GpiQueryFonts             = 158;
  3748.   ord_GpiQueryFontMetrics       = 159;
  3749.   ord_GpiQueryKerningPairs      = 160;
  3750.   ord_GpiQueryWidthTable        = 161;
  3751.   ord_GpiSetCP                  = 162;
  3752.   ord_GpiQueryCP                = 163;
  3753.   ord_GpiQueryTextBox           = 164;
  3754.   ord_DevQueryDeviceNames       = 165;
  3755.   ord_GpiQueryDefCharBox        = 166;
  3756.   ord_GpiQueryFontFileDescriptions=167;
  3757.   ord_GpiSetCharSet             = 168;
  3758.   ord_GpiQueryCharSet           = 169;
  3759.   ord_GpiSetCharBox             = 170;
  3760.   ord_GpiQueryCharBox           = 171;
  3761.   ord_GpiSetCharAngle           = 172;
  3762.   ord_GpiQueryCharAngle         = 173;
  3763.   ord_GpiSetCharShear           = 174;
  3764.   ord_GpiQueryCharShear         = 175;
  3765.   ord_GpiSetCharDirection       = 176;
  3766.   ord_GpiQueryCharDirection     = 177;
  3767.   ord_GpiSetCharMode            = 178;
  3768.   ord_GpiQueryCharMode          = 179;
  3769.   ord_GpiCharString             = 180;
  3770.   ord_GpiCharStringAt           = 181;
  3771.   ord_GpiCharStringPos          = 182;
  3772.   ord_GpiCharStringPosAt        = 183;
  3773.   ord_GpiSetMarkerSet           = 184;
  3774.   ord_GpiQueryMarkerSet         = 185;
  3775.   ord_GpiSetMarker              = 186;
  3776.   ord_GpiQueryMarker            = 187;
  3777.   ord_GpiSetMarkerBox           = 188;
  3778.   ord_GpiQueryMarkerBox         = 189;
  3779.   ord_GpiMarker                 = 190;
  3780.   ord_GpiPolyMarker             = 191;
  3781.   ord_GpiImage                  = 192;
  3782.   ord_GpiCreateBitMap           = 196;
  3783.   ord_GpiDeleteBitMap           = 197;
  3784.   ord_GpiSetBitMap              = 198;
  3785.   ord_GpiSetBitMapDimension     = 199;
  3786.   ord_GpiQueryBitMapDimension   = 200;
  3787.   ord_GpiQueryDeviceBitMapFormats=201;
  3788.   ord_GpiQueryBitMapParameters  = 202;
  3789.   ord_GpiSetBitMapBits          = 203;
  3790.   ord_GpiQueryBitMapBits        = 204;
  3791.   ord_GpiBitBlt                 = 205;
  3792.   ord_GpiSetPel                 = 206;
  3793.   ord_GpiQueryPel               = 207;
  3794.   ord_GpiCreateRegion           = 208;
  3795.   ord_GpiSetRegion              = 209;
  3796.   ord_GpiDestroyRegion          = 210;
  3797.   ord_GpiCombineRegion          = 211;
  3798.   ord_GpiEqualRegion            = 212;
  3799.   ord_GpiOffsetRegion           = 213;
  3800.   ord_GpiPtInRegion             = 214;
  3801.   ord_GpiRectInRegion           = 215;
  3802.   ord_GpiQueryRegionBox         = 216;
  3803.   ord_GpiQueryRegionRects       = 217;
  3804.   ord_GpiSetClipRegion          = 218;
  3805.   ord_GpiQueryClipRegion        = 219;
  3806.   ord_GpiQueryClipBox           = 220;
  3807.   ord_GpiIntersectClipRectangle = 221;
  3808.   ord_GpiExcludeClipRectangle   = 222;
  3809.   ord_GpiOffsetClipRegion       = 223;
  3810.   ord_GpiPaintRegion            = 224;
  3811.   ord_GpiLoadMetaFile           = 225;
  3812.   ord_GpiCopyMetafile           = 226;
  3813.   ord_GpiPlayMetafile           = 227;
  3814.   ord_GpiSaveMetaFile           = 228;
  3815.   ord_GpiDeleteMetaFile         = 229;
  3816.   ord_GpiQueryMetaFileBits      = 230;
  3817.   ord_GpiSetMetaFileBits        = 231;
  3818.   ord_GpiQueryMetaFileLength    = 232;
  3819.   ord_GpiSetClipPath            = 233;
  3820.   ord_GpiBeginPath              = 234;
  3821.   ord_GpiEndPath                = 235;
  3822.   ord_GpiCloseFigure            = 236;
  3823.   ord_GpiModifyPath             = 237;
  3824.   ord_GpiFillPath               = 238;
  3825.   ord_GpiStartRequest           = 239;
  3826.   ord_GpiQueryDevice            = 240;
  3827.   ord_DevStdOpen                = 244;
  3828.   ord_GpiQueryCharStringPos     = 245;
  3829.   ord_GpiQueryCharStringPosAt   = 246;
  3830.   ord_GpiSetPS                  = 248;
  3831.   ord_SegSGWOpenSegmentWindow   = 249;
  3832.   ord_MtEndReadRequest          = 250;
  3833.   ord_MtGetDESCRIPTION          = 251;
  3834.   ord_FmtOrderTable             = 252;
  3835.   ord_MtGetCodePage             = 253;
  3836.   ord_MtGetLct                  = 254;
  3837.   ord_MtGetGDDInfo              = 255;
  3838.   ord_FttConvertGocaPoly        = 256;
  3839.   ord_MtGetFirstFont            = 257;
  3840.   ord_SegSGWNewPartData         = 258;
  3841.   ord_MtStartReadRequest        = 259;
  3842.   ord_MtGetFirstGraphicsData    = 260;
  3843.   ord_MtGetNextFont             = 261;
  3844.   ord_MtGetNextGraphicsData     = 262;
  3845.   ord_GpiLoadPublicFonts        = 263;
  3846.   ord_GpiUnloadPublicFonts      = 264;
  3847.   ord_GpiComment                = 268;
  3848.   ord_GpiWcBitBlt               = 269;
  3849.   ord_GpiStrOKEPath             = 270;
  3850.   ord_SegSGWNextOrderF          = 271;
  3851.   ord_GpiOutlinePath            = 274;
  3852.   ord_GpiSetDefTag              = 275;
  3853.   ord_GpiQueryDefTag            = 276;
  3854.   ord_GpiSetDefAttrs            = 277;
  3855.   ord_GpiQueryDefAttrs          = 278;
  3856.   ord_GpiSetDefViewingLimits    = 279;
  3857.   ord_GpiQueryDefViewingLimits  = 280;
  3858.   ord_GpiSetDefArcParams        = 281;
  3859.   ord_GpiQueryDefArcParams      = 282;
  3860.   ord_GpiTranslate              = 283;
  3861.   ord_GpiScale                  = 284;
  3862.   ord_GpiRotate                 = 285;
  3863.   ord_GpiPolyLineDisjoint       = 286;
  3864.   ord_GpiPathToRegion           = 287;
  3865.   ord_GpiFloodFill              = 289;
  3866.   ord_GpiDrawBits               = 290;
  3867.   ord_GpiQueryBitMapInfoHeader  = 291;
  3868.   ord_GpiQueryLogicalFont       = 292;
  3869.   ord_GpiQueryFaceString        = 293;
  3870.   ord_GpiQueryFontAction        = 294;
  3871.   ord_GpiCreatePalette          = 295;
  3872.   ord_GpiDeletePalette          = 296;
  3873.   ord_GpiSelectPalette          = 297;
  3874.   ord_GpiAnimatePalette         = 298;
  3875.   ord_GpiSetPaletteEntries      = 299;
  3876.   ord_GpiQueryPalette           = 300;
  3877.   ord_GpiQueryPaletteInfo       = 301;
  3878.   ord_GpiQueryCharExtra         = 302;
  3879.   ord_GpiSetCharExtra           = 303;
  3880.   ord_GpiQueryCharBreakExtra    = 304;
  3881.   ord_GpiSetCharBreakExtra      = 305;
  3882.   ord_GpiFrameRegion            = 306;
  3883.   ord_GpiConvertWithMatrix      = 307;
  3884.   ord_Gpi32Associate            = 351;
  3885.   ord_Gpi32BeginArea            = 352;
  3886.   ord_Gpi32BeginElement         = 353;
  3887.   ord_Gpi32BeginPath            = 354;
  3888.   ord_Gpi32Bitblt               = 355;
  3889.   ord_Gpi32Box                  = 356;
  3890.   ord_Gpi32CallSegmentMatrix    = 357;
  3891.   ord_Gpi32CharString           = 358;
  3892.   ord_Gpi32CharStringAt         = 359;
  3893.   ord_Gpi32CloseFigure          = 360;
  3894.   ord_Gpi32CloseSegment         = 361;
  3895.   ord_Gpi32CombineRegion        = 362;
  3896.   ord_Gpi32Comment              = 363;
  3897.   ord_Gpi32Convert              = 364;
  3898.   ord_Gpi32CopyMetaFile         = 365;
  3899.   ord_Gpi32CorrelateChain       = 366;
  3900.   ord_Gpi32CorrelateFrom        = 367;
  3901.   ord_Gpi32CreateLogFont        = 368;
  3902.   ord_Gpi32CreatePS             = 369;
  3903.   ord_Gpi32CreateRegion         = 370;
  3904.   ord_Gpi32DeleteBitMap         = 371;
  3905.   ord_Gpi32DeleteElement        = 372;
  3906.   ord_Gpi32DeleteElementRange   = 373;
  3907.   ord_Gpi32DeleteElementsBetweenLabe=374;
  3908.   ord_Gpi32DeleteMetaFile       = 375;
  3909.   ord_Gpi32DeleteSegment        = 376;
  3910.   ord_Gpi32DeleteSegments       = 377;
  3911.   ord_Gpi32DeleteSetId          = 378;
  3912.   ord_Gpi32DestroyPS            = 379;
  3913.   ord_Gpi32DrawChain            = 380;
  3914.   ord_Gpi32DrawDynamics         = 381;
  3915.   ord_Gpi32DrawFrom             = 382;
  3916.   ord_Gpi32DrawSegment          = 383;
  3917.   ord_Gpi32Element              = 384;
  3918.   ord_Gpi32EndArea              = 385;
  3919.   ord_Gpi32EndElement           = 386;
  3920.   ord_Gpi32EndPath              = 387;
  3921.   ord_Gpi32EqualRegion          = 388;
  3922.   ord_Gpi32Erase                = 389;
  3923.   ord_Gpi32ErrorSegmentData     = 390;
  3924.   ord_Gpi32ExcludeClipRectangle = 391;
  3925.   ord_Gpi32FillPath             = 392;
  3926.   ord_Gpi32FullArc              = 393;
  3927.   ord_Gpi32GetData              = 394;
  3928.   ord_Gpi32Image                = 395;
  3929.   ord_Gpi32IntersectClipRectangle=396;
  3930.   ord_Gpi32Label                = 397;
  3931.   ord_Gpi32Line                 = 398;
  3932.   ord_Gpi32LoadBitMap           = 399;
  3933.   ord_Gpi32LoadFonts            = 400;
  3934.   ord_Gpi32LoadMetaFile         = 401;
  3935.   ord_Gpi32Marker               = 402;
  3936.   ord_Gpi32ModifyPath           = 403;
  3937.   ord_Gpi32Move                 = 404;
  3938.   ord_Gpi32OffsetClipRegion     = 405;
  3939.   ord_Gpi32OffsetElementPointer = 406;
  3940.   ord_Gpi32OffsetRegion         = 407;
  3941.   ord_Gpi32OpenSegment          = 408;
  3942.   ord_Gpi32PaintRegion          = 409;
  3943.   ord_Gpi32PlayMetaFile         = 411;
  3944.   ord_Gpi32PointArc             = 412;
  3945.   ord_Gpi32PolyFillet           = 413;
  3946.   ord_Gpi32PolyFilletSharp      = 414;
  3947.   ord_Gpi32PolyLine             = 415;
  3948.   ord_Gpi32PolyMarker           = 416;
  3949.   ord_Gpi32PolySPLine           = 417;
  3950.   ord_Gpi32Pop                  = 418;
  3951.   ord_Gpi32PtInRegion           = 419;
  3952.   ord_Gpi32PtVisible            = 420;
  3953.   ord_Gpi32PutData              = 421;
  3954.   ord_Gpi32QueryArcParams       = 422;
  3955.   ord_Gpi32QueryAttrMode        = 423;
  3956.   ord_Gpi32QueryBackColor       = 424;
  3957.   ord_Gpi32QueryBackMix         = 425;
  3958.   ord_Gpi32QueryBitMapDimension = 426;
  3959.   ord_Gpi32QueryBitMapHandle    = 427;
  3960.   ord_Gpi32QueryBoundaryData    = 428;
  3961.   ord_Gpi32QueryCharAngle       = 429;
  3962.   ord_Gpi32QueryCharBox         = 430;
  3963.   ord_Gpi32QueryCharDirection   = 431;
  3964.   ord_Gpi32QueryCharMode        = 432;
  3965.   ord_Gpi32QueryCharSet         = 433;
  3966.   ord_Gpi32QueryCharShear       = 434;
  3967.   ord_Gpi32QueryClipBox         = 435;
  3968.   ord_Gpi32QueryClipRegion      = 436;
  3969.   ord_Gpi32QueryColor           = 437;
  3970.   ord_Gpi32QueryColorData       = 438;
  3971.   ord_Gpi32QueryColorIndex      = 439;
  3972.   ord_Gpi32QueryCP              = 440;
  3973.   ord_Gpi32QueryCurrentPosition = 441;
  3974.   ord_Gpi32QueryDefCharBox      = 442;
  3975.   ord_Gpi32QueryDefaultViewMatrix=443;
  3976.   ord_Gpi32QueryDevice          = 444;
  3977.   ord_Gpi32QueryDeviceBitMapFormats=445;
  3978.   ord_Gpi32QueryDrawControl     = 446;
  3979.   ord_Gpi32QueryDrawInGMode     = 447;
  3980.   ord_Gpi32QueryEditMode        = 448;
  3981.   ord_Gpi32QueryElement         = 449;
  3982.   ord_Gpi32QueryElementPointer  = 450;
  3983.   ord_Gpi32QueryElementType     = 451;
  3984.   ord_Gpi32QueryFontFileDescriptions=452;
  3985.   ord_Gpi32QueryFontMetrics     = 453;
  3986.   ord_Gpi32QueryGraphicsField   = 454;
  3987.   ord_Gpi32QueryInitialSegmentAttrs=455;
  3988.   ord_Gpi32QueryKerningPairs    = 456;
  3989.   ord_Gpi32QueryLineEnd         = 457;
  3990.   ord_Gpi32QueryLineJoin        = 458;
  3991.   ord_Gpi32QueryLineType        = 459;
  3992.   ord_Gpi32QueryLineWidth       = 460;
  3993.   ord_Gpi32QueryLineWidthGeom   = 461;
  3994.   ord_Gpi32QueryMarker          = 462;
  3995.   ord_Gpi32QueryMarkerBox       = 463;
  3996.   ord_Gpi32QueryMarkerSet       = 464;
  3997.   ord_Gpi32QueryMetaFileBits    = 465;
  3998.   ord_Gpi32QueryMetaFileLength  = 466;
  3999.   ord_Gpi32QueryMix             = 467;
  4000.   ord_Gpi32QueryModeLTransformMatrix=468;
  4001.   ord_Gpi32QueryNearestColor    = 469;
  4002.   ord_Gpi32QueryNumberSetIds    = 470;
  4003.   ord_Gpi32QueryPS              = 471;
  4004.   ord_Gpi32QueryPageViewPort    = 472;
  4005.   ord_Gpi32QueryPattern         = 473;
  4006.   ord_Gpi32QueryPatternRefPoint = 474;
  4007.   ord_Gpi32QueryPatternSet      = 475;
  4008.   ord_Gpi32QueryPel             = 476;
  4009.   ord_Gpi32QueryPickAperturePosition=477;
  4010.   ord_Gpi32QueryPickApertureSize= 478;
  4011.   ord_Gpi32QueryRGBColor        = 479;
  4012.   ord_Gpi32QueryRealColors      = 480;
  4013.   ord_Gpi32QueryRegionBox       = 481;
  4014.   ord_Gpi32QuerySegmentAttrs    = 482;
  4015.   ord_Gpi32QuerySegmentNames    = 483;
  4016.   ord_Gpi32QuerySegmentPriority = 484;
  4017.   ord_Gpi32QuerySegmentTransformMatr=485;
  4018.   ord_Gpi32QuerySetIds          = 486;
  4019.   ord_Gpi32QueryStopDraw        = 487;
  4020.   ord_Gpi32QueryTag             = 488;
  4021.   ord_Gpi32QueryTextBox         = 489;
  4022.   ord_Gpi32QueryViewinGLimits   = 490;
  4023.   ord_Gpi32QueryViewinGTransformMatr=491;
  4024.   ord_Gpi32QueryWidthTable      = 492;
  4025.   ord_Gpi32RectInRegion         = 494;
  4026.   ord_Gpi32RectVisible          = 495;
  4027.   ord_Gpi32RemoveDynamics       = 496;
  4028.   ord_Gpi32ResetBoundaryData    = 497;
  4029.   ord_Gpi32ResetPS              = 498;
  4030.   ord_Gpi32RestorePS            = 499;
  4031.   ord_Gpi32SaveMetaFile         = 500;
  4032.   ord_Gpi32SavePS               = 501;
  4033.   ord_Gpi32SetArcParams         = 502;
  4034.   ord_Gpi32SetAttrMode          = 503;
  4035.   ord_Gpi32SetBackColor         = 504;
  4036.   ord_Gpi32SetBackMix           = 505;
  4037.   ord_Gpi32SetBitMap            = 506;
  4038.   ord_Gpi32SetBitMapDimension   = 507;
  4039.   ord_Gpi32SetBitMapId          = 508;
  4040.   ord_Gpi32SetCharAngle         = 509;
  4041.   ord_Gpi32SetCharBox           = 510;
  4042.   ord_Gpi32SetCharDirection     = 511;
  4043.   ord_Gpi32SetCharMode          = 512;
  4044.   ord_Gpi32SetCharSet           = 513;
  4045.   ord_Gpi32SetCharShear         = 514;
  4046.   ord_Gpi32SetClipPath          = 515;
  4047.   ord_Gpi32SetClipRegion        = 516;
  4048.   ord_Gpi32SetColor             = 517;
  4049.   ord_Gpi32SetCP                = 518;
  4050.   ord_Gpi32SetCurrentPosition   = 519;
  4051.   ord_Gpi32SetDefaultViewMatrix = 520;
  4052.   ord_Gpi32SetDrawControl       = 521;
  4053.   ord_Gpi32SetDrawinGMode       = 522;
  4054.   ord_Gpi32SetEditMode          = 523;
  4055.   ord_Gpi32SetElementPointer    = 524;
  4056.   ord_Gpi32SetElementPointerAtLabel=525;
  4057.   ord_Gpi32SetGraphicsField     = 526;
  4058.   ord_Gpi32SetInitialSegmentAttrs=527;
  4059.   ord_Gpi32SetLineEnd           = 528;
  4060.   ord_Gpi32SetLineJoin          = 529;
  4061.   ord_Gpi32SetLineType          = 530;
  4062.   ord_Gpi32SetLineWidth         = 531;
  4063.   ord_Gpi32SetLineWidthGeom     = 532;
  4064.   ord_Gpi32SetMarker            = 533;
  4065.   ord_Gpi32SetMarkerBox         = 534;
  4066.   ord_Gpi32SetMarkerSet         = 535;
  4067.   ord_Gpi32SetMetaFileBits      = 536;
  4068.   ord_Gpi32SetMix               = 537;
  4069.   ord_Gpi32SetModeLTransformMatrix=538;
  4070.   ord_Gpi32SetPS                = 539;
  4071.   ord_Gpi32SetPageViewPort      = 540;
  4072.   ord_Gpi32SetPattern           = 541;
  4073.   ord_Gpi32SetPatternRefPoint   = 542;
  4074.   ord_Gpi32SetPatternSet        = 543;
  4075.   ord_Gpi32SetPel               = 544;
  4076.   ord_Gpi32SetPickAperturePosition=545;
  4077.   ord_Gpi32SetRegion            = 546;
  4078.   ord_Gpi32SetSegmentAttrs      = 547;
  4079.   ord_Gpi32SetSegmentPriority   = 548;
  4080.   ord_Gpi32SetSegmentTransformMatrix=549;
  4081.   ord_Gpi32SetStopDraw          = 550;
  4082.   ord_Gpi32SetTag               = 551;
  4083.   ord_Gpi32SetViewinGLimits     = 552;
  4084.   ord_Gpi32SetViewinGTransformMatrix=553;
  4085.   ord_Gpi32StrOKEPath           = 554;
  4086.   ord_Gpi32UnloadFonts          = 555;
  4087.   ord_Gpi32WcBitBlt             = 557;
  4088.   ord_Gpi32PolyLineDisjoint     = 558;
  4089.   ord_Gpi32PathToRegion         = 559;
  4090.   ord_Gpi32FloodFill            = 560;
  4091.   ord_Gpi32SuspendPlay          = 561;
  4092.   ord_Gpi32ResumePlay           = 562;
  4093.   ord_Gpi32OutLinePath          = 563;
  4094.   ord_Gpi32Translate            = 564;
  4095.   ord_Gpi32Scale                = 565;
  4096.   ord_Gpi32Rotate               = 566;
  4097.   ord_Gpi32QueryDefarcParams    = 567;
  4098.   ord_Gpi32QueryDefTag          = 568;
  4099.   ord_Gpi32QueryDefViewingLimits= 569;
  4100.   ord_Gpi32SetDefArcParams      = 570;
  4101.   ord_Gpi32SetDefTag            = 571;
  4102.   ord_Gpi32SetDefViewingLimits  = 572;
  4103.   ord_Gpi32QueryBitMapParameters= 573;
  4104.   ord_Gpi32QueryLogicalFont     = 574;
  4105.   ord_Gpi32QueryFaceString      = 575;
  4106.   ord_Gpi32QueryFontAction      = 576;
  4107.   ord_Gpi32DeletePalette        = 577;
  4108.   ord_Gpi32SelectPalette        = 578;
  4109.   ord_Gpi32QueryPalette         = 579;
  4110.   ord_Gpi32CharStringPos        = 580;
  4111.   ord_Gpi32CharStringPosAt      = 581;
  4112.   ord_Gpi32CorrelateSegment     = 582;
  4113.   ord_Gpi32QueryAttrs           = 583;
  4114.   ord_Gpi32QueryCharStringPos   = 584;
  4115.   ord_Gpi32QueryCharStringPosAt = 585;
  4116.   ord_Gpi32QueryFonts           = 586;
  4117.   ord_Gpi32QueryRegionRects     = 587;
  4118.   ord_Gpi32SetAttrs             = 588;
  4119.   ord_Gpi32SetPickApertureSize  = 589;
  4120.   ord_Gpi32QueryDefAttrs        = 590;
  4121.   ord_Gpi32SetDefAttrs          = 591;
  4122.   ord_Gpi32CreateLogColorTable  = 592;
  4123.   ord_Gpi32QueryLogColorTable   = 593;
  4124.   ord_Gpi32CreatePalette        = 594;
  4125.   ord_Gpi32AnimatePalette       = 595;
  4126.   ord_Gpi32SetPaletteEntries    = 596;
  4127.   ord_Gpi32QueryPaletteInfo     = 597;
  4128.   ord_Gpi32CreateBitMap         = 598;
  4129.   ord_Gpi32QueryBitMapBits      = 599;
  4130.   ord_Gpi32QueryBitMapInfoHeader= 601;
  4131.   ord_Gpi32SetBitMapBits        = 602;
  4132.   ord_Gpi32DrawBits             = 603;
  4133.   ord_Dev32CloseDC              = 604;
  4134.   ord_Dev32Escape               = 605;
  4135.   ord_Dev32QueryCaps            = 606;
  4136.   ord_Dev32QueryDeviceNames     = 607;
  4137.   ord_Dev32QueryHardCopyCaps    = 608;
  4138.   ord_Dev32PostDeviceModes      = 609;
  4139.   ord_Dev32OpendC               = 610;
  4140.   ord_Gpi32DestroyRegion        = 611;
  4141.   ord_Gpi32PartialArc           = 612;
  4142.   ord_Gpi32QueryCharExtra       = 613;
  4143.   ord_Gpi32SetCharExtra         = 614;
  4144.   ord_Gpi32QueryCharBreakExtra  = 615;
  4145.   ord_Gpi32SetCharBreakextra    = 616;
  4146.   ord_Gpi32FrameRegion          = 617;
  4147.   ord_Gpi32ConvertWithMatrix    = 618;
  4148.   ord_Gpi32LoadPublicFonts      = 622;
  4149.   ord_Gpi32UnloadPublicFonts    = 623;
  4150.   ord_Gpi32QueryTextAlignment   = 648;
  4151.   ord_Gpi32SetTextAlignment     = 649;
  4152.   ord_Gpi32Polygons             = 650;
  4153.   ord_Gpi32QueryFullFontFileDescs = 657;
  4154. { PMWIN }
  4155.   ord_WinQueryDesktopWindow     = 1;
  4156.   ord_WinQueryObjectWindow      = 2;
  4157.   ord_WinRegisterClass          = 3;
  4158.   ord_WinQueryClassName         = 4;
  4159.   ord_WinQueryClassInfo         = 5;
  4160.   ord_WinCreateWindow           = 6;
  4161.   ord_WinDestroyWindow          = 7;
  4162.   ord_WinSetWindowPos           = 8;
  4163.   ord_WinSetMultWindowPos       = 9;
  4164.   ord_WinQueryWindowPos         = 10;
  4165.   ord_WinEnableWindow           = 11;
  4166.   ord_WinIsWindowEnabled        = 12;
  4167.   ord_WinShowWindow             = 13;
  4168.   ord_WinEnableWindowUpdate     = 14;
  4169.   ord_WinIsWindowVisible        = 15;
  4170.   ord_WinSetWindowText          = 16;
  4171.   ord_WinQueryWindowText        = 17;
  4172.   ord_WinQueryWindowTextLength  = 18;
  4173.   ord_WinWindowFromId           = 19;
  4174.   ord_WinMultWindowFromIds      = 20;
  4175.   ord_WinIsWindow               = 21;
  4176.   ord_WinIsChild                = 22;
  4177.   ord_WinSetParent              = 23;
  4178.   ord_WinSetOwner               = 24;
  4179.   ord_WinQueryWindow            = 25;
  4180.   ord_WinQueryWindowRect        = 26;
  4181.   ord_WinQueryWindowProcess     = 27;
  4182.   ord_WinSetWindowUShort        = 28;
  4183.   ord_WinQueryWindowUShort      = 29;
  4184.   ord_WinSetWindowULong         = 30;
  4185.   ord_WinQueryWindowULong       = 31;
  4186.   ord_WinBeginEnumWindows       = 32;
  4187.   ord_WinGetNextWindow          = 33;
  4188.   ord_WinEndEnumWindows         = 34;
  4189.   ord_WinWindowFromPoint        = 35;
  4190.   ord_WinMapWindowPoints        = 36;
  4191.   ord_WinSubClassWindow         = 37;
  4192.   ord_WinLockWindow             = 38;
  4193.   ord_WinQueryWindowLockCount   = 39;
  4194.   ord_WinRegisterWindowDestroy  = 40;
  4195.   ord_WinOpenWindowDC           = 41;
  4196.   ord_WinGetScreenPS            = 42;
  4197.   ord_WinGetPS                  = 43;
  4198.   ord_WinReleasePS              = 44;
  4199.   ord_WinBeginPaint             = 45;
  4200.   ord_WinEndPaint               = 46;
  4201.   ord_WinInvalidateRect         = 47;
  4202.   ord_WinInvalidateRegion       = 48;
  4203.   ord_WinValidateRect           = 49;
  4204.   ord_WinValidateRegion         = 50;
  4205.   ord_WinQueryUpdateRect        = 51;
  4206.   ord_WinQueryUpdateRegion      = 52;
  4207.   ord_WinUpdateWindow           = 53;
  4208.   ord_WinExcludeUpdateRegion    = 54;
  4209.   ord_WinLockWindowUpdate       = 55;
  4210.   ord_WinLockVisRegions         = 56;
  4211.   ord_WinWindowFromDC           = 57;
  4212.   ord_WinCreateMsgQueue         = 58;
  4213.   ord_WinDestroyMsgQueue        = 59;
  4214.   ord_WinQueryQueueStatus       = 60;
  4215.   ord_WinSendMsg                = 61;
  4216.   ord_WinBroadCastMsg           = 63;
  4217.   ord_WinInsendMsg              = 64;
  4218.   ord_WinGetMsg                 = 65;
  4219.   ord_WinPeekMsg                = 66;
  4220.   ord_WinWaitMsg                = 67;
  4221.   ord_WinDispatchMsg            = 68;
  4222.   ord_WinPostMsg                = 69;
  4223.   ord_WinPostQueueMsg           = 70;
  4224.   ord_WinQueryMsgPos            = 71;
  4225.   ord_WinQueryMsgTime           = 72;
  4226.   ord_WinCallMsgFilter          = 73;
  4227.   ord_WinSetMsgInterest         = 74;
  4228.   ord_WinSetCapture             = 75;
  4229.   ord_WinQueryCapture           = 76;
  4230.   ord_WinSetFocus               = 77;
  4231.   ord_WinQueryFocus             = 78;
  4232.   ord_WinSetActiveWindow        = 79;
  4233.   ord_WinQueryActiveWindow      = 80;
  4234.   ord_WinSetSysModalWindow      = 81;
  4235.   ord_WinQuerySysModalWindow    = 82;
  4236.   ord_WinIsThreadActive         = 83;
  4237.   ord_WinStartTimer             = 84;
  4238.   ord_WinStopTimer              = 85;
  4239.   ord_WinGetCurrentTime         = 86;
  4240.   ord_WinLoadPointer            = 87;
  4241.   ord_WinCreatePointer          = 88;
  4242.   ord_WinDestroyPointer         = 89;
  4243.   ord_OldWinQueryPointerInfo    = 90;
  4244.   ord_WinQuerySYSPointer        = 91;
  4245.   ord_WinSetPointer             = 92;
  4246.   ord_WinQueryPointer           = 93;
  4247.   ord_WinShowPointer            = 94;
  4248.   ord_WinSetPointerPos          = 95;
  4249.   ord_WinQueryPointerPos        = 96;
  4250.   ord_WinGetSysBitMap           = 97;
  4251.   ord_WinCreateCursor           = 98;
  4252.   ord_WinDestroyCursor          = 99;
  4253.   ord_WinShowCursor             = 100;
  4254.   ord_WinQueryCursorInfo        = 101;
  4255.   ord_WinLoadAccelTable         = 102;
  4256.   ord_WinCreateAccelTable       = 103;
  4257.   ord_WinDestroyAccelTable      = 104;
  4258.   ord_WinTRANSLATEAccel         = 105;
  4259.   ord_WinSetAccelTable          = 106;
  4260.   ord_WinQueryAccelTable        = 107;
  4261.   ord_WinCopyAccelTable         = 108;
  4262.   ord_WinSetHook                = 109;
  4263.   ord_WinReleaseHook            = 110;
  4264.   ord_WinOpenClipbrd            = 111;
  4265.   ord_WinCloseClipbrd           = 112;
  4266.   ord_WinEmptyClipbrd           = 113;
  4267.   ord_WinSetClipbrdOwner        = 114;
  4268.   ord_WinQueryClipbrdOwner      = 115;
  4269.   ord_WinSetClipbrdData         = 116;
  4270.   ord_WinQueryClipbrdData       = 117;
  4271.   ord_WinEnumClipbrdFmts        = 118;
  4272.   ord_WinQueryClipbrdFmtInfo    = 119;
  4273.   ord_WinSetClipbrdViewer       = 120;
  4274.   ord_WinQueryClipbrdViewer     = 121;
  4275.   ord_WinLoadDlg                = 122;
  4276.   ord_WinCreateDlg              = 123;
  4277.   ord_WinProcessDlg             = 124;
  4278.   ord_WinDlgBox                 = 125;
  4279.   ord_WinDismissDlg             = 126;
  4280.   ord_WinSendDlgItemMsg         = 127;
  4281.   ord_WinSetDlgItemShort        = 128;
  4282.   ord_WinQueryDlgItemShort      = 129;
  4283.   ord_WinMapDlgPoints           = 130;
  4284.   ord_WinSubStituteStrings      = 132;
  4285.   ord_WinEnumDlgItem            = 133;
  4286.   ord_WinSetDlgItemText         = 134;
  4287.   ord_WinQueryDlgItemText       = 135;
  4288.   ord_WinLoadMenu               = 136;
  4289.   ord_WinCreateMenu             = 137;
  4290.   ord_WinAlarm                  = 138;
  4291.   ord_WinMessageBox             = 139;
  4292.   ord_WinCreateStdWindow        = 140;
  4293.   ord_WinCreateFrameControls    = 141;
  4294.   ord_WinCalcFrameRect          = 143;
  4295.   ord_WinFlashWindow            = 144;
  4296.   ord_WinGetMinPosition         = 146;
  4297.   ord_WinGetMaxPosition         = 147;
  4298.   ord_WinQuerySysValue          = 149;
  4299.   ord_WinSetSysValue            = 150;
  4300.   ord_WinSetSysColors           = 151;
  4301.   ord_WinQuerySysColor          = 152;
  4302.   ord_WinScrollWindow           = 153;
  4303.   ord_WinTrackRect              = 154;
  4304.   ord_WinShowTrackRect          = 155;
  4305.   ord_GpiLoadBitMap             = 156;
  4306.   ord_WinLoadString             = 157;
  4307.   ord_WinLoadMessage            = 158;
  4308.   ord_WinSetRectEmpty           = 159;
  4309.   ord_WinSetRect                = 160;
  4310.   ord_WinCopyRect               = 161;
  4311.   ord_WinIsRectEmpty            = 162;
  4312.   ord_WinEqualRect              = 163;
  4313.   ord_WinPtInRect               = 164;
  4314.   ord_WinOffsetRect             = 165;
  4315.   ord_WinInflateRect            = 166;
  4316.   ord_WinIntersectRect          = 167;
  4317.   ord_WinUnionRect              = 168;
  4318.   ord_WinSubtractRect           = 169;
  4319.   ord_WinMakeRect               = 170;
  4320.   ord_WinMakePoints             = 171;
  4321.   ord_WinInvertRect             = 172;
  4322.   ord_WinFillRect               = 173;
  4323.   ord_KbdPacket                 = 174;
  4324.   ord_WinDrawPointer            = 177;
  4325.   ord_WinDefWindowProc          = 178;
  4326.   ord_WinDefDlgProc             = 179;
  4327.   ord_WinGetKeyState            = 211;
  4328.   ord_WinGetPhysKeyState        = 212;
  4329.   ord_WinSetKeyBoardStateTable  = 213;
  4330.   ord_WinEnablePhysInput        = 214;
  4331.   ord_WinSetCP                  = 215;
  4332.   ord_WinQueryCP                = 216;
  4333.   ord_WinQueryCPList            = 217;
  4334.   ord_WinCpTranslateString      = 218;
  4335.   ord_WinCpTranslateChar        = 219;
  4336.   ord_WinCompareStrings         = 220;
  4337.   ord_WinUpper                  = 221;
  4338.   ord_WinUpperChar              = 222;
  4339.   ord_WinNextChar               = 223;
  4340.   ord_WinPrevChar               = 224;
  4341.   ord_WinCreateHeap             = 225;
  4342.   ord_WinDestroyHeap            = 226;
  4343.   ord_WinAvailMem               = 227;
  4344.   ord_WinAllocMem               = 228;
  4345.   ord_WinReallocMem             = 229;
  4346.   ord_WinFreeMem                = 230;
  4347.   ord_WinLockHeap               = 231;
  4348.   ord_WinCreateAtomTable        = 233;
  4349.   ord_WinDestroyAtomTable       = 234;
  4350.   ord_WinAddAtom                = 235;
  4351.   ord_WinFindAtom               = 236;
  4352.   ord_WinDeleteAtom             = 237;
  4353.   ord_WinQueryAtomUsage         = 238;
  4354.   ord_WinQueryAtomLength        = 239;
  4355.   ord_WinQueryAtomName          = 240;
  4356.   ord_WinQuerySystemAtomTable   = 241;
  4357.   ord_WinGetLastError           = 243;
  4358.   ord_WinGetErrorInfo           = 244;
  4359.   ord_WinFreeErrorInfo          = 245;
  4360.   ord_WinInitialize             = 246;
  4361.   ord_WinTerminate              = 247;
  4362.   ord_WinCatch                  = 248;
  4363.   ord_WinThrow                  = 249;
  4364.   ord_WinQueryVersion           = 250;
  4365.   ord__WinSetErrorInfo          = 263;
  4366.   ord_WinIsPhysInputEnabled     = 264;
  4367.   ord_WinQueryWindowDC          = 265;
  4368.   ord_WinDrawBorder             = 266;
  4369.   ord_WinDrawText               = 267;
  4370.   ord_WinDrawBitMap             = 268;
  4371.   ord_WinQueryWindowPtr         = 269;
  4372.   ord_WinSetWindowPtr           = 270;
  4373.   ord_WinMsgSemWait             = 274;
  4374.   ord_WinMsgMuxSemWait          = 275;
  4375.   ord_WinCancelShutDown         = 277;
  4376.   ord_WinSetWindowBits          = 278;
  4377.   ord_WinGetClipPS              = 279;
  4378.   ord_WinSaveWindowPos          = 285;
  4379.   ord_WInFocusChange            = 286;
  4380.   ord_WinQueryQueueInfo         = 287;
  4381.   ord_WinSetClassMsgInterest    = 292;
  4382.   ord_WinQueryDLGItemTextLength = 294;
  4383.   ord_WinDDEInitiate            = 297;
  4384.   ord_WinDDERespond             = 298;
  4385.   ord_WinDDEPostMsg             = 299;
  4386.   ord_WinSetPresParam           = 301;
  4387.   ord_WinQueryPresParam         = 302;
  4388.   ord_WinRemovePresParam        = 303;
  4389.   ord_DumWinCreateHelpInstance  = 311;
  4390.   ord_DumWinDestroyHelpInstance = 312;
  4391.   ord_DumWinAssociateHelpInstance=313;
  4392.   ord_DumWinCreateHelpTable     = 314;
  4393.   ord_DumWinLoadHelpTable       = 315;
  4394.   ord_DumWinQueryHelpInstance   = 316;
  4395.   ord_DummyHelpEntry            = 322;
  4396.   ord_WinSetClassThunkProc      = 959;
  4397.   ord_WinQueryClassThunkProc    = 960;
  4398.   ord_WinSetWindowThunkProc     = 961;
  4399.   ord_WinQueryWindowThunkProc   = 962;
  4400.   ord_WinQueryWindowModeL       = 317;
  4401.   ord_WinSetDesktopBkgnd        = 318;
  4402.   ord_WinQueryDesktopBkgnd      = 319;
  4403.   ord_WinPopupMenu              = 320;
  4404.   ord_WinRealizePalette         = 321;
  4405.   ord_WinDeleteLibrary          = 602;
  4406.   ord_WinLoadProcedure          = 603;
  4407.   ord_WinDeleteProcedure        = 604;
  4408.   ord_WinSetMsgMode             = 605;
  4409.   ord_WinSetSynchroMode         = 606;
  4410.   ord_WinGetDlgMsg              = 607;
  4411.   ord_WinRegisterUserMsg        = 608;
  4412.   ord_WinQueryAnchorBlock       = 609;
  4413.   ord_WinRegisterUserDataType   = 612;
  4414.   ord_WinIsWindowShowing        = 614;
  4415.   ord_WinLoadLibrary            = 615;
  4416.   ord_WinCreatePointerIndirect  = 616;
  4417.   ord_WinQueryPointerInfo       = 617;
  4418.   ord_WinGetErasePS             = 624;
  4419.   ord_WinReleaseErasePS         = 625;
  4420.   ord_WinStretchPointer         = 632;
  4421.   ord_WinSetPointerOwner        = 633;
  4422.   ord_Win32AddAtom              = 700;
  4423.   ord_Win32Alarm                = 701;
  4424.   ord_Win32BeginEnumWindows     = 702;
  4425.   ord_Win32BeginPaint           = 703;
  4426.   ord_Win32CalcFrameRect        = 704;
  4427.   ord_Win32CancelShutDown       = 705;
  4428.   ord_Win32CloseClipbrd         = 707;
  4429.   ord_Win32CompareStrings       = 708;
  4430.   ord_Win32CopyAccelTable       = 709;
  4431.   ord_Win32CopyRect             = 710;
  4432.   ord_Win32CpTranslateChar      = 711;
  4433.   ord_Win32CpTranslateString    = 712;
  4434.   ord_Win32CreateAccelTable     = 713;
  4435.   ord_Win32CreateAtomTable      = 714;
  4436.   ord_Win32CreateCursor         = 715;
  4437.   ord_Win32CreateMsgQueue       = 716;
  4438.   ord_Win32CreatePointer        = 717;
  4439.   ord_Win32DDEInitiate          = 718;
  4440.   ord_Win32DDEPostMsg           = 719;
  4441.   ord_Win32DDERespond           = 720;
  4442.   ord_Win32DeleteAtom           = 721;
  4443.   ord_Win32DeleteLibrary        = 722;
  4444.   ord_Win32DestroyAccelTable    = 723;
  4445.   ord_Win32DestroyAtomTable     = 724;
  4446.   ord_Win32DestroyCursor        = 725;
  4447.   ord_Win32DestroyMsgQueue      = 726;
  4448.   ord_Win32DestroyPointer       = 727;
  4449.   ord_Win32DestroyWindow        = 728;
  4450.   ord_Win32DismissDlg           = 729;
  4451.   ord_Win32DrawBitMap           = 730;
  4452.   ord_Win32DrawBorder           = 731;
  4453.   ord_Win32DrawPointer          = 732;
  4454.   ord_Win32EmptyClipbrd         = 733;
  4455.   ord_Win32EnablePhysInput      = 734;
  4456.   ord_Win32EnableWindow         = 735;
  4457.   ord_Win32EnableWindowUpdate   = 736;
  4458.   ord_Win32EndEnumWindows       = 737;
  4459.   ord_Win32EndPaint             = 738;
  4460.   ord_Win32EnumClipbrdFmts      = 739;
  4461.   ord_Win32EnumDlgItem          = 740;
  4462.   ord_Win32EqualRect            = 741;
  4463.   ord_Win32ExcludeUpdateRegion  = 742;
  4464.   ord_Win32FillRect             = 743;
  4465.   ord_Win32FindAtom             = 744;
  4466.   ord_Win32FlashWindow          = 745;
  4467.   ord_Win32FocusChange          = 746;
  4468.   ord_Win32FreeErrorInfo        = 748;
  4469.   ord_Win32GetClipPS            = 749;
  4470.   ord_Win32GetCurrentTime       = 750;
  4471.   ord_Win32GetErrorInfo         = 751;
  4472.   ord_Win32GetKeyState          = 752;
  4473.   ord_Win32GetLastError         = 753;
  4474.   ord_Win32GetMaxPosition       = 754;
  4475.   ord_Win32GetMinPosition       = 755;
  4476.   ord_Win32GetNextWindow        = 756;
  4477.   ord_Win32GetPS                = 757;
  4478.   ord_Win32GetPhysKeyState      = 758;
  4479.   ord_Win32GetScreenPS          = 759;
  4480.   ord_Win32GetSysBitMap         = 760;
  4481.   ord_Win32InsendMsg            = 761;
  4482.   ord_Win32InflateRect          = 762;
  4483.   ord_Win32Initialize           = 763;
  4484.   ord_Win32IntersectRect        = 764;
  4485.   ord_Win32InvalidateRect       = 765;
  4486.   ord_Win32InvalidateRegion     = 766;
  4487.   ord_Win32InvertRect           = 767;
  4488.   ord_Win32IsChild              = 768;
  4489.   ord_Win32IsPhysInputEnabled   = 769;
  4490.   ord_Win32IsRectEmpty          = 770;
  4491.   ord_Win32IsThreadActive       = 771;
  4492.   ord_Win32IsWindow             = 772;
  4493.   ord_Win32IsWindowEnabled      = 773;
  4494.   ord_Win32IsWindowShowing      = 774;
  4495.   ord_Win32IsWindowVisible      = 775;
  4496.   ord_Win32LoadAccelTable       = 776;
  4497.   ord_Win32LoadLibrary          = 777;
  4498.   ord_Win32LoadMenu             = 778;
  4499.   ord_Win32LoadMessage          = 779;
  4500.   ord_Win32LoadPointer          = 780;
  4501.   ord_Win32LoadString           = 781;
  4502.   ord_Win32LockVisRegions       = 782;
  4503.   ord_Win32LockWindowUpdate     = 784;
  4504.   ord_Win32MakePoints           = 785;
  4505.   ord_Win32MakeRect             = 786;
  4506.   ord_Win32MapDlgPoints         = 787;
  4507.   ord_Win32MapWindowPoints      = 788;
  4508.   ord_Win32MessageBox           = 789;
  4509.   ord_Win32MsgSemWait           = 790;
  4510.   ord_Win32NextChar             = 791;
  4511.   ord_Win32OffsetRect           = 792;
  4512.   ord_Win32OpenClipbrd          = 793;
  4513.   ord_Win32OpenWindowDC         = 794;
  4514.   ord_Win32PrevChar             = 795;
  4515.   ord_Win32ProcessDlg           = 796;
  4516.   ord_Win32PtInRect             = 797;
  4517.   ord_Win32QueryAccelTable      = 798;
  4518.   ord_Win32QueryActiveWindow    = 799;
  4519.   ord_Win32QueryAnchorBlock     = 800;
  4520.   ord_Win32QueryAtomLength      = 801;
  4521.   ord_Win32QueryAtomName        = 802;
  4522.   ord_Win32QueryAtomUsage       = 803;
  4523.   ord_Win32QueryCapture         = 804;
  4524.   ord_Win32QueryClassName       = 805;
  4525.   ord_Win32QueryClipbrdData     = 806;
  4526.   ord_Win32QueryClipbrdFmtInfo  = 807;
  4527.   ord_Win32QueryClipbrdOwner    = 808;
  4528.   ord_Win32QueryClipbrdViewer   = 809;
  4529.   ord_Win32QueryCP              = 810;
  4530.   ord_Win32QueryCPList          = 811;
  4531.   ord_Win32QueryCursorInfo      = 812;
  4532.   ord_Win32QueryDesktopWindow   = 813;
  4533.   ord_Win32QueryDlgItemShort    = 814;
  4534.   ord_Win32QueryDlgItemText     = 815;
  4535.   ord_Win32QueryDlgItemTextLength=816;
  4536.   ord_Win32QueryFocus           = 817;
  4537.   ord_Win32QueryMsgPos          = 818;
  4538.   ord_Win32QueryMsgTime         = 819;
  4539.   ord_Win32QueryObjectWindow    = 820;
  4540.   ord_Win32QueryPointer         = 821;
  4541.   ord_Win32QueryPointerInfo     = 822;
  4542.   ord_Win32QueryPointerPos      = 823;
  4543.   ord_Win32QueryQueueInfo       = 824;
  4544.   ord_Win32QueryQueueStatus     = 825;
  4545.   ord_Win32QuerySysColor        = 826;
  4546.   ord_Win32QuerySysModalWindow  = 827;
  4547.   ord_Win32QuerySysPointer      = 828;
  4548.   ord_Win32QuerySysValue        = 829;
  4549.   ord_Win32QuerySystemAtomTable = 830;
  4550.   ord_Win32QueryUpdateRect      = 831;
  4551.   ord_Win32QueryUpdateRegion    = 832;
  4552.   ord_Win32QueryVersion         = 833;
  4553.   ord_Win32QueryWindow          = 834;
  4554.   ord_Win32QueryWindowDC        = 835;
  4555.   ord_Win32QueryWindowPos       = 837;
  4556.   ord_Win32QueryWindowProcess   = 838;
  4557.   ord_Win32QueryWindowPtr       = 839;
  4558.   ord_Win32QueryWindowRect      = 840;
  4559.   ord_Win32QueryWindowText      = 841;
  4560.   ord_Win32QueryWindowTextLength= 842;
  4561.   ord_Win32QueryWindowULong     = 843;
  4562.   ord_Win32QueryWindowUShort    = 844;
  4563.   ord_Win32RegisterUserDataType = 845;
  4564.   ord_Win32RegisterUserMsg      = 846;
  4565.   ord_Win32ReleasePS            = 848;
  4566.   ord_Win32ScrollWindow         = 849;
  4567.   ord_Win32SetAccelTable        = 850;
  4568.   ord_Win32SetActiveWindow      = 851;
  4569.   ord_Win32SetCapture           = 852;
  4570.   ord_Win32SetClassMsgInterest  = 853;
  4571.   ord_Win32SetClipbrdData       = 854;
  4572.   ord_Win32SetClipbrdOwner      = 855;
  4573.   ord_Win32SetClipbrdViewer     = 856;
  4574.   ord_Win32SetCP                = 857;
  4575.   ord_Win32SetDlgItemShort      = 858;
  4576.   ord_Win32SetDlgItemText       = 859;
  4577.   ord_Win32SetFocus             = 860;
  4578.   ord_Win32SetMsgInterest       = 861;
  4579.   ord_Win32SetMsgMode           = 862;
  4580.   ord_Win32SetMultWindowPos     = 863;
  4581.   ord_Win32SetOwner             = 864;
  4582.   ord_Win32SetParent            = 865;
  4583.   ord_Win32SetPointer           = 866;
  4584.   ord_Win32SetPointerPos        = 867;
  4585.   ord_Win32SetRect              = 868;
  4586.   ord_Win32SetRectEmpty         = 869;
  4587.   ord_Win32SetSynchroMode       = 870;
  4588.   ord_Win32SetSysColors         = 871;
  4589.   ord_Win32SetSysModalWindow    = 872;
  4590.   ord_Win32SetSysValue          = 873;
  4591.   ord_Win32SetWindowBits        = 874;
  4592.   ord_Win32SetWindowPos         = 875;
  4593.   ord_Win32SetWindowPtr         = 876;
  4594.   ord_Win32SetWindowText        = 877;
  4595.   ord_Win32SetWindowULong       = 878;
  4596.   ord_Win32SetWindowUShort      = 879;
  4597.   ord_Win32ShowCursor           = 880;
  4598.   ord_Win32ShowPointer          = 881;
  4599.   ord_Win32ShowTrackRect        = 882;
  4600.   ord_Win32ShowWindow           = 883;
  4601.   ord_Win32StartTimer           = 884;
  4602.   ord_Win32StopTimer            = 885;
  4603.   ord_Win32SubstituteStrings    = 886;
  4604.   ord_Win32SubtractRect         = 887;
  4605.   ord_Win32Terminate            = 888;
  4606.   ord_Win32TrackRect            = 890;
  4607.   ord_Win32UnionRect            = 891;
  4608.   ord_Win32UpdateWindow         = 892;
  4609.   ord_Win32Upper                = 893;
  4610.   ord_Win32UpperChar            = 894;
  4611.   ord_Win32ValidateRect         = 895;
  4612.   ord_Win32ValidateRegion       = 896;
  4613.   ord_Win32WaitMsg              = 897;
  4614.   ord_Win32WindowFromDC         = 898;
  4615.   ord_Win32WindowFromId         = 899;
  4616.   ord_Win32WindowFromPoint      = 900;
  4617.   ord_Win32BroadcastMsg         = 901;
  4618.   ord_Win32PostQueueMsg         = 902;
  4619.   ord_Win32SEndDlgItemMsg       = 903;
  4620.   ord_Win32TranslateAccel       = 904;
  4621.   ord_Win32CallMsgFilter        = 905;
  4622.   ord_Win32CreateFrameControls  = 906;
  4623.   ord_Win32CreateMenu           = 907;
  4624.   ord_Win32CreateStdWindow      = 908;
  4625.   ord_Win32CreateWindow         = 909;
  4626.   ord_Win32DefDlgProc           = 910;
  4627.   ord_Win32DefWindowProc        = 911;
  4628.   ord_Win32DispatchMsg          = 912;
  4629.   ord_Win32DrawText             = 913;
  4630.   ord_Win32GetDlgMsg            = 914;
  4631.   ord_Win32GetMsg               = 915;
  4632.   ord_Win32MsgMuxSemWait        = 916;
  4633.   ord_Win32MultWindowFromIds    = 917;
  4634.   ord_Win32PeekMsg              = 918;
  4635.   ord_Win32PostMsg              = 919;
  4636.   ord_Win32SEndMsg              = 920;
  4637.   ord_Win32SetKeyboardStateTable= 921;
  4638.   ord_Win32CreateDlg            = 922;
  4639.   ord_Win32DlgBox               = 923;
  4640.   ord_Win32LoadDlg              = 924;
  4641.   ord_Win32QueryClassInfo       = 925;
  4642.   ord_Win32RegisterClass        = 926;
  4643.   ord_Win32ReleaseHook          = 927;
  4644.   ord_Win32SetHook              = 928;
  4645.   ord_Win32SubClassWindow       = 929;
  4646.   ord_Win32SetClassThunkProc    = 930;
  4647.   ord_Win32QueryClassThunkProc  = 931;
  4648.   ord_Win32SetWindowThunkProc   = 932;
  4649.   ord_Win32QueryWindowThunkProc = 933;
  4650.   ord_Win32QueryWindowModel     = 934;
  4651.   ord_Win32SetDesktopBkgnd      = 935;
  4652.   ord_Win32QueryDesktopBkgnd    = 936;
  4653.   ord_Win32PopupMenu            = 937;
  4654.   ord_Win32SetPresParam         = 938;
  4655.   ord_Win32QueryPresParam       = 939;
  4656.   ord_Win32RemovePresParam      = 940;
  4657.   ord_Win32RealizePalette       = 941;
  4658.   ord_Win32CreatePointerIndirect= 942;
  4659.   ord_Win32SaveWindowPos        = 943;
  4660.   ord_Win32GetErasePS           = 952;
  4661.   ord_Win32ReleaseErasePS       = 953;
  4662.   ord_Win32SetPointerOwner      = 971;
  4663.   ord_Win32StretchPointer       = 968;
  4664.   ord_Win32SetErrorInfo         = 977;
  4665.   ord_Win32WaitEventSem         = 978;
  4666.   ord_Win32RequestMutexSem      = 979;
  4667.   ord_Win32WaitMuxWaitSem       = 980;
  4668.   ord_Win32LoadProcedure        = 986;
  4669.   ord_Win32DeleteProcedure      = 987;
  4670. { PMPIC }
  4671.   ord_PicPrint                  = 1;
  4672.   ord_PicIchg                   = 2;
  4673.   ord_Pic32Print                = 11;
  4674.   ord_Pic32Ichg                 = 12;
  4675.   ord_Prf32Pif2Met              = 13;
  4676. { PMSHAPI }
  4677.   ord_WinQueryProfileInt        = 2;
  4678.   ord_WinQueryProfileString     = 3;
  4679.   ord_WinWriteProfileString     = 4;
  4680.   ord_WinQueryProfileSize       = 5;
  4681.   ord_WinQueryProfileData       = 6;
  4682.   ord_WinWriteProfileData       = 7;
  4683.   ord_WinInitSessionMgr         = 8;
  4684.   ord_WinSetFgndWindow          = 9;
  4685.   ord_WinAddProgram             = 12;
  4686.   ord_WinRemoveProgram          = 13;
  4687.   ord_WinChangeProgram          = 14;
  4688.   ord_WinQueryDefinition        = 15;
  4689.   ord_WinQueryProgramTitles     = 16;
  4690.   ord_WinCreateGroup            = 17;
  4691.   ord_WinAddToGroup             = 19;
  4692.   ord_WinQueryProgramUse        = 20;
  4693.   ord_WinRemoveFromGroup        = 21;
  4694.   ord_WinDestroyGroup           = 23;
  4695.   ord_WinQueryFileExtopts       = 24;
  4696.   ord_WinSetFileExtopts         = 25;
  4697.   ord_WinQueryProgramType       = 26;
  4698.   ord_PrfQueryProfileInt        = 32;
  4699.   ord_PrfQueryProfileString     = 33;
  4700.   ord_PrfWriteProfileString     = 34;
  4701.   ord_PrfQueryProfileSize       = 35;
  4702.   ord_PrfQueryProfileData       = 36;
  4703.   ord_PrfWriteProfileData       = 37;
  4704.   ord_PrfOpenProfile            = 38;
  4705.   ord_PrfCloseProfile           = 39;
  4706.   ord_PrfReset                  = 42;
  4707.   ord_PrfQueryProfile           = 43;
  4708.   ord_WinInstStartApp           = 44;
  4709.   ord_WinTerminateApp           = 45;
  4710.   ord_WinCreateSwitchEntry      = 46;
  4711.   ord_WinQuerySessionTitle      = 47;
  4712.   ord_WinAddSwitchEntry         = 48;
  4713.   ord_WinChangeSwitchEntry      = 49;
  4714.   ord_PrfAddProgram             = 50;
  4715.   ord_PrfRemoveProgram          = 51;
  4716.   ord_PrfChangeProgram          = 52;
  4717.   ord_PrfQueryDefinition        = 53;
  4718.   ord_PrfQueryProgramTitles     = 54;
  4719.   ord_PrfCreateGroup            = 55;
  4720.   ord_WinQuerySwitchEntry       = 56;
  4721.   ord_WinQuerySwitchHandle      = 57;
  4722.   ord_PrfQueryProgramHandle     = 58;
  4723.   ord_PrfQueryProgramCategory   = 59;
  4724.   ord_PrfDestroyGroup           = 60;
  4725.   ord_WinQueryTaskTitle         = 65;
  4726.   ord_WinQueryTaskSizePos       = 66;
  4727.   ord_WinQuerySwitchList        = 67;
  4728.   ord_WinRemoveSwitchEntry      = 68;
  4729.   ord_WinSWitchToProgram        = 69;
  4730.   ord_WinSwitchProgramRegister  = 70;
  4731.   ord_WinEndProgram             = 73;
  4732.   ord_WinStopProgram            = 74;
  4733.   ord_WinEndWindowSession       = 75;
  4734.   ord_WinSwitchToTaskManager    = 78;
  4735.   ord_WinSwitchToProgram2       = 80;
  4736.   ord_WinProcessHotKey          = 81;
  4737.   ord_WinInitSession            = 82;
  4738.   ord_WinEndSession             = 83;
  4739.   ord_WinInitSwEntry            = 84;
  4740.   ord_WinSetSwEntry             = 85;
  4741.   ord_WinQueryExtIdFocus        = 86;
  4742.   ord_WinSetExtIdFocus          = 87;
  4743.   ord_WinNoShutdown             = 91;
  4744.   ord_WinSetTitle               = 93;
  4745.   ord_WinSetTitleAndIcon        = 97;
  4746.   ord_Prf32QueryProfileSize     = 101;
  4747.   ord_Prf32OpenProfile          = 102;
  4748.   ord_Prf32CloseProfile         = 103;
  4749.   ord_Prf32RemoveProgram        = 104;
  4750.   ord_Prf32DestroyGroup         = 106;
  4751.   ord_Prf32QueryProfile         = 107;
  4752.   ord_Prf32Reset                = 108;
  4753.   ord_Prf32AddProgram           = 109;
  4754.   ord_Prf32ChangeProgram        = 110;
  4755.   ord_Prf32QueryDefinition      = 111;
  4756.   ord_Prf32QueryProgramTitles   = 113;
  4757.   ord_Prf32QueryProfileInt      = 114;
  4758.   ord_Prf32QueryProfileString   = 115;
  4759.   ord_Prf32WriteProfileString   = 116;
  4760.   ord_Prf32QueryProfileData     = 117;
  4761.   ord_Prf32WriteProfileData     = 118;
  4762.   ord_Win32StartApp             = 119;
  4763.   ord_Win32AddSwitchEntry       = 120;
  4764.   ord_Win32CreateSwitchEntry    = 121;
  4765.   ord_Win32QuerySessionTitle    = 122;
  4766.   ord_Win32ChangeSwitchEntry    = 123;
  4767.   ord_Win32QuerySwitchEntry     = 124;
  4768.   ord_Win32QuerySwitchHandle    = 125;
  4769.   ord_Win32QuerySwitchKist      = 126;
  4770.   ord_Win32QueryTaskSizePos     = 127;
  4771.   ord_Win32QueryTaskTitle       = 128;
  4772.   ord_Win32RemoveSwitchEntry    = 129;
  4773.   ord_Win32TerminateApp         = 130;
  4774.   ord_Win32SwitchToProgram      = 131;
  4775.   ord_Win32SwitchProgramRegister= 156;
  4776.   ord_WinStartApp               = 201;
  4777.   ord_WinHAppFromPID            = 208;
  4778.   ord_WinHSwitchFromHApp        = 209;
  4779. { QUECALLS }
  4780.   ord_DosReadQueue              = 1;
  4781.   ord_DosPurgeQueue             = 2;
  4782.   ord_DosCloseQueue             = 3;
  4783.   ord_DosQueryQueue             = 4;
  4784.   ord_DosPeekQueue              = 5;
  4785.   ord_DosWriteQueue             = 6;
  4786.   ord_DosOpenQueue              = 7;
  4787.   ord_DosCreateQueue            = 8;
  4788.   ord_Dos32ReadQueue            = 9;
  4789.   ord_Dos32PurgeQueue           = 10;
  4790.   ord_Dos32CloseQueue           = 11;
  4791.   ord_Dos32QueryQueue           = 12;
  4792.   ord_Dos32PeekQueue            = 13;
  4793.   ord_Dos32WriteQueue           = 14;
  4794.   ord_Dos32OpenQueue            = 15;
  4795.   ord_Dos32CreateQueue          = 16;
  4796. { SESMGR }
  4797.   ord_DosStopSession            = 8;
  4798.   ord_DosSelectSession          = 9;
  4799.   ord_DosSetSession             = 14;
  4800.   ord_DosStartSession           = 17;
  4801.   ord_DosSmRegisterDD           = 29;
  4802.   ord_Dos32StartSession         = 37;
  4803.   ord_Dos32SelectSession        = 38;
  4804.   ord_Dos32SetSession           = 39;
  4805.   ord_Dos32StopSession          = 40;
  4806. { PMSTDDLG }
  4807.   ord_WInFontDlg                = 2;
  4808.   ord_WinDefFontDlgProc         = 3;
  4809.   ord_WinFileDlg                = 4;
  4810.   ord_WinDefFileDlgProc         = 5;
  4811.   ord_WinFreeFileDlgList        = 6;
  4812. { VIOCALLS }
  4813.   ord_VioEndPopup               = 1;
  4814.   ord_VioGetPhysBuf             = 2;
  4815.   ord_VioGetAnsi                = 3;
  4816.   ord_VioSetAnsi                = 5;
  4817.   ord_VioDeRegister             = 6;
  4818.   ord_VioScrollUp               = 7;
  4819.   ord_VioPrtSc                  = 8;
  4820.   ord_VioGetCurPos              = 9;
  4821.   ord_VioWrtCellStr             = 10;
  4822.   ord_VioPopup                  = 11;
  4823.   ord_VioScrollRt               = 12;
  4824.   ord_VioWrtCharStr             = 13;
  4825.   ord_VioSetCurPos              = 15;
  4826.   ord_VioScrUnlock              = 18;
  4827.   ord_VioWrtTTY                 = 19;
  4828.   ord_VioGetMode                = 21;
  4829.   ord_VioSetMode                = 22;
  4830.   ord_VioScrLock                = 23;
  4831.   ord_VioReadCellStr            = 24;
  4832.   ord_VioSavRedrawWait          = 25;
  4833.   ord_VioWrtNAttr               = 26;
  4834.   ord_VioGetCurType             = 27;
  4835.   ord_VioSavRedrawUndo          = 28;
  4836.   ord_VioGetFont                = 29;
  4837.   ord_VioReadCharStr            = 30;
  4838.   ord_VioGetBuf                 = 31;
  4839.   ord_VioSetCurType             = 32;
  4840.   ord_VioSetFont                = 33;
  4841.   ord_VioModeUndo               = 35;
  4842.   ord_VioModeWait               = 37;
  4843.   ord_VioGetCP                  = 40;
  4844.   ord_VioSetCP                  = 42;
  4845.   ord_VioShowBuf                = 43;
  4846.   ord_VioScrollLf               = 44;
  4847.   ord_VioRegister               = 45;
  4848.   ord_VioGetConfig              = 46;
  4849.   ord_VioScrollDn               = 47;
  4850.   ord_VioWrtCharStrAtt          = 48;
  4851.   ord_VioGetState               = 49;
  4852.   ord_VioPrtScToggle            = 50;
  4853.   ord_VioSetState               = 51;
  4854.   ord_VioWrtNCell               = 52;
  4855.   ord_VioWrtNChar               = 53;
  4856.   ord_VioAssociate              = 55;
  4857.   ord_VioCreatePS               = 56;
  4858.   ord_VioDeleteSetID            = 57;
  4859.   ord_VioGetDeviceCellSize      = 58;
  4860.   ord_VioGetOrg                 = 59;
  4861.   ord_VioCreateLogFont          = 60;
  4862.   ord_VioDestroyPS              = 61;
  4863.   ord_VioQuerySetIds            = 62;
  4864.   ord_VioSetOrg                 = 63;
  4865.   ord_VioQueryFonts             = 64;
  4866.   ord_VioSetDeviceCellSize      = 65;
  4867.   ord_VioShowPS                 = 66;
  4868.   ord_VioGetPSAddress           = 67;
  4869.   ord_VioGlobalReg              = 70;
  4870.   ord_XVioSetCAState            = 71;
  4871.   ord_XVioCheckCharType         = 72;
  4872.   ord_XVioDestroyCA             = 73;
  4873.   ord_XVioCreateCA              = 74;
  4874.   ord_VioCheckCharType          = 75;
  4875.   ord_XVioGetCAState            = 76;
  4876. { PMVIOP }
  4877.   ord_WinDefAVioWindowProc      = 30;
  4878.  
  4879. {----[ BaseMid ]----}
  4880. { Message numbers in the OS/2 .MSG file }
  4881.  
  4882.   msg_Response_Data             = 0;
  4883.   msg_Invalid_Function          = 1;
  4884.   msg_File_Not_Found            = 2;
  4885.   msg_Path_Not_Found            = 3;
  4886.   msg_Out_Of_Handles            = 4;
  4887.   msg_Access_Denied             = 5;
  4888.   msg_Invalid_Handle            = 6;
  4889.   msg_Memory_Blocks_Bad         = 7;
  4890.   msg_No_Memory                 = 8;
  4891.   msg_Invalid_Mem_Addr          = 9;
  4892.   msg_Invalid_Environ           = 10;
  4893.   msg_Invalid_Format            = 11;
  4894.   msg_Invalid_Acc_Code          = 12;
  4895.   msg_Invalid_Data              = 13;
  4896.   msg_Invalid_Drive             = 15;
  4897.   msg_Att_Rd_Curdir             = 16;
  4898.   msg_Not_Same_Device           = 17;
  4899.   msg_No_More_Files             = 18;
  4900.   msg_Att_Write_Prot            = 19;
  4901.   msg_Unknown_Unit              = 20;
  4902.   msg_Drive_Not_Ready           = 21;
  4903.   msg_Unknown_Command           = 22;
  4904.   msg_Data_Error                = 23;
  4905.   msg_Bad_Req_Structure         = 24;
  4906.   msg_Seek_Error                = 25;
  4907.   msg_Unknown_Media             = 26;
  4908.   msg_Sector_Not_Found          = 27;
  4909.   msg_Out_Of_Paper              = 28;
  4910.   msg_Write_Fault               = 29;
  4911.   msg_Read_Fault                = 30;
  4912.   msg_General_Failure           = 31;
  4913.   msg_Sharing_Violation         = 32;
  4914.   msg_Shar_Violat_Find          = 32;
  4915.   msg_Lock_Violation            = 33;
  4916.   msg_Invalid_Disk_Change       = 34;
  4917.   msg_35                        = 35;
  4918.   msg_Sharing_Buff_Oflow        = 36;
  4919.   msg_Error_Write_Protect       = 37;
  4920.   msg_Error_Bad_Unit            = 38;
  4921.   msg_Error_Not_Ready           = 39;
  4922.   msg_Error_Bad_Command         = 40;
  4923.   msg_Error_CRC                 = 41;
  4924.   msg_Error_Bad_Length          = 42;
  4925.   msg_Error_Seek                = 43;
  4926.   msg_Error_Not_Dos_Disk        = 44;
  4927.   msg_Error_Sector_Not_Found    = 45;
  4928.   msg_Error_Out_Of_Paper        = 46;
  4929.   msg_Error_Write_Fault         = 47;
  4930.   msg_Error_Read_Fault          = 48;
  4931.   msg_Error_Gen_Failure         = 49;
  4932.   msg_Net_Req_Not_Support       = 50;
  4933.   msg_Net_Remote_Not_Online     = 51;
  4934.   msg_Net_Dup_FilenamE          = 52;
  4935.   msg_Net_Path_Not_Found        = 53;
  4936.   msg_Net_Busy                  = 54;
  4937.   msg_Net_Dev_Not_Installed     = 55;
  4938.   msg_Net_Bios_Limit_Reached    = 56;
  4939.   msg_Net_Adapt_Hrdw_Error      = 57;
  4940.   msg_Net_Incorrect_Response    = 58;
  4941.   msg_Net_Unexpect_Error        = 59;
  4942.   msg_Net_Remot_Adpt_Incomp     = 60;
  4943.   msg_Net_Print_Q_Full          = 61;
  4944.   msg_Net_No_Space_To_Print_Fl  = 62;
  4945.   msg_Net_Print_File_Deleted    = 63;
  4946.   msg_Net_Name_Deleted          = 64;
  4947.   msg_Net_Access_Denied         = 65;
  4948.   msg_Net_Dev_Type_Invalid      = 66;
  4949.   msg_Net_Name_Not_Found        = 67;
  4950.   msg_Net_Name_Limit_Exceed     = 68;
  4951.   msg_Net_Bios_Limit_Exceed     = 69;
  4952.   msg_Net_Temp_Paused           = 70;
  4953.   msg_Net_Request_Denied        = 71;
  4954.   msg_Net_Prt_Dsk_Redir_Pause   = 72;
  4955.   msg_XGA_Out_Memory            = 75;
  4956.   msg_File_Exists               = 80;
  4957.   msg_Cannot_Make               = 82;
  4958.   msg_Net_Fail_Int_Two_Four     = 83;
  4959.   msg_Net_Too_Many_Redirect     = 84;
  4960.   msg_Net_Dup_Redirection       = 85;
  4961.   msg_Net_Invalid_PassWord      = 86;
  4962.   msg_Net_Incorr_Parameter      = 87;
  4963.   msg_Net_Data_Fault            = 88;
  4964.   msg_No_Proc_Slots             = 89;
  4965.   msg_Device_In_Use             = 99;
  4966.   msg_Too_Many_Semaphores       = 100;
  4967.   msg_Excl_Sem_Already_Owned    = 101;
  4968.   msg_Sem_Is_Set                = 102;
  4969.   msg_Too_Many_Sem_Requests     = 103;
  4970.   msg_Invalid_At_Interrupt_Time = 104;
  4971.   msg_Sem_Owner_Died            = 105;
  4972.   msg_Error_Disk_Change         = 106;
  4973.   msg_Disk_Change               = 107;
  4974.   msg_Drive_Locked              = 108;
  4975.   msg_Broken_Pipe               = 109;
  4976.   msg_Error_Open_Failed         = 110;
  4977.   msg_Error_Filename_Long       = 111;
  4978.   msg_Disk_Full                 = 112;
  4979.   msg_No_Search_Handles         = 113;
  4980.   msg_Err_Inv_Tar_Handle        = 114;
  4981.   msg_Invalid_Category          = 117;
  4982.   msg_Invalid_Verify_Switch     = 118;
  4983.   msg_Bad_Driver_Level          = 119;
  4984.   msg_Bad_DynaLink              = 120;
  4985.   msg_Sem_Timeout               = 121;
  4986.   msg_Insufficient_Buffer       = 122;
  4987.   msg_Invalid_Name              = 123;
  4988.   msg_HPFS_Invalid_Volume_Char  = 123;
  4989.   msg_Invalid_Level             = 124;
  4990.   msg_No_Volume_Label           = 125;
  4991.   msg_Mod_Not_Found             = 126;
  4992.   msg_Proc_Not_Found            = 127;
  4993.   msg_Prot_Mode_Only            = 129;
  4994.   msg_Appl_SingleFrameChar      = 130;
  4995.   msg_Appl_DoubleFrameChar      = 131;
  4996.   msg_Appl_ArrowChar            = 132;
  4997.   msg_Join_On_Driv_Is_Tar       = 133;
  4998.   msg_Join_Drive_Is             = 134;
  4999.   msg_Sub_Drive_Is              = 135;
  5000.   msg_Drive_Is_Not_Joined       = 136;
  5001.   msg_Drive_Not_Substed         = 137;
  5002.   msg_Join_Cannot_Join_Drive    = 138;
  5003.   msg_Sub_Cannot_Subst_Drive    = 139;
  5004.   msg_Join_Cannot_Sub_Drive     = 140;
  5005.   msg_Sub_Cannot_Join_Drive     = 141;
  5006.   msg_Drive_Is_Busy             = 142;
  5007.   msg_Join_Sub_Same_Drive       = 143;
  5008.   msg_Direct_Is_Not_Subdir      = 144;
  5009.   msg_Direct_Is_Not_Empty       = 145;
  5010.   msg_Path_Used_Subst_Join      = 146;
  5011.   msg_No_Needed_Resources       = 147;
  5012.   msg_Path_Busy                 = 148;
  5013.   msg_Sub_On_Drive_Is_Join      = 149;
  5014.   msg_System_Trace              = 150;
  5015.   msg_Invalid_Event_Count       = 151;
  5016.   msg_Too_Many_MuxWaiters       = 152;
  5017.   msg_Invalid_List_Format       = 153;
  5018.   msg_Volume_Too_Long           = 154;
  5019.   msg_HPFS_Vol_Label_Long       = 154;
  5020.   msg_Too_Many_Tcbs             = 155;
  5021.   msg_Signal_Refused            = 156;
  5022.   msg_Discarded                 = 157;
  5023.   msg_Not_Locked                = 158;
  5024.   msg_Bad_ThreadID_Addr         = 159;
  5025.   msg_Bad_Arguments             = 160;
  5026.   msg_Signal_Pending            = 162;
  5027.   msg_Max_Thrds_Reached         = 164;
  5028.   msg_Unc_Driver_Not_Installed  = 166;
  5029.   msg_Lock_Failed               = 167;
  5030.   msg_SwapIO_Failed             = 168;
  5031.   msg_SwapIn_Attempt_Failed     = 169;
  5032.   msg_Segment_Busy              = 170;
  5033.   msg_Int_Too_Long              = 171;
  5034.   msg_Unlock_Violation          = 173;
  5035.   msg_Invalid_Segment_Num       = 180;
  5036.   msg_Invalid_OrdinaL           = 182;
  5037.   msg_Invalid_Flag_Number       = 186;
  5038.   msg_Sem_Not_Found             = 187;
  5039.   msg_Invalid_Starting_CodeSeg  = 188;
  5040.   msg_Invalid_StackSeg          = 189;
  5041.   msg_Invalid_ModuleType        = 190;
  5042.   msg_Invalid_Exe_Signature     = 191;
  5043.   msg_Exe_Marked_Invalid        = 192;
  5044.   msg_Bad_Exe_Format            = 193;
  5045.   msg_Iterated_Data_Exceeds_64K = 194;
  5046.   msg_Invalid_MinAllocSize      = 195;
  5047.   msg_DynLink_From_Invalid_Ring = 196;
  5048.   msg_IOPL_Not_Enabled          = 197;
  5049.   msg_Invalid_SegDPL            = 198;
  5050.   msg_AutoDataSeg_Exceeds_64K   = 199;
  5051.   msg_CodeSeg_Cannot_Be_64K     = 200;
  5052.   msg_Reloc_Chain_Xeeds_Segment = 201;
  5053.   msg_Infloop_In_Reloc_Chain    = 202;
  5054.   msg_EnvVar_Not_Found          = 203;
  5055.   msg_Signal_Not_Sent           = 205;
  5056.   msg_Name_Too_Long             = 206;
  5057.   msg_Ring2_Stack_In_Use        = 207;
  5058.   msg_Wild_Card_Name            = 208;
  5059.   msg_Invalid_Signal_NumBER     = 209;
  5060.   msg_Thread_1_Inactive         = 210;
  5061.   msg_Locked                    = 212;
  5062.   msg_Too_Many_Modules          = 214;
  5063.   msg_Cannot_Shrink             = 216;
  5064.   msg_Invalid_ExitRoutine_Ring  = 219;
  5065.   msg_No_Children               = 228;
  5066.   msg_Error_Bad_Pipe            = 230;
  5067.   msg_Error_Pipe_Busy           = 231;
  5068.   msg_Error_No_Data             = 232;
  5069.   msg_Error_Pipe_Not_Connected  = 233;
  5070.   msg_Error_More_Data           = 234;
  5071.   msg_Error_VC_Disconnected     = 240;
  5072.   msg_Circularity_Requested     = 250;
  5073.   msg_Directory_In_CDS          = 251;
  5074.   msg_Invalid_Fsd_Name          = 252;
  5075.   msg_Invalid_Path              = 253;
  5076.   msg_Invalid_EA_Name           = 254;
  5077.   msg_EA_List_Inconsistent      = 255;
  5078.   msg_EA_List_Too_Long          = 256;
  5079.   msg_No_Meta_Match             = 257;
  5080.   msg_FindNotify_Timeout        = 258;
  5081.   msg_No_More_Items             = 259;
  5082.   msg_Search_Struc_Reused       = 260;
  5083.   msg_Char_Not_Found            = 261;
  5084.   msg_Too_Much_Stack            = 262;
  5085.   msg_Invalid_Attr              = 263;
  5086.   msg_Invalid_Starting_Ring     = 264;
  5087.   msg_Invalid_DLL_Init_Ring     = 265;
  5088.   msg_Cannot_Copy               = 266;
  5089.   msg_Directory                 = 267;
  5090.   msg_OpLocked_File             = 268;
  5091.   msg_OpLock_Thread_Exists      = 269;
  5092.   msg_Error_EAs_Corrupt         = 276;
  5093.   msg_EA_Table_Full             = 277;
  5094.   msg_Invalid_EA_Handle         = 278;
  5095.   msg_No_Cluster                = 279;
  5096.   msg_Error_Create_EA_File      = 280;
  5097.   msg_Cannot_Open_File          = 281;
  5098.   msg_EAs_Not_Supported         = 282;
  5099.   msg_Need_EAs_Found            = 283;
  5100.   msg_EAs_Discarded             = 284;
  5101.   msg_Duplicate_Sem_Name        = 285;
  5102.   msg_Empty_MuxWait_Sem         = 286;
  5103.   msg_Mutex_Sem_Owned           = 287;
  5104.   msg_Not_Mutex_Sem_Owner       = 288;
  5105.   msg_Query_Mux_Param_Too_Small = 289;
  5106.   msg_Too_Many_Sem_Handles      = 290;
  5107.   msg_Too_Many_Sem_Opens        = 291;
  5108.   msg_Sem_Wrong_Type            = 292;
  5109.   msg_Too_Many_Event_Sem_Posts  = 298;
  5110.   msg_Event_Sem_Already_Posted  = 299;
  5111.   msg_Event_Sem_Already_Reset   = 300;
  5112.   msg_Sem_Busy                  = 301;
  5113.   msg_MR_Msg_Too_Long           = 316;
  5114.   msg_MR_Cant_Format            = 317;
  5115.   msg_MR_Not_Found              = 318;
  5116.   msg_MR_Read_Error             = 319;
  5117.   msg_MR_Ivcount_Error          = 320;
  5118.   msg_MR_Un_Perform             = 321;
  5119.   msg_Que_Proc_Not_Owned        = 330;
  5120.   msg_Que_Duplicate             = 332;
  5121.   msg_Que_Element_Not_Exist     = 333;
  5122.   msg_Que_No_Memory             = 334;
  5123.   msg_Vio_Invalid_Mask          = 349;
  5124.   msg_Vio_Ptr                   = 350;
  5125.   msg_Dis_Error                 = 355;
  5126.   msg_Vio_Width                 = 356;
  5127.   msg_Vio_Row                   = 358;
  5128.   msg_Vio_Col                   = 359;
  5129.   msg_Vio_Wait_Flag             = 366;
  5130.   msg_Vio_UNLOCK                = 367;
  5131.   msg_Smg_Invalid_Session_Id    = 369;
  5132.   msg_Smg_Grp_Not_Found         = 371;
  5133.   msg_Smg_Session_Not_Found     = 371;
  5134.   msg_Smg_Set_Title             = 372;
  5135.   msg_Kbd_Parameter             = 373;
  5136.   msg_Kbd_Invalid_IoWait        = 375;
  5137.   msg_Kbd_Invalid_Length        = 376;
  5138.   msg_Kbd_Invalid_Echo_Mask     = 377;
  5139.   msg_Kbd_Invalid_Input_Mask    = 377;
  5140.   msg_Mon_Invalid_Parms         = 379;
  5141.   msg_Mon_Invalid_DevName       = 380;
  5142.   msg_Mon_Invalid_Handle        = 381;
  5143.   msg_Mon_Buffer_Too_Small      = 382;
  5144.   msg_Mon_Buffer_Empty          = 383;
  5145.   msg_Mon_Data_Too_Large        = 384;
  5146.   msg_Mouse_No_Device           = 385;
  5147.   msg_Mouse_Inv_Handle          = 386;
  5148.   msg_Mouse_Caller_Not_SybSys   = 387;
  5149.   msg_NLS_No_Country_File       = 396;
  5150.   msg_No_Country_Sys            = 396;
  5151.   msg_NLS_Open_Failed           = 397;
  5152.   msg_Open_Country_Sys          = 397;
  5153.   msg_NLS_No_Ctry_Code          = 398;
  5154.   msg_No_Country_OR_Codepage    = 398;
  5155.   msg_NLS_Table_Truncated       = 399;
  5156.   msg_NLS_Bad_Type              = 400;
  5157.   msg_NLS_Type_Not_Found        = 401;
  5158.   msg_Country_No_Type           = 401;
  5159.   msg_SwapIn_Failed             = 402;
  5160.   msg_SegValidate_Failure       = 403;
  5161.   msg_Vio_DeRegister            = 404;
  5162.   msg_Vio_No_Popup              = 405;
  5163.   msg_Vio_Existing_PopUp        = 406;
  5164.   msg_Kbd_Smg_Only              = 407;
  5165.   msg_Kbd_Invalid_Asciiz        = 408;
  5166.   msg_Kbd_Invalid_Mask          = 409;
  5167.   msg_Kbd_Register              = 410;
  5168.   msg_Kbd_Deregister            = 411;
  5169.   msg_Mouse_Smg_Only            = 412;
  5170.   msg_Mouse_Invalid_Asciiz      = 413;
  5171.   msg_Mouse_Invalid_Mask        = 414;
  5172.   msg_Mouse_Register            = 415;
  5173.   msg_Mouse_Deregister          = 416;
  5174.   msg_Smg_Bad_ACTION            = 417;
  5175.   msg_Smg_Invalid_Call          = 418;
  5176.   msg_Vio_Invalid_Parms         = 421;
  5177.   msg_Vio_Function_Owned        = 422;
  5178.   msg_Vio_Register              = 426;
  5179.   msg_Vio_No_Save_Restore_Thd   = 428;
  5180.   msg_Vio_In_BG                 = 429;
  5181.   msg_Vio_Illegal_During_PopUp  = 430;
  5182.   msg_Smg_Not_BaseShell         = 431;
  5183.   msg_Smg_Bad_StatusReq         = 432;
  5184.   msg_Vio_Lock                  = 434;
  5185.   msg_Mouse_Invalid_IoWait      = 435;
  5186.   msg_Vio_Invalid_Handle        = 436;
  5187.   msg_Vio_Invalid_Length        = 438;
  5188.   msg_Kbd_Invalid_Handle        = 439;
  5189.   msg_Kbd_No_More_Handle        = 440;
  5190.   msg_Kbd_Cannot_Create_Kcb     = 441;
  5191.   msg_Kbd_CodePage_Load_Incompl = 442;
  5192.   msg_Kbd_Invalid_CodePage_Id   = 443;
  5193.   msg_Kbd_No_CodePage_Support   = 444;
  5194.   msg_Kbd_Focus_Required        = 445;
  5195.   msg_Kbd_Focus_Already_Active  = 446;
  5196.   msg_Kbd_Keyboard_Busy         = 447;
  5197.   msg_Kbd_Invalid_CodePage      = 448;
  5198.   msg_Kbd_Unable_To_Focus       = 449;
  5199.   msg_Smg_Session_Non_Select    = 450;
  5200.   msg_Smg_Session_Not_Foregrnd  = 451;
  5201.   msg_Smg_Session_Not_Parent    = 452;
  5202.   msg_Smg_Invalid_Start_Mode    = 453;
  5203.   msg_Smg_Invalid_Related_Opt   = 454;
  5204.   msg_Smg_Invalid_Bond_Option   = 455;
  5205.   msg_Smg_Invalid_Select_Opt    = 456;
  5206.   msg_Smg_Start_In_Background   = 457;
  5207.   msg_Smg_Invalid_Stop_Option   = 458;
  5208.   msg_Smg_Bad_Reserve           = 459;
  5209.   msg_Smg_Process_Not_Parent    = 460;
  5210.   msg_Smg_Invalid_Data_Length   = 461;
  5211.   msg_Smg_Not_Bound             = 462;
  5212.   msg_Smg_Retry_Sub_Alloc       = 463;
  5213.   msg_Kbd_Detached              = 464;
  5214.   msg_Vio_Detached              = 465;
  5215.   msg_Mou_Detached              = 466;
  5216.   msg_Vio_Font                  = 467;
  5217.   msg_Vio_User_Font             = 468;
  5218.   msg_Vio_Bad_Cp                = 469;
  5219.   msg_Vio_NA_Cp                 = 471;
  5220.   msg_Smg_Invalid_Trace_OPTION  = 478;
  5221.   msg_Vio_Shell_Init            = 480;
  5222.   msg_Smg_No_Hard_Errors        = 481;
  5223.   msg_Vio_Transparent_PopUp     = 483;
  5224.   msg_Vio_Bad_Reserve           = 486;
  5225.   msg_Invalid_Address           = 487;
  5226.   msg_Zero_Selectors_Requested  = 488;
  5227.   msg_Not_Enough_Selectors_Ava  = 489;
  5228.   msg_Invalid_Selector          = 490;
  5229.   msg_Smg_Invalid_Program_Type  = 491;
  5230.   msg_Smg_Invalid_Pgm_Control   = 492;
  5231.   msg_Smg_Invalid_Inherit_Opt   = 493;
  5232.   msg_Vio_Extended_Sg           = 494;
  5233.   msg_Vio_Not_Pres_Mgr_Sg       = 495;
  5234.   msg_Vio_Shield_Owned          = 496;
  5235.   msg_Vio_No_More_Handles       = 497;
  5236.   msg_Kbd_No_Console            = 500;
  5237.   msg_Dos_Stopped               = 501;
  5238.   msg_Mouse_Invalid_Handle      = 502;
  5239.   msg_Smg_Invalid_Debug_Parms   = 503;
  5240.   msg_Kbd_Extended_SG           = 504;
  5241.   msg_Mou_Extended_SG           = 505;
  5242.   msg_Trc_Pid_Non_Existent      = 507;
  5243.   msg_Trc_Count_Active          = 508;
  5244.   msg_Trc_Suspended_By_Count    = 509;
  5245.   msg_Trc_Count_Inactive        = 510;
  5246.   msg_Trc_Count_Reached         = 511;
  5247.   msg_No_Mc_Trace               = 512;
  5248.   msg_MC_Trace                  = 513;
  5249.   msg_Trc_Count_Zero            = 514;
  5250.   msg_Smg_Too_Many_Dds          = 515;
  5251.   msg_Smg_Invalid_Notification  = 516;
  5252.   msg_LF_Invalid_Function       = 517;
  5253.   msg_LF_Not_Avail              = 518;
  5254.   msg_LF_Suspended              = 519;
  5255.   msg_LF_Buf_Too_Small          = 520;
  5256.   msg_LF_Buf_Full               = 521;
  5257.   msg_LF_Inval_Record           = 522;
  5258.   msg_LF_Inval_Service          = 523;
  5259.   msg_LF_General_Failure        = 524;
  5260.   msg_HPFS_Disk_Already_InUse   = 525;
  5261.   msg_HPFS_Cannot_Format_Disk   = 526;
  5262.   msg_HPFS_Cannot_Copy_Sys_Data = 527;
  5263.   msg_HPFS_Format_Not_Done      = 528;
  5264.   msg_HPFS_Fmt_Not_Enough_Mem   = 529;
  5265.   msg_HPFS_Specify_FixDsk       = 530;
  5266.   msg_HPFS_Specify_One_Drive    = 531;
  5267.   msg_HPFS_Unknown_Err_No_Format= 532;
  5268.   msg_HPFS_Syntax_Help          = 533;
  5269.   msg_HPFS_Disk_Formating       = 534;
  5270.   msg_HPFS_Avail_Disk_Space     = 535;
  5271.   msg_HPFS_Bad_Blocks           = 536;
  5272.   msg_HPFS_Disk_Space_Avail     = 537;
  5273.   msg_HPFS_Space_Formatted      = 538;
  5274.   msg_HPFS_Type_Cur_Volume_Label= 539;
  5275.   msg_HPFS_Driver_Not_Loaded    = 540;
  5276.   msg_HPFS_Driver_Loader        = 541;
  5277.   msg_HPFS_Cache_Buf_Specified  = 542;
  5278.   msg_HPFS_ChkDsk_Parm_Error    = 543;
  5279.   msg_HPFS_ChkDsk_NoAccess_Drive= 544;
  5280.   msg_HPFS_Unknown_Err_No_ChkDsk= 545;
  5281.   msg_HPFS_ChkDsk_Not_Enough_Mem= 546;
  5282.   msg_HPFS_ChkDsk_NoWriteOData  = 547;
  5283.   msg_HPFS_ChkDsk_NoRecover_Data= 548;
  5284.   msg_HPFS_ChkDsk_No_Parm_Space = 549;
  5285.   msg_HPFS_ChkDsk_NoRecognize   = 550;
  5286.   msg_HPFS_ChkDsk_NoRoot_Find   = 551;
  5287.   msg_HPFS_ChkDsk_NoFix_FS_Error= 552;
  5288.   msg_HPFS_ChkDsk_Correct_FS_Err= 553;
  5289.   msg_HPFS_ChkDsk_Organ_Fix     = 554;
  5290.   msg_HPFS_ChkDsk_Reloc_BBPData = 555;
  5291.   msg_HPFS_ChkDsk_Rem_Corru_Bloc= 556;
  5292.   msg_HPFS_ChkDsk_Rem_Corrup_Fil= 557;
  5293.   msg_HPFS_ChkDsk_Fix_Space_Allo= 558;
  5294.   msg_HPFS_Not_Formatted_Disk   = 559;
  5295.   msg_HPFS_ChkDsk_Cor_Alloc     = 560;
  5296.   msg_HPFS_ChkDsk_Searc_Unalloc = 561;
  5297.   msg_HPFS_ChkDsk_Det_Lost_Data = 562;
  5298.   msg_HPFS_ChkDsk_Percent_Searc = 563;
  5299.   msg_HPFS_ChkDsk_Lost_Datasearc= 564;
  5300.   msg_HPFS_ChkDsk_Crit_NoRead   = 565;
  5301.   msg_HPFS_ChkDsk_Disk_InUse    = 566;
  5302.   msg_HPFS_ChkDsk_RecovTemp_Reloc = 567;
  5303.   msg_HPFS_Total_Disk_Space     = 568;
  5304.   msg_HPFS_Dir_kBytes           = 569;
  5305.   msg_HPFS_File_kBytes          = 570;
  5306.   msg_HPFS_kBytes_Available     = 571;
  5307.   msg_HPFS_ChkDsk_Place_Rec_File= 572;
  5308.   msg_HPFS_ChkDsk_Reco_Dir_As   = 573;
  5309.   msg_HPFS_ChkDsk_PlaceEd_Data  = 574;
  5310.   msg_HPFS_ChkDsk_Recov_EA      = 575;
  5311.   msg_HPFS_ChkDsk_Find_EA_Intem = 576;
  5312.   msg_HPFS_ChkDsk_Reloc_Temp_EA = 577;
  5313.   msg_HPFS_ChkDsk_Reloc_AC_List = 578;
  5314.   msg_HPFS_ChkDsk_List_NoReloc  = 579;
  5315.   msg_HPFS_ChkDsk_Trun_EA_List  = 580;
  5316.   msg_HPFS_ChkDsk_Trun_EA_Name  = 581;
  5317.   msg_HPFS_ChkDsk_Trun_EA_Bblock= 582;
  5318.   msg_HPFS_ChkDsk_Rem_Invalid_EA= 583;
  5319.   msg_HPFS_ChkDsk_Fix_EA_Alloc  = 584;
  5320.   msg_HPFS_ChkDsk_Fix_Alaccctrl = 585;
  5321.   msg_HPFS_ChkDsk_Acctr_List_BBL= 586;
  5322.   msg_HPFS_ChkDsk_Rem_Aclist    = 587;
  5323.   msg_HPFS_ChkDsk_Found_DataNorl= 588;
  5324.   msg_HPFS_Wrong_Version        = 589;
  5325.   msg_HPFS_ChkDsk_Found_DataTemp= 590;
  5326.   msg_HPFS_ChkDsk_Fix_TempStatus= 591;
  5327.   msg_HPFS_ChkDsk_Fix_NeedEAdata= 592;
  5328.   msg_HPFS_Recover_Parm_Error   = 593;
  5329.   msg_HPFS_Recov_File_Not_Found = 594;
  5330.   msg_HPFS_Recov_Unknown_Error  = 595;
  5331.   msg_HPFS_Recov_Not_Enough_Mem = 596;
  5332.   msg_HPFS_Recov_NoWrite_Data   = 597;
  5333.   msg_HPFS_Recov_NoTemp_Create  = 598;
  5334.   msg_HPFS_Recov_EA_NoRead      = 599;
  5335.   msg_HPFS_Recov_File_Bytes     = 600;
  5336.   msg_HPFS_Recov_Bad_Bytes_Recov= 601;
  5337.   msg_HPFS_Recov_FileBytes_Norec= 602;
  5338.   msg_HPFS_Recov_Disk_InUse     = 603;
  5339.   msg_HPFS_Recov_File_NoDelete  = 604;
  5340.   msg_HPFS_Recov_NoCreate_NewFile = 605;
  5341.   msg_HPFS_Recov_System_Error   = 606;
  5342.   msg_HPFS_Sys_Parm_Error       = 607;
  5343.   msg_HPFS_Sys_Cannot_Install   = 608;
  5344.   msg_HPFS_Sys_Drive_NotFormated= 609;
  5345.   msg_HPFS_Sys_File_NoCreate    = 610;
  5346.   msg_HPFS_Size_Exceed          = 611;
  5347.   msg_HPFS_Syntax_Err           = 612;
  5348.   msg_HPFS_NotEnough_Mem        = 613;
  5349.   msg_HPFS_Want_Mem             = 614;
  5350.   msg_HPFS_Get_Returned         = 615;
  5351.   msg_HPFS_Set_Returned         = 616;
  5352.   msg_HPFS_Both_Returned        = 617;
  5353.   msg_HPFS_Stop_Returned        = 618;
  5354.   msg_HPFS_SetPrtyReturned      = 619;
  5355.   msg_HPFS_Alcsg_Returned       = 620;
  5356.   msg_HPFS_Msec_Set             = 621;
  5357.   msg_HPFS_Options              = 622;
  5358.   msg_HPFS_Pos_Num_Value        = 623;
  5359.   msg_HPFS_Value_Too_Large      = 624;
  5360.   msg_HPFS_Lazy_Not_Valid       = 625;
  5361.   msg_HPFS_Volume_Error         = 626;
  5362.   msg_HPFS_Volume_Dirty         = 627;
  5363.   msg_HPFS_New_Sector           = 628;
  5364.   msg_HPFS_Format_Parm_Error    = 629;
  5365.   msg_HPFS_Cannot_Access_Config = 630;
  5366.   msg_HPFS_Recov_File           = 631;
  5367.   msg_HPFS_ChkDsk_kBytes_Reserve= 632;
  5368.   msg_HPFS_ChkDsk_kBytes_In_EA  = 633;
  5369.   msg_HPFS_Bytebuf_Set          = 634;
  5370.   msg_HPFS_Formatting_Complete  = 635;
  5371.   msg_HPFS_Wrong_Volume_Label   = 636;
  5372.   msg_HPFS_Fmat_Too_Many_DRS    = 637;
  5373.   msg_Vdd_Unsupported_Access    = 638;
  5374.   msg_REC_Warning               = 640;              { 81565 }
  5375.   msg_Vdd_Missing               = 651;
  5376.   msg_HPFS_Lazy_On              = 689;
  5377.   msg_HPFS_Lazy_Off             = 690;
  5378.   msg_HPFS_Disk_Error_Warn      = 693;
  5379.   msg_Bad_Mon_Buffer            = 730;
  5380.   msg_Module_Corrupted          = 731;
  5381.   msg_Boot_Drive_Not_Accessible = 732;              { 86415,86005,85898 }
  5382.   msg_LF_Timeout                = 2055;
  5383.   msg_LF_Susp_Success           = 2057;
  5384.   msg_LF_Resum_Success          = 2058;
  5385.   msg_LF_Redir_Success          = 2059;
  5386.   msg_LF_Redir_Failure          = 2060;
  5387.  
  5388.   { 0 - 899 generated from bseerr.h by h.mak and basemid.sed }
  5389.  
  5390.   { 900 - 999 reserved for IBM Far East }
  5391.   { 1000 not used }
  5392.   msg_Bad_PARM1                 = 1001;     { invalid parm }
  5393.   msg_Bad_PARM2                 = 1002;     { invalid parm with specified input }
  5394.   msg_Bad_Syntax                = 1003;     { invalid syntax }
  5395.   msg_STAND_BY                  = 1004;     { stand by the process is in process }
  5396.   msg_Invalid_DATE              = 1036;     { invalid date }
  5397.   msg_Dev_INSTALL_FAIL          = 1111;     { device name from the header }
  5398.   msg_Dev_AT_ONLY               = 1112;     { non-ABIOS type driver installed }
  5399.   msg_Dev_PS2_ONLY              = 1113;     { ABIOS installed on an AT }
  5400.   msg_Dev_HW_UNSUPPORTED        = 1114;     { bad or imcompatable card }
  5401.   msg_Dev_HW_UNAVAILABLE        = 1115;     { adaptor not installed }
  5402.   msg_Dev_IRQ                   = 1116;     { IRQ call failed }
  5403.   msg_Dev_ABIOS                 = 1117;     { ABIOS not present error }
  5404.   msg_No_HELP_MSG               = 1118;     { no help msg. ID }
  5405.   { 1119 not used }
  5406.   msg_NEXT_DiskETTE             = 1120;     { Sys load next disk }
  5407.   { 1121 - 1190 not used }
  5408.   msg_SysInit_No_IFS_STMT       = 1191;     { no IFS statment in config.sys }
  5409.   msg_SysInit_287_DISABLED      = 1193;
  5410.   msg_SysInit_387_WITH_386B1    = 1194;
  5411.   msg_SysInit_INVAL_CMD         = 1195;     { Unrecognized command }
  5412.   msg_SysInit_INVAL_PARM        = 1196;     { Invalid parameter }
  5413.   msg_SysInit_MISSING_PARM      = 1197;     { Missing parameter }
  5414.   msg_SysInit_Bad_DOS_DD        = 1198;     { invalid DOS mode device driver }
  5415.   msg_SysInit_BOOT_Failure      = 1199;     { sys unable to start OS/2 }
  5416.   msg_SysInit_DOS_FAIL          = 1200;     { Cannot create DOS mode }
  5417.   msg_SysInit_UDRVR_FAIL        = 1201;     { user device driver failed to install }
  5418.   msg_SysInit_SDRVR_FAIL        = 1202;     { system device driver failed to install }
  5419.   msg_SysInit_UFILE_IOPL        = 1203;     { User file requires privilege level }
  5420.   msg_SysInit_SFILE_IOPL        = 1204;     { System file requires privilege level }
  5421.   msg_SysInit_DOS_MODIFIED      = 1205;     { DOS mode memory modified by DD }
  5422.   msg_SysInit_UFILE_No_MEM      = 1206;     { Out of memory loading user program or DD }
  5423.   { 1207 not used }
  5424.   msg_Incorrect_DOSVERSION      = 1210;     { incorrect DOS version }
  5425.   msg_ABORT_RTRY_IGNORE         = 1211;     { abort, retry, or ignore }
  5426.   msg_HPFS_Format_YES_No        = 1271;     { format disk, yes or no }
  5427.   msg_HPFS_Sys_Files_COPIED     = 1272;     { system files transferred }
  5428.   msg_HPFS_Bad_Blocks_CRIT_AREA = 1279;     { bad blocks in critical system areas }
  5429.   msg_HPFS_TYPE_Volume_Label    = 1288;     { Enter volume label }
  5430.   msg_HPFS_Specify_Drive_LETTER = 1310;     { FORMAT entered without drive letter, specify }
  5431.   msg_HPFS_DIRECTORY            = 1338;     { directory }
  5432.   msg_HPFS_ChkDsk_NoREAD_Data   = 1341;     { cannot read disk data }
  5433.  
  5434.   msg_SAD_Remote_DUMP           = 1394;     { remote dump initiated }
  5435.   msg_SAD_INSERT_DUMP           = 1395;     { insert dump disk - rasmsg }
  5436.   msg_SAD_Not_AVAILABLE         = 1398;     { dump not available }
  5437.  
  5438.   msg_DLL_CANT_LOAD_RESOURCE    = 1417;     { app resources not available }
  5439.  
  5440.   msg_SWAP_Invalid_Drive        = 1470;     { Invalid drive %1 specified SWAPPATH }
  5441.   msg_SWAP_Invalid_PATH         = 1471;     { Invalid path %1 specified in SWAPPATH }
  5442.   msg_SWAP_Cannot_Create        = 1472;     { Cannot create swap file %1 }
  5443.   msg_SWAP_DISABLED             = 1473;     { Segment swapping is disabled }
  5444.   msg_SWAP_CANT_INIT            = 1474;     { Cannot initialize swapper }
  5445.   msg_SysInit_BOOT_Not_FD       = 1475;
  5446.   msg_SWAP_Invalid_Path_ROOT    = 1476;     { invalid path %1 specified, use root }
  5447.   msg_STRI_File_Not_Found       = 1490;     { %1 file not found }
  5448.   msg_SWAP_Not_Ready            = 1500;     { diskette containing swap file not rdy }
  5449.   msg_SWAP_Write_ProtECT        = 1501;     { Diskette containing swap file wrpro }
  5450.   msg_SWAP_In_Error             = 1502;     { I/O error on swap file }
  5451.   msg_SWAP_IO_Error             = 1502;     { I/O error on swap file }
  5452.   msg_SWAP_File_Full            = 1503;     { Swap file is full }
  5453.   msg_SWAP_Table_Full           = 1504;     { Swap control table full }
  5454.   { 1517 not used }
  5455.   msg_SysInit_SFILE_Not_FND     = 1518;     { System file not found }
  5456.   msg_SysInit_SFILE_No_MEM      = 1519;     { Out of memory loading system program or DD }
  5457.   msg_SysInit_DSKT_Not_Installed= 1520;     { additional diskette drive not installed }
  5458.   msg_SysInit_Too_Many_PARMS    = 1521;     { Too many parms on line }
  5459.   msg_SysInit_DSKT_Installed_AS = 1522;     { diskette drive installed as letter %1 }
  5460.   msg_SysInit_MISSING_SYMB      = 1523;     { No equal or space }
  5461.   { 1708 not used }
  5462.   msg_SysInit_START_No_LOAD     = 1709;     { startup not loaded }
  5463.   msg_SysInit_START_No_INIT     = 1710;     { startup no initialize }
  5464.   { 1711 - 1717 not used }
  5465.   msg_SysInit_UFILE_Not_FND     = 1718;     { User file not found }
  5466.   msg_SysInit_UDRVR_INVAL       = 1719;     { User device driver invalid }
  5467.   msg_SysInit_FSD_Not_VAL       = 1720;     { data to ipl incorrect }
  5468.   msg_SysInit_BANNER            = 1721;     { Version banner message }
  5469.   msg_SysInit_CANT_LOAD_MOD     = 1722;     { Can't load module }
  5470.   msg_SysInit_EPT_MISSING       = 1723;     { Entry point missing }
  5471.   msg_SysInit_CANT_Open_CON     = 1724;     { Can't open con }
  5472.   msg_SysInit_WRONG_Handle      = 1725;     { wrong handle for standard input file }
  5473.   msg_SysInit_PRESS_ENTER       = 1726;     { Press enter to continue }
  5474.   msg_SysInit_CANT_GET_Cache    = 1727;     { Can't allocate cache memory }
  5475.   msg_SysInit_CANT_INIT_Cache   = 1728;     { not enough memory for diskcache }
  5476.   msg_SysInit_Vio_Cp            = 1729;     { VioSetCp failed }
  5477.   msg_SysInit_Kbd_Cp            = 1730;     { KbdSetCp failed }
  5478.   { 1731 - 1732 not used }
  5479.   msg_SysInit_SCFILE_INVAL      = 1733;     { System country file is bad }
  5480.   { 1734 not used }
  5481.   msg_SysInit_Cp_ASSUME         = 1735;     { Assumed codepage }
  5482.   { 1736 not used }
  5483.   msg_SysInit_Cp_FATAL          = 1737;     { Codepage switching disabled }
  5484.   msg_SysInit_Not_INIT_NMI      = 1738;     { cannot initial NMI ALSO FOR MODE MGR }
  5485.  
  5486.   msg_VLPT_No_SPOOL             = 1797;     { could not access spool file }
  5487.   msg_VCOM_Device_In_USE        = 1798;     { COM port in use }
  5488.   msg_VLPT_Device_Busy          = 1799;     { parallel port in use }
  5489.  
  5490.   { 1901 - 1914 utilmid2 }
  5491.   msg_ASYNC_Bad_ARBT            = 1903;     { COM02 bad arbit level }
  5492.   msg_INTERNAL_Error            = 1915;     { Internal error in the Kernel }
  5493.   msg_User_Error                = 1916;     { user error }
  5494.   msg_SysInit_UEXEC_FAIL        = 1919;     { User program won't execute }
  5495.   { 1920 - 1923 not used }
  5496.   msg_PAGE_Fault                = 1923;     { page fault trap }
  5497.   msg_INTERRUPTS_DISABLED       = 1924;     { system called with interrupts }
  5498.   msg_SysInit_SEXEC_FAIL        = 1925;     { System program won't execute }
  5499.   msg_GEN_Prot_Fault            = 1926;     { General protect fault trap d }
  5500.   msg_Change_INT_VECTOR         = 1927;     { real mode changed interrupt vector }
  5501.   msg_NoMEM_FOR_RELOAD          = 1928;     { no storage to reload code or segment }
  5502.   msg_STACK_OVERFLOW            = 1929;     { argument stack low }
  5503.   msg_Trap0                     = 1930;     { divide error }
  5504.   msg_Trap1                     = 1931;     { single step trap }
  5505.   msg_Trap2                     = 1932;     { hardware memory error }
  5506.   msg_Trap3                     = 1933;     { breakpoint instruction }
  5507.   msg_Trap4                     = 1934;     { computation overflow }
  5508.   msg_Trap5                     = 1935;     { index out of range }
  5509.   msg_Trap6                     = 1936;     { incorrect instruction }
  5510.   msg_Trap7                     = 1937;     { cannot process instruction }
  5511.   msg_Trap8                     = 1938;     { double exception error }
  5512.   msg_Trap9                     = 1939;     { math coprocessor }
  5513.   msg_TrapA                     = 1940;     { task state segment }
  5514.   msg_TrapB                     = 1941;     { segment not in memory }
  5515.   msg_TrapC                     = 1942;     { memory beyond the stack segment }
  5516.   msg_TrapD                     = 1943;     { bad segment value }
  5517.   msg_NMI                       = 1944;     { nonmaskable interrupt }
  5518.   msg_NMI_EXC1                  = 1945;     { error with memory system board }
  5519.   msg_NM12_EXC2                 = 1946;     { error memory cards }
  5520.   msg_NMI2_EXC3                 = 1947;     { timeout on dma }
  5521.   msg_NMI2_EXC4                 = 1948;     { timeout by watchdog timer }
  5522.   msg_TrapE                     = 1949;     { bad linear address }
  5523.   msg_NPXIEMSG                  = 1950;     { incorrect operation }
  5524.   msg_NPXDEMSG                  = 1951;     { denormalized operand }
  5525.   msg_NPXZEMSG                  = 1952;     { zero divide }
  5526.   msg_NPXOEMSG                  = 1953;     { overflow }
  5527.   msg_NPXUEMSG                  = 1954;     { underflow }
  5528.   msg_NPXPEMSG                  = 1955;     { precision }
  5529.   msg_NPXINSTEMSG               = 1956;     { error occurred at address }
  5530.   msg_NPXBADSW                  = 1957;     { bad coprocess.status Word }
  5531.   msg_PAGEMGR_Trap02_Mem_REC    = 1958;     { mem parity error phys loc }
  5532.   msg_PAGEMGR_Trap02_APP_TERM   = 1959;     { mem parity error phys loc }
  5533.   msg_SysInit_BOOT_Error        = 2025;     { boot error }
  5534.   msg_SysInit_BIO_Not_FD        = 2026;     { COMMAND.COM not found }
  5535.   msg_SysInit_INSER_DK          = 2027;     { Insert diskette }
  5536.   msg_SysInit_DOS_Not_FD        = 2028;     { IBMDOS.COM not found }
  5537.   msg_SysInit_DOS_Not_VAL       = 2029;     { IBMDOS.COM not valid }
  5538.   msg_SysInit_More_MEM          = 2030;     { need more memory }
  5539.   { 2031 - 2056 utilmid3 }
  5540.   { 2057 - 2062 not used }
  5541.   msg_SysInit_DOS_Too_BIG       = 2063;     { not enough memory for PC DOS mode }
  5542.   msg_SysInit_DOS_No_MEM        = 2064;     { Out of memory starting DOS mode }
  5543.   msg_SysInit_Sys_STOPPED       = 2065;     { System is stopped }
  5544.   msg_SysInit_DOS_STOPPED       = 2066;     { DOS mode not started }
  5545.   msg_SysInit_SDRVR_INVAL       = 2067;     { System device driver invalid }
  5546.   msg_SysInit_MSG_LOST          = 2068;     { Messages lost }
  5547.   msg_SysInit_UCFILE_INVAL      = 2069;     { User country file is bad }
  5548.   msg_DEMAND_LOAD_Failed        = 2070;     { the demand load has failed }
  5549.  
  5550.   { Messages for CDROM, messages 3100-3125 }
  5551.   msg_CDFS_Bad_OS_VERSION       = 3100;
  5552.   msg_CDFS_DEB_STAT_SIGNON      = 3101;
  5553.   msg_CDFS_DEB_SIGNON           = 3102;
  5554.   msg_CDFS_STAT_SIGNON          = 3103;
  5555.   msg_CDFS_SIGNON               = 3104;
  5556.   msg_CDFS_Unknown_Err_CODE     = 3105;
  5557.   msg_CDFS_Bad_PARM             = 3106;
  5558.   msg_CDFS_MIN_SectorS          = 3107;
  5559.   msg_CDFS_DEBUG                = 3108;
  5560.   msg_CDFS_MAX_SectorS          = 3109;
  5561.   msg_CDFS_MIN_File_SECT        = 3110;
  5562.   msg_CDFS_MAX_File_SECT        = 3111;
  5563.   msg_CDFS_PRIMARY_VD           = 3112;
  5564.   msg_CDFS_SECONDARY_VD         = 3113;
  5565.   msg_CDFS_Sector_Cache         = 3114;
  5566.   msg_CDFS_SectorS_READ         = 3115;
  5567.   msg_CDFS_INIT_FAIL            = 3116;
  5568.   msg_CDFS_Mem_INIT_FAIL        = 3117;
  5569.   msg_CDFS_PARTIAL_Mem_FAIL     = 3118;
  5570.   msg_CDFS_No_INFOSEG           = 3119;
  5571.  
  5572.   { Display driver errors }
  5573.   msg_SysInit_DISPLAY_MISMATCH  = 3135;     { display.dll invalid with current hardware }
  5574.  
  5575.   { EISA NMI messages. }
  5576.   msg_EISA_NMI_SOFTWARE         = 3140;
  5577.   msg_EISA_NMI_BUS              = 3141;
  5578.   msg_EISA_NMI_FAILSAFE         = 3142;
  5579.   msg_EISA_NMI_IOCHK            = 3143;
  5580.   msg_EISA_NMI_PARITY           = 3144;
  5581.  
  5582.   msg_Bad_Command_COM           = 3145;
  5583.   msg_SysInit_LDR_MSG_Not_FD    = 3146;
  5584.   msg_SysInit_LDR_MSG_Not_VAL   = 3147;
  5585.  
  5586.   msg_Not_80386_CpU             = 3161;     { can't boot on 8086/286 }
  5587.   msg_80_STEPPING               = 3162;     { can't boot on a 386 BO }
  5588.   msg_32BIT_MULTIPLY            = 3163;     { 386 with bad 32 bit multiply }
  5589.  
  5590.   { Exception HardErr Popup messages. }
  5591.   msg_Xcpt_User                 = 3170;     { Fatal user exception. }
  5592.   msg_Xcpt_STACK_OVERRUN        = 3171;     { Stack overrun dispatching exception }
  5593.   msg_Xcpt_Cannot_DISPATCH      = 3172;     { Fatal error dispatching exception }
  5594.   msg_Xcpt_BREAKPOINT           = 3173;
  5595.   msg_Xcpt_SINGLE_STEP          = 3174;
  5596.   msg_Xcpt_Access_Violation     = 3175;
  5597.   msg_Xcpt_ILLEGAL_INSTRUCTION  = 3176;
  5598.   msg_Xcpt_FLOAT_DENORMAL_OPERAND = 3177;
  5599.   msg_Xcpt_FLOAT_DIVIDE_BY_Zero = 3178;
  5600.   msg_Xcpt_FLOAT_INEXACT_RESULT = 3179;
  5601.   msg_Xcpt_FLOAT_Invalid_OPERATIO = 3180;
  5602.   msg_Xcpt_FLOAT_OVERFLOW       = 3181;
  5603.   msg_Xcpt_FLOAT_STACK_CHECK    = 3182;
  5604.   msg_Xcpt_FLOAT_UNDERFLOW      = 3183;
  5605.   msg_Xcpt_INTEGER_DIVIDE_BY_Zero = 3184;
  5606.   msg_Xcpt_INTEGER_OVERFLOW     = 3185;
  5607.   msg_Xcpt_PRIVILEGED_INSTRUCTION = 3186;
  5608.   msg_Xcpt_In_PAGE_Error        = 3187;
  5609.   msg_Xcpt_NoNCONTINUABLE_EXCEPTI = 3188;
  5610.   msg_Xcpt_Invalid_DISPOSITION  = 3189;
  5611.   msg_Xcpt_Invalid_LOCK_SEQUENCE= 3190;
  5612.   msg_Xcpt_ARRAY_BOUNDS_ExceedED= 3191;
  5613.   msg_Xcpt_B1NPX_ERRATA_02      = 3192;
  5614.  
  5615.   { FAT to HPFS conversion (FATBALL) messages }
  5616.  
  5617.   msg_HardWARE_CONFIGURATION    = 3332;
  5618.  
  5619.  
  5620. { Error codes for Base OS/2 applications }
  5621.  
  5622. const
  5623.   no_Error                      = 0;    { No error occurred             }
  5624.   error_Invalid_Function        = 1;    { Invalid function number       }
  5625.   error_File_Not_Found          = 2;    { File not found                }
  5626.   error_Path_Not_Found          = 3;    { Path not found                }
  5627.   error_Too_Many_Open_Files     = 4;    { Too many open files (no handles left)}
  5628.   error_Access_Denied           = 5;    { Access denied                 }
  5629.   error_Invalid_Handle          = 6;    { Invalid handle                }
  5630.   error_Arena_Trashed           = 7;    { Memory control blocks destroyed }
  5631.   error_Not_Enough_Memory       = 8;    { Insufficient memory           }
  5632.   error_Invalid_Block           = 9;    { Invalid memory-block address  }
  5633.   error_Bad_Environment         = 10;   { Invalid environment           }
  5634.   error_Bad_Format              = 11;   { Invalid format                }
  5635.   error_Invalid_Access          = 12;   { Invalid access code           }
  5636.   error_Invalid_Data            = 13;   { Invalid data                  }
  5637.   error_Invalid_Drive           = 15;   { Invalid drive specified       }
  5638.   error_Current_Directory       = 16;   { Attempting to remove current directory }
  5639.   error_Not_Same_Device         = 17;   { Not same device               }
  5640.   error_No_More_Files           = 18;   { No more files                 }
  5641.   error_Write_Protect           = 19;   { Attempt to write on write-protected diskette }
  5642.   error_Bad_Unit                = 20;   { Unknown unit                  }
  5643.   error_Not_Ready               = 21;   { Drive not ready               }
  5644.   error_Bad_Command             = 22;   { Unknown command               }
  5645.   error_Crc                     = 23;   { Data error - cyclic redundancy check }
  5646.   error_Bad_Length              = 24;   { Invalid request structure length }
  5647.   error_Seek                    = 25;   { Seek error                    }
  5648.   error_Not_Dos_Disk            = 26;   { Unknown media type            }
  5649.   error_Sector_Not_Found        = 27;   { Sector not found              }
  5650.   error_Out_Of_Paper            = 28;   { Printer is out of paper       }
  5651.   error_Write_Fault             = 29;   { FAULT Write fault             }
  5652.   error_Read_Fault              = 30;   { Read fault                    }
  5653.   error_Gen_Failure             = 31;   { General failure               }
  5654.   error_Sharing_Violation       = 32;   { Sharing violation             }
  5655.   error_Lock_Violation          = 33;   { Lock violation                }
  5656.   error_Wrong_Disk              = 34;   { Invalid disk change           }
  5657.   error_Fcb_Unavailable         = 35;   { FCB unavailable               }
  5658.   error_Sharing_Buffer_Exceeded = 36;   { Sharing buffer overflow       }
  5659.   error_Code_Page_Mismatched    = 37;   { Code page does not match      }
  5660.   error_Handle_Eof              = 38;   { End of file reached           }
  5661.   error_Handle_Disk_Full        = 39;   { Disk is full                  }
  5662.   error_Not_Supported           = 50;   { Network request not supported }
  5663.   error_Rem_Not_List            = 51;   { Remote network node is not online }
  5664.   error_Dup_Name                = 52;   { Duplicate file name in network }
  5665.   error_Bad_Netpath             = 53;   { Network path not found        }
  5666.   error_Network_Busy            = 54;   { Network is busy               }
  5667.   error_Dev_Not_Exist           = 55;   { Device is not installed in network }
  5668.   error_Too_Many_Cmds           = 56;   { Network command limit reached }
  5669.   error_Adap_Hdw_Err            = 57;   { Network adapter hardware error }
  5670.   error_Bad_Net_Resp            = 58;   { Incorrect response in network }
  5671.   error_Unexp_Net_Err           = 59;   { Unexpected error in network   }
  5672.   error_Bad_Rem_Adap            = 60;   { Remote network adapter error  }
  5673.   error_Printq_Full             = 61;   { Network printer queue is full }
  5674.   error_No_Spool_Space          = 62;   { No space in print spool file  }
  5675.   error_Print_Cancelled         = 63;   { Print spool file deleted      }
  5676.   error_Netname_Deleted         = 64;   { Network name deleted          }
  5677.   error_Network_Access_Denied   = 65;   { Access to network denied      }
  5678.   error_Bad_Dev_Type            = 66;   { Device type invalid for network }
  5679.   error_Bad_Net_Name            = 67;   { Network name not found        }
  5680.   error_Too_Many_Names          = 68;   { Network name limit exceeded   }
  5681.   error_Too_Many_Sess           = 69;   { Network session limit exceeded }
  5682.   error_Sharing_Paused          = 70;   { Temporary pause in network    }
  5683.   error_Req_Not_Accep           = 71;   { Network request denied        }
  5684.   error_Redir_Paused            = 72;   { Pause in network print disk redirection }
  5685.   error_Sbcs_Att_Write_Prot     = 73;   { Attempted write on protected disk }
  5686.   error_Sbcs_General_Failure    = 74;   { General failure, single-byte character set }
  5687.   error_Xga_Out_Memory          = 75;
  5688.   error_File_Exists             = 80;   { File exists                   }
  5689.   error_Dup_Fcb                 = 81;   { Reserved                      }
  5690.   error_Cannot_Make             = 82;   { Cannot make directory entry   }
  5691.   error_Fail_I24                = 83;   { Failure on INT 24             }
  5692.   error_Out_Of_Structures       = 84;   { Too many redirections         }
  5693.   error_Already_Assigned        = 85;   { Duplicate redirection         }
  5694.   error_Invalid_PassWord        = 86;   { Invalid passWord              }
  5695.   error_Invalid_Parameter       = 87;   { Invalid parameter             }
  5696.   error_Net_Write_Fault         = 88;   { Network device fault          }
  5697.   error_No_Proc_Slots           = 89;   { No process slots available    }
  5698.   error_Not_Frozen              = 90;   { System error                  }
  5699.   err_Tstovfl                   = 91;   { Timer service table overflow  }
  5700.   err_Tstdup                    = 92;   { Timer service table duplicate }
  5701.   error_No_Items                = 93;   { No items to work on           }
  5702.   error_Interrupt               = 95;   { Interrupted system call       }
  5703.   error_Device_In_Use           = 99;   { Device in use                 }
  5704.   error_Too_Many_Semaphores     = 100;  { User/system open semaphore limit reached }
  5705.   error_Excl_Sem_Already_Owned  = 101;  { Exclusive semaphore already owned }
  5706.   error_Sem_Is_Set              = 102;  { DosCloseSem found semaphore set }
  5707.   error_Too_Many_Sem_Requests   = 103;  { Too many exclusive semaphore requests }
  5708.   error_Invalid_At_Interrupt_Time = 104; { Operation invalid at interrupt time }
  5709.   error_Sem_Owner_Died          = 105;  { Previous semaphore owner terminated without freeing semaphore }
  5710.   error_Sem_User_Limit          = 106;  { Semaphore limit exceeded      }
  5711.   error_Disk_Change             = 107;  { Insert drive B disk into drive A }
  5712.   error_Drive_Locked            = 108;  { Drive locked by another process }
  5713.   error_Broken_Pipe             = 109;  { Write on pipe with no reader }
  5714.   error_Open_Failed             = 110;  { Open/create failed due to explicit fail command }
  5715.   error_Buffer_Overflow         = 111;  { Buffer passed to system call too small to hold return data }
  5716.   error_Disk_Full               = 112;  { Not enough space on the disk }
  5717.   error_No_More_Search_Handles  = 113;  { Cannot allocate another search structure and handle }
  5718.   error_Invalid_Target_Handle   = 114;  { Target handle in DosDupHandle invalid }
  5719.   error_Protection_Violation    = 115;  { Invalid user virtual address }
  5720.   error_Viokbd_Request          = 116;  { Error on display write or keyboard read }
  5721.   error_Invalid_Category        = 117;  { Category for DevIOCtl not defined }
  5722.   error_Invalid_Verify_Switch   = 118;  { Invalid value passed for verify flag }
  5723.   error_Bad_Driver_Level        = 119;  { Level four driver not found   }
  5724.   error_Call_Not_Implemented    = 120;  { Invalid function called       }
  5725.   error_Sem_Timeout             = 121;  { Time-out occurred from semaphore API function }
  5726.   error_Insufficient_Buffer     = 122;  { Data buffer too small         }
  5727.   error_Invalid_Name            = 123;  { Illegal character or invalid file-system name }
  5728.   error_Invalid_Level           = 124;  { Non-implemented level for information retrieval or setting }
  5729.   error_No_Volume_Label         = 125;  { No volume label found with DosQueryFSInfo function }
  5730.   error_Mod_Not_Found           = 126;  { Module handle not found with DosQueryProcAddr, DosQueryModAddr }
  5731.   error_Proc_Not_Found          = 127;  { Procedure address not found with DosQueryProcAddr }
  5732.   error_Wait_No_Children        = 128;  { DosWaitChild finds no children }
  5733.   error_Child_Not_Complete      = 129;  { DosWaitChild children not terminated }
  5734.   error_Direct_Access_Handle    = 130;  { Handle operation invalid for direct disk-access handles }
  5735.   error_Negative_Seek           = 131;  { Attempting seek to negative offset }
  5736.   error_Seek_On_Device          = 132;  { Application trying to seek on device or pipe }
  5737.   error_Is_Join_Target          = 133;  { Drive has previously joined drives }
  5738.   error_Is_Joined               = 134;  { Drive is already joined }
  5739.   error_Is_Substed              = 135;  { Drive is already substituted }
  5740.   error_Not_Joined              = 136;  { Cannot delete drive that is not joined }
  5741.   error_Not_Substed             = 137;  { Cannot delete drive that is not substituted }
  5742.   error_Join_To_Join            = 138;  { Cannot join to a joined drive }
  5743.   error_Subst_To_Subst          = 139;  { Cannot substitute to a substituted drive }
  5744.   error_Join_To_Subst           = 140;  { Cannot join to a substituted drive }
  5745.   error_Subst_To_Join           = 141;  { Cannot substitute to a joined drive }
  5746.   error_Busy_Drive              = 142;  { Specified drive is busy }
  5747.   error_Same_Drive              = 143;  { Cannot join or substitute a drive to a directory on the same drive }
  5748.   error_Dir_Not_Root            = 144;  { Directory must be a subdirectory of the root }
  5749.   error_Dir_Not_Empty           = 145;  { Directory must be empty to use join command }
  5750.   error_Is_Subst_Path           = 146;  { Path specified is being used in a substitute }
  5751.   error_Is_Join_Path            = 147;  { Path specified is being used in a join }
  5752.   error_Path_Busy               = 148;  { Path specified is being used by another process }
  5753.   error_Is_Subst_Target         = 149;  { Cannot join or substitute a drive that
  5754.                                           has a directory that is the target of
  5755.                                           a previous substitute         }
  5756.   error_System_Trace            = 150;  { System trace error            }
  5757.   error_Invalid_Event_Count     = 151;  { DosWaitMuxWaitSem errors      }
  5758.   error_Too_Many_Muxwaiters     = 152;  { System limit of 100 entries reached }
  5759.   error_Invalid_List_Format     = 153;  { Invalid list format           }
  5760.   error_Label_Too_Long          = 154;  { Volume label too big          }
  5761.   error_Too_Many_Tcbs           = 155;  { Cannot create another TCB     }
  5762.   error_Signal_Refused          = 156;  { Signal refused                }
  5763.   error_Discarded               = 157;  { Segment is discarded          }
  5764.   error_Not_Locked              = 158;  { Segment is not locked         }
  5765.   error_Bad_Threadid_Addr       = 159;  { Invalid thread-identity address }
  5766.   error_Bad_Arguments           = 160;  { Invalid environment pointer   }
  5767.   error_Bad_Pathname            = 161;  { Invalid path name passed to exec }
  5768.   error_Signal_Pending          = 162;  { Signal already pending        }
  5769.   error_Uncertain_Media         = 163;  { Error with INT 24 mapping     }
  5770.   error_Max_Thrds_Reached       = 164;  { No more process slots         }
  5771.   error_Monitors_Not_Supported  = 165;  { Error with INT 24 mapping     }
  5772.   error_Unc_Driver_Not_Installed        = 166;  { Default redirection return code }
  5773.   error_Lock_Failed             = 167;  { Locking failed                }
  5774.   error_Swapio_Failed           = 168;  { Swap I/O failed               }
  5775.   error_Swapin_Failed           = 169;  { Swap in failed                }
  5776.   error_Busy                    = 170;  { Segment is busy               }
  5777.   error_Cancel_Violation        = 173;  { A lock request is not outstanding
  5778.                                           for the specified file range, or the
  5779.                                           range length is zero }
  5780.   error_Atomic_Lock_Not_Supported       = 174;  { The file-system driver (FSD)
  5781.                                           does not support atomic lock operations.
  5782.                                           Versions of OS/2 prior to Version 2.00
  5783.                                           do not support atomic lock operations }
  5784.   error_Read_Locks_Not_Supported        = 175;  { The file system driver (FSD)
  5785.                                           does not support shared read locks }
  5786.   error_Invalid_Segment_Number  = 180;  { Invalid segment number        }
  5787.   error_Invalid_Callgate        = 181;  { Invalid call gate             }
  5788.   error_Invalid_Ordinal         = 182;  { Invalid ordinal               }
  5789.   error_Already_Exists          = 183;  { Shared segment already exists }
  5790.   error_No_Child_Process        = 184;  { No child process to wait for  }
  5791.   error_Child_Alive_Nowait      = 185;  { NoWait specified and child alive }
  5792.   error_Invalid_Flag_Number     = 186;  { Invalid flag number           }
  5793.   error_Sem_Not_Found           = 187;  { Semaphore does not exist      }
  5794.   error_Invalid_Starting_Codeseg = 188; { Invalid starting code segment, incorrect END (label) directive }
  5795.   error_Invalid_Stackseg        = 189;  { Invalid stack segment         }
  5796.   error_Invalid_Moduletype      = 190;  { Invalid module type - dynamic-link
  5797.                                           library file cannot be used as an
  5798.                                           application. Application cannot be
  5799.                                           used as a dynamic-link library }
  5800.   error_Invalid_Exe_Signature   = 191;  { Invalid EXE signature - file is
  5801.                                           a DOS mode program or an improper
  5802.                                           program }
  5803.   error_Exe_Marked_Invalid      = 192;  { EXE marked invalid - link detected
  5804.                                           errors when the application was created }
  5805.   error_Bad_Exe_Format          = 193;  { Invalid EXE format - file is a DOS mode
  5806.                                           program or an improper program }
  5807.   error_Iterated_Data_Exceeds_64k = 194; { Iterated data exceeds 64KB -
  5808.                                           there is more than 64KB of data in
  5809.                                           one of the segments of the file }
  5810.   error_Invalid_Minallocsize    = 195;  { Invalid minimum allocation size -
  5811.                                           the size is specified to be less
  5812.                                           than the size of the segment data
  5813.                                           in the file }
  5814.   error_Dynlink_From_Invalid_Ring = 196; { Dynamic link from invalid privilege
  5815.                                           level - privilege level 2 routine cannot
  5816.                                           link to dynamic-link libraries }
  5817.   error_Iopl_Not_Enabled        = 197;  { IOPL not enabled - IOPL set to NO in CONFIG SYS }
  5818.   error_Invalid_Segdpl          = 198;  { Invalid segment descriptor privilege
  5819.                                           level - can only have privilege levels
  5820.                                           of 2 and 3 }
  5821.   error_Autodataseg_Exceeds_64k = 199;  { Automatic data segment exceeds 64KB   }
  5822.   error_Ring2seg_Must_Be_Movable = 200; { Privilege level 2 segment must be movable }
  5823.   error_Reloc_Chain_Xeeds_Seglim = 201; { Relocation chain exceeds segment limit }
  5824.   error_Infloop_In_Reloc_Chain  = 202;  { Infinite loop in relocation chain segment }
  5825.   error_Envvar_Not_Found        = 203;  { Environment variable not found }
  5826.   error_Not_Current_Ctry        = 204;  { Not current country }
  5827.   error_No_Signal_Sent          = 205;  { No signal sent - no process in the command
  5828.                                           subtree has a signal handler }
  5829.   error_Filename_Exced_Range    = 206;  { File name or extension is greater than 8 3 characters }
  5830.   error_Ring2_Stack_In_Use      = 207;  { Privilege level 2 stack is in use }
  5831.   error_Meta_Expansion_Too_Long = 208;  { Meta (global) expansion is too long }
  5832.   error_Invalid_Signal_Number   = 209;  { Invalid signal number         }
  5833.   error_Thread_1_Inactive       = 210;  { Inactive thread               }
  5834.   error_Info_Not_Avail          = 211;  { File system information is not available for this file }
  5835.   error_Locked                  = 212;  { Locked error                  }
  5836.   error_Bad_Dynalink            = 213;  { Attempted to execute a non-family API in DOS mode }
  5837.   error_Too_Many_Modules        = 214;  { Too many modules              }
  5838.   error_Nesting_Not_Allowed     = 215;  { Nesting is not allowed        }
  5839.   error_Cannot_Shrink           = 216;  { The ring 2 stack is not allowed to shrink }
  5840.   error_Zombie_Process          = 217;  { Zombie process                }
  5841.   error_Stack_In_High_Memory    = 218;  { Stack is in high memory       }
  5842.   error_Invalid_Exitroutine_Ring = 219; { Invalid exit routine ring     }
  5843.   error_GetBuf_Failed           = 220;  { Get buffer failed             }
  5844.   error_FlushBuf_Failed         = 221;  { Flush buffer failed           }
  5845.   error_Transfer_Too_Long       = 222;  { Transfer is too long          }
  5846.   error_ForceNoSwap_Failed      = 223;
  5847.   error_Smg_No_Target_Window    = 224;  { The application window was created
  5848.                                           without the fcf_TaskList style, or the
  5849.                                           application window not yet been created
  5850.                                           or has already been destroyed }
  5851.   error_No_Children             = 228;  { No child process              }
  5852.   error_Invalid_Screen_Group    = 229;  { Invalid session               }
  5853.   error_Bad_Pipe                = 230;  { Non-existent pipe or invalid operation }
  5854.   error_Pipe_Busy               = 231;  { Pipe is busy                  }
  5855.   error_No_Data                 = 232;  { No data available on non-blocking read }
  5856.   error_Pipe_Not_Connected      = 233;  { Pipe was disconnected by server }
  5857.   error_More_Data               = 234;  { More data is available        }
  5858.   error_Vc_Disconnected         = 240;  { Session was dropped due to errors }
  5859.   error_Circularity_Requested   = 250;  { Renaming a directory that would cause a circularity problem }
  5860.   error_Directory_In_Cds        = 251;  { Renaming a directory that is in use }
  5861.   error_Invalid_Fsd_Name        = 252;  { Trying to access nonexistent FSD }
  5862.   error_Invalid_Path            = 253;  { Invalid pseudo device         }
  5863.   error_Invalid_Ea_Name         = 254;  { Invalid character in name, or invalid cbName }
  5864.   error_Ea_List_Inconsistent    = 255;  { List does not match its size, or there are invalid EAs in the list }
  5865.   error_Ea_List_Too_Long        = 256;  { FEAList is longer than 64K-1 bytes }
  5866.   error_No_Meta_Match           = 257;  { String does not match expression }
  5867.   error_FindNotify_Timeout      = 258;  { A timeout occured before the requested changes could be completed }
  5868.   error_No_More_Items           = 259;  { DosQueryFSAttach ordinal query }
  5869.   error_Search_Struc_Reused     = 260;  { DOS mode findfirst/next search structure reused }
  5870.   error_Char_Not_Found          = 261;  { Character not found           }
  5871.   error_Too_Much_Stack          = 262;  { Stack request exceeds system limit }
  5872.   error_Invalid_Attr            = 263;  { Invalid attribute             }
  5873.   error_Invalid_Starting_Ring   = 264;  { Invalid starting ring         }
  5874.   error_Invalid_Dll_Init_Ring   = 265;  { Invalid DLL INIT ring         }
  5875.   error_Cannot_Copy             = 266;  { Cannot copy                   }
  5876.   error_Directory               = 267;  { Used by DOSCOPY in doscall1   }
  5877.   error_Oplocked_File           = 268;  { Oplocked file                 }
  5878.   error_Oplock_Thread_Exists    = 269;  { Oplock thread exists          }
  5879.   error_Volume_Changed          = 270;  { Volume changed                }
  5880.   error_FindNotify_Handle_In_Use = 271;
  5881.   error_FindNotify_Handle_Closed = 272;
  5882.   error_Notify_Object_Removed   = 273;
  5883.   error_Already_Shutdown        = 274;  { System is already shut down   }
  5884.   error_Eas_Didnt_Fit           = 275;  { Buffer is not big enough to hold the EAs }
  5885.   error_Ea_File_Corrupt         = 276;  { EA file has been damaged      }
  5886.   error_Ea_Table_Full           = 277;  { EA table is full              }
  5887.   error_Invalid_Ea_Handle       = 278;  { EA handle is invalid          }
  5888.   error_No_Cluster              = 279;  { No cluster                    }
  5889.   error_Create_Ea_File          = 280;  { Cannot create the EA file     }
  5890.   error_Cannot_Open_Ea_File     = 281;  { Cannot open the EA file       }
  5891.   error_Eas_Not_Supported       = 282;  { Destination file system does not support EAs }
  5892.   error_Need_Eas_Found          = 283;  { Destination file system does not support EAs,
  5893.                                           and the source file's EAs contain a need EA }
  5894.   error_Duplicate_Handle        = 284;  { The handle already exists     }
  5895.   error_Duplicate_Name          = 285;  { The name already exists       }
  5896.   error_Empty_Muxwait           = 286;  { The list of semaphores in a muxwait semaphore is empty }
  5897.   error_Mutex_Owned             = 287;  { The calling thread owns one or more of the mutex semaphores in the list }
  5898.   error_Not_Owner               = 288;  { Caller does not own the semaphore }
  5899.   error_Param_Too_Small         = 289;  { Parameter is not large enough to
  5900.                                           contain all of the semaphore records
  5901.                                           in the muxwait semaphore }
  5902.   error_Too_Many_Handles        = 290;  { Limit reached for number of handles }
  5903.   error_Too_Many_Opens          = 291;  { There are too many files or semaphores open }
  5904.   error_Wrong_Type              = 292;  { Attempted to create wrong type of semaphore }
  5905.   error_Unused_Code             = 293;  { Code is not used              }
  5906.   error_Thread_Not_Terminated   = 294;  { Thread has not terminated     }
  5907.   error_Init_Routine_Failed     = 295;  { Initialization routine failed }
  5908.   error_Module_In_Use           = 296;  { Module is in use              }
  5909.   error_Not_Enough_Watchpoints  = 297;  { There are not enough watchpoints }
  5910.   error_Too_Many_Posts          = 298;  { Post count limit was reached for an event semaphore }
  5911.   error_Already_Posted          = 299;  { Event semaphore is already posted }
  5912.   error_Already_Reset           = 300;  { Event semaphore is already reset }
  5913.   error_Sem_Busy                = 301;  { Semaphore is busy             }
  5914.  
  5915. { end of set 0 - 302 }
  5916.  
  5917.   error_User_Defined_Base       = $FF00;
  5918.  
  5919.   error_I24_Write_Protect       = 0;
  5920.   error_I24_Bad_Unit            = 1;
  5921.   error_I24_Not_Ready           = 2;
  5922.   error_I24_Bad_Command         = 3;
  5923.   error_I24_Crc                 = 4;
  5924.   error_I24_Bad_Length          = 5;
  5925.   error_I24_Seek                = 6;
  5926.   error_I24_Not_Dos_Disk        = 7;
  5927.   error_I24_Sector_Not_Found    = 8;
  5928.   error_I24_Out_Of_Paper        = 9;
  5929.   error_I24_Write_Fault         = 10;
  5930.   error_I24_Read_Fault          = 11;
  5931.   error_I24_Gen_Failure         = 12;
  5932.   error_I24_Disk_Change         = 13;
  5933.   error_I24_Wrong_Disk          = 15;
  5934.   error_I24_Uncertain_Media     = 16;
  5935.   error_I24_Char_Call_Interrupted = 17;
  5936.   error_I24_No_Monitor_Support  = 18;
  5937.   error_I24_Invalid_Parameter   = 19;
  5938.   error_I24_Device_In_Use       = 20;
  5939.   error_I24_Quiet_Init_Fail     = 21;
  5940.  
  5941.   allowed_Fail                  = $0001;
  5942.   allowed_Abort                 = $0002;
  5943.   allowed_Retry                 = $0004;
  5944.   allowed_Ignore                = $0008;
  5945.   allowed_Acknowledge           = $0010;
  5946.   allowed_Dispatch              = $8000;
  5947.   allowed_Regdump               = $0020;
  5948.   allowed_Detached              = allowed_Dispatch;
  5949.   allowed_Reserved              = not (allowed_Fail or allowed_Abort or
  5950.     allowed_Retry or allowed_Ignore or allowed_Acknowledge);
  5951.  
  5952.   i24_Operation                 = $01;
  5953.   i24_Area                      = $06;
  5954.   i24_Class                     = $80;
  5955.  
  5956. { Values for error CLASS }
  5957.   errclass_Outres               = 1;    { Out of Resource               }
  5958.   errclass_Tempsit              = 2;    { Temporary Situation           }
  5959.   errclass_Auth                 = 3;    { Permission problem            }
  5960.   errclass_Intrn                = 4;    { Internal System Error         }
  5961.   errclass_Hrdfail              = 5;    { Hardware Failure              }
  5962.   errclass_Sysfail              = 6;    { System Failure                }
  5963.   errclass_Apperr               = 7;    { Application Error             }
  5964.   errclass_Notfnd               = 8;    { Not Found                     }
  5965.   errclass_Badfmt               = 9;    { Bad Format                    }
  5966.   errclass_Locked               = 10;   { Locked                        }
  5967.   errclass_Media                = 11;   { Media Failure                 }
  5968.   errclass_Already              = 12;   { Collision with Existing Item  }
  5969.   errclass_Unk                  = 13;   { Unknown/other                 }
  5970.   errclass_Cant                 = 14;
  5971.   errclass_Time                 = 15;
  5972.  
  5973. { Values for error ACTION }
  5974.   erract_Retry                  = 1;    { Retry                          }
  5975.   erract_Dlyret                 = 2;    { Delay Retry, retry after pause }
  5976.   erract_User                   = 3;    { Ask user to regive information }
  5977.   erract_Abort                  = 4;    { abort with clean up            }
  5978.   erract_Panic                  = 5;    { abort immediately              }
  5979.   erract_Ignore                 = 6;    { ignore                         }
  5980.   erract_Intret                 = 7;    { Retry after User Intervention  }
  5981.  
  5982. { Values for error LOCUS }
  5983.   errloc_Unk                    = 1;    { No appropriate value           }
  5984.   errloc_Disk                   = 2;    { Random Access Mass Storage     }
  5985.   errloc_Net                    = 3;    { Network                        }
  5986.   errloc_Serdev                 = 4;    { Serial Device                  }
  5987.   errloc_Mem                    = 5;    { Memory                         }
  5988.  
  5989. { Abnormal termination codes }
  5990.   tc_Normal                     = 0;
  5991.   tc_Harderr                    = 1;
  5992.   tc_Gp_Trap                    = 2;
  5993.   tc_Signal                     = 3;
  5994.   tc_Xcpt                       = 4;
  5995.  
  5996.   error_Invalid_Procid          = 303;  { Invalid process identity      }
  5997.   error_Invalid_Pdelta          = 304;  { Invalid priority delta        }
  5998.   error_Not_Descendant          = 305;  { Not descendant                }
  5999.   error_Not_Session_Manager     = 306;  { Requestor not session manager }
  6000.   error_Invalid_Pclass          = 307;  { Invalid P class               }
  6001.   error_Invalid_Scope           = 308;  { Invalid scope                 }
  6002.   error_Invalid_Threadid        = 309;  { Invalid thread identity       }
  6003.   error_Dossub_Shrink           = 310;  { Cannot shrink segment - DosSubSetMem }
  6004.   error_Dossub_Nomem            = 311;  { No memory to satisfy request - DosSubAllocMem }
  6005.   error_Dossub_Overlap          = 312;  { Overlap of the specified block with a
  6006.                                           block of allocated memory - DosSubFreeMem }
  6007.   error_Dossub_Badsize          = 313;  { Invalid size parameter - DosSubAllocMem or DosSubFreeMem }
  6008.   error_Dossub_Badflag          = 314;  { Invalid flag parameter - DosSubSetMem }
  6009.   error_Dossub_Badselector      = 315;  { Invalid segment selector      }
  6010.   error_Mr_Msg_Too_Long         = 316;  { Message too long for buffer   }
  6011.   mgs_Mr_Msg_Too_Long           = 316;  { The message passed to the message retriever was truncated }
  6012.   error_Mr_Mid_Not_Found        = 317;  { Message identity number not found }
  6013.   error_Mr_Un_Acc_Msgf          = 318;  { Unable to access message file }
  6014.   error_Mr_Inv_Msgf_Format      = 319;  { Invalid message file format   }
  6015.   error_Mr_Inv_Ivcount          = 320;  { Invalid insertion variable count }
  6016.   error_Mr_Un_Perform           = 321;  { Unable to perform function    }
  6017.   error_Ts_Wakeup               = 322;  { Unable to wake up             }
  6018.   error_Ts_Semhandle            = 323;  { Invalid system semaphore      }
  6019.   error_Ts_Notimer              = 324;  { No timers available           }
  6020.   error_Ts_Handle               = 326;  { Invalid timer handle          }
  6021.   error_Ts_Datetime             = 327;  { Date or time invalid          }
  6022.   error_Sys_Internal            = 328;  { Internal system error         }
  6023.   error_Que_Current_Name        = 329;  { Current queue name does not exist }
  6024.   error_Que_Proc_Not_Owned      = 330;  { Current process does not own queue }
  6025.   error_Que_Proc_Owned          = 331;  { Current process owns queue    }
  6026.   error_Que_Duplicate           = 332;  { Duplicate queue name          }
  6027.   error_Que_Element_Not_Exist   = 333;  { Queue element does not exist  }
  6028.   error_Que_No_Memory           = 334;  { Inadequate queue memory       }
  6029.   error_Que_Invalid_Name        = 335;  { Invalid queue name            }
  6030.   error_Que_Invalid_Priority    = 336;  { Invalid queue priority parameter }
  6031.   error_Que_Invalid_Handle      = 337;  { Invalid queue handle          }
  6032.   error_Que_Link_Not_Found      = 338;  { Queue link not found          }
  6033.   error_Que_Memory_Error        = 339;  { Queue memory error            }
  6034.   error_Que_Prev_At_End         = 340;  { Previous queue element was at end of queue }
  6035.   error_Que_Proc_No_Access      = 341;  { Process does not have access to queues }
  6036.   error_Que_Empty               = 342;  { Queue is empty                }
  6037.   error_Que_Name_Not_Exist      = 343;  { Queue name does not exist     }
  6038.   error_Que_Not_Initialized     = 344;  { Queues not initialized        }
  6039.   error_Que_Unable_To_Access    = 345;  { Unable to access queues       }
  6040.   error_Que_Unable_To_Add       = 346;  { Unable to add new queue       }
  6041.   error_Que_Unable_To_Init      = 347;  { Unable to initialize queues   }
  6042.   error_Vio_Invalid_Mask        = 349;  { Invalid function replaced     }
  6043.   error_Vio_Ptr                 = 350;  { Invalid pointer to parameter  }
  6044.   error_Vio_Aptr                = 351;  { Invalid pointer to attribute  }
  6045.   error_Vio_Rptr                = 352;  { Invalid pointer to row        }
  6046.   error_Vio_Cptr                = 353;  { Invalid pointer to column     }
  6047.   error_Vio_Lptr                = 354;  { Invalid pointer to length     }
  6048.   error_Vio_Mode                = 355;  { Unsupported screen mode       }
  6049.   error_Vio_Width               = 356;  { Invalid cursor width value    }
  6050.   error_Vio_Attr                = 357;  { Invalid cursor attribute value }
  6051.   error_Vio_Row                 = 358;  { Invalid row value             }
  6052.   error_Vio_Col                 = 359;  { Invalid column value          }
  6053.   error_Vio_Toprow              = 360;  { Invalid TopRow value          }
  6054.   error_Vio_Botrow              = 361;  { Invalid BotRow value          }
  6055.   error_Vio_Rightcol            = 362;  { Invalid right column value    }
  6056.   error_Vio_Leftcol             = 363;  { Invalid left column value     }
  6057.   error_Scs_Call                = 364;  { Call issued by other than session manager }
  6058.   error_Scs_Value               = 365;  { Value is not for save or restore }
  6059.   error_Vio_Wait_Flag           = 366;  { Invalid wait flag setting     }
  6060.   error_Vio_Unlock              = 367;  { Screen not previously locked  }
  6061.   error_Sgs_Not_Session_Mgr     = 368;  { Caller not session manager    }
  6062.   error_Smg_Invalid_Sgid        = 369;  { Invalid session identity      }
  6063.   error_Smg_Invalid_Session_Id  = error_Smg_Invalid_Sgid; { Invalid session ID }
  6064.   error_Smg_Nosg                = 370;  { No sessions available         }
  6065.   error_Smg_No_Sessions         = 370;  { No sessions available         }
  6066.   error_Smg_Grp_Not_Found       = 371;  { Session not found             }
  6067.   error_Smg_Session_Not_Found   = error_Smg_Grp_Not_Found; { Session not found }
  6068.   error_Smg_Set_Title           = 372;  { Title sent by shell or parent cannot be changed }
  6069.   error_Kbd_Parameter           = 373;  { Invalid parameter to keyboard }
  6070.   error_Kbd_No_Device           = 374;  { No device                     }
  6071.   error_Kbd_Invalid_Iowait      = 375;  { Invalid I/O wait specified    }
  6072.   error_Kbd_Invalid_Length      = 376;  { Invalid length for keyboard   }
  6073.   error_Kbd_Invalid_Echo_Mask   = 377;  { Invalid echo mode mask        }
  6074.   error_Kbd_Invalid_Input_Mask  = 378;  { Invalid input mode mask       }
  6075.   error_Mon_Invalid_Parms       = 379;  { Invalid parameters to DosMon  }
  6076.   error_Mon_Invalid_Devname     = 380;  { Invalid device name string    }
  6077.   error_Mon_Invalid_Handle      = 381;  { Invalid device handle         }
  6078.   error_Mon_Buffer_Too_Small    = 382;  { Buffer too small              }
  6079.   error_Mon_Buffer_Empty        = 383;  { Buffer is empty               }
  6080.   error_Mon_Data_Too_Large      = 384;  { Data record is too large      }
  6081.   error_Mouse_No_Device         = 385;  { Mouse device closed (invalid device handle) }
  6082.   error_Mouse_Inv_Handle        = 386;  { Mouse device closed (invalid device handle) }
  6083.   error_Mouse_Inv_Parms         = 387;  { Parameters invalid for display mode }
  6084.   error_Mouse_Cant_Reset        = 388;  { Function assigned and cannot be reset }
  6085.   error_Mouse_Display_Parms     = 389;  { Parameters invalid for display mode }
  6086.   error_Mouse_Inv_Module        = 390;  { Module not valid              }
  6087.   error_Mouse_Inv_Entry_Pt      = 391;  { Entry point not valid         }
  6088.   error_Mouse_Inv_Mask          = 392;  { Function mask invalid         }
  6089.   NO_Error_Mouse_No_Data        = 393;  { No valid data                 }
  6090.   NO_Error_Mouse_Ptr_Drawn      = 394;  { Pointer drawn                 }
  6091.   error_Invalid_Frequency       = 395;  { Invalid frequency for beep    }
  6092.   error_Nls_No_Country_File     = 396;  { Cannot find COUNTRY SYS file  }
  6093.   error_Nls_Open_Failed         = 397;  { Cannot open COUNTRY SYS file  }
  6094.   error_Nls_No_Ctry_Code        = 398;  { Country code not found        }
  6095.   error_No_Country_Or_Codepage  = 398;  { Country code not found        }
  6096.   error_Nls_Table_Truncated     = 399;  { Table returned information truncated, buffer is too small }
  6097.   error_Nls_Bad_Type            = 400;  { Selected type does not exist  }
  6098.   error_Nls_Type_Not_Found      = 401;  { Selected type is not in file  }
  6099.   error_Vio_Smg_Only            = 402;  { Valid from session manager only }
  6100.   error_Vio_Invalid_Asciiz      = 403;  { Invalid ASCIIZ length         }
  6101.   error_Vio_Deregister          = 404;  { VioDeRegister not allowed     }
  6102.   error_Vio_No_Popup            = 405;  { Pop-up window not allocated   }
  6103.   error_Vio_Existing_Popup      = 406;  { Pop-up window on screen (NoWait) }
  6104.   error_Kbd_Smg_Only            = 407;  { Valid from session manager only }
  6105.   error_Kbd_Invalid_Asciiz      = 408;  { Invalid ASCIIZ length         }
  6106.   error_Kbd_Invalid_Mask        = 409;  { Invalid replacement mask      }
  6107.   error_Kbd_Register            = 410;  { KbdRegister not allowed       }
  6108.   error_Kbd_Deregister          = 411;  { KbdDeRegister not allowed     }
  6109.   error_Mouse_Smg_Only          = 412;  { Valid from session manager only }
  6110.   error_Mouse_Invalid_Asciiz    = 413;  { Invalid ASCIIZ length         }
  6111.   error_Mouse_Invalid_Mask      = 414;  { Invalid replacement mask      }
  6112.   error_Mouse_Register          = 415;  { Mouse register not allowed    }
  6113.   error_Mouse_Deregister        = 416;  { Mouse deregister not allowed  }
  6114.   error_Smg_Bad_Action          = 417;  { Invalid action specified      }
  6115.   error_Smg_Invalid_Call        = 418;  { INIT called more than once, or invalid session identity }
  6116.   error_Scs_Sg_Notfound         = 419;  { New session number            }
  6117.   error_Scs_Not_Shell           = 420;  { Caller is not shell           }
  6118.   error_Vio_Invalid_Parms       = 421;  { Invalid parameters passed     }
  6119.   error_Vio_Function_Owned      = 422;  { Save/restore already owned    }
  6120.   error_Vio_Return              = 423;  { Non-destruct return (undo)    }
  6121.   error_Scs_Invalid_Function    = 424;  { Caller invalid function       }
  6122.   error_Scs_Not_Session_Mgr     = 425;  { Caller not session manager    }
  6123.   error_Vio_Register            = 426;  { Vio register not allowed      }
  6124.   error_Vio_No_Mode_Thread      = 427;  { No mode restore thread in SG  }
  6125.   error_Vio_No_Save_Restore_Thd = 428;  { No save/restore thread in SG  }
  6126.   error_Vio_In_Bg               = 429;  { Function invalid in background }
  6127.   error_Vio_Illegal_During_Popup = 430; { Function not allowed during pop-up window }
  6128.   error_Smg_Not_Baseshell       = 431;  { Caller is not the base shell  }
  6129.   error_Smg_Bad_Statusreq       = 432;  { Invalid status requested      }
  6130.   error_Que_Invalid_Wait        = 433;  { NoWait parameter out of bounds }
  6131.   error_Vio_Lock                = 434;  { Error returned from Scroll Lock }
  6132.   error_Mouse_Invalid_Iowait    = 435;  { Invalid parameters for IOWait }
  6133.   error_Vio_Invalid_Handle      = 436;  { Invalid VIO handle            }
  6134.   error_Vio_Illegal_During_Lock = 437;  { Function not allowed during screen lock }
  6135.   error_Vio_Invalid_Length      = 438;  { Invalid VIO length            }
  6136.   error_Kbd_Invalid_Handle      = 439;  { Invalid KBD handle            }
  6137.   error_Kbd_No_More_Handle      = 440;  { Ran out of handles            }
  6138.   error_Kbd_Cannot_Create_Kcb   = 441;  { Unable to create kcb          }
  6139.   error_Kbd_Codepage_Load_Incompl = 442; { Unsuccessful code-page load  }
  6140.   error_Kbd_Invalid_Codepage_Id = 443;  { Invalid code-page identity    }
  6141.   error_Kbd_No_Codepage_Support = 444;  { No code page support          }
  6142.   error_Kbd_Focus_Required      = 445;  { Keyboard focus required       }
  6143.   error_Kbd_Focus_Already_Active = 446; { Calling thread has an outstanding focus }
  6144.   error_Kbd_Keyboard_Busy       = 447;  { Keyboard is busy              }
  6145.   error_Kbd_Invalid_Codepage    = 448;  { Invalid code page             }
  6146.   error_Kbd_Unable_To_Focus     = 449;  { Focus attempt failed          }
  6147.   error_Smg_Session_Non_Select  = 450;  { Session is not selectable     }
  6148.   error_Smg_Session_Not_Foregrnd = 451; { Parent/child session is not foreground }
  6149.   error_Smg_Session_Not_Parent  = 452;  { Not parent of requested child }
  6150.   error_Smg_Invalid_Start_Mode  = 453;  { Invalid session start mode    }
  6151.   error_Smg_Invalid_Related_Opt = 454;  { Invalid session start related option }
  6152.   error_Smg_Invalid_Bond_Option = 455;  { Invalid session bond option   }
  6153.   error_Smg_Invalid_Select_Opt  = 456;  { Invalid session select option }
  6154.   error_Smg_Start_In_Background = 457;  { Session started in background }
  6155.   error_Smg_Invalid_Stop_Option = 458;  { Invalid session stop option   }
  6156.   error_Smg_Bad_Reserve         = 459;  { Reserved parameters are not zero }
  6157.   error_Smg_Process_Not_Parent  = 460;  { Session parent process already exists }
  6158.   error_Smg_Invalid_Data_Length = 461;  { Invalid data length           }
  6159.   error_Smg_Not_Bound           = 462;  { Parent is not bound           }
  6160.   error_Smg_Retry_Sub_Alloc     = 463;  { Retry request block allocation }
  6161.   error_Kbd_Detached            = 464;  { This call is not allowed for a detached PID }
  6162.   error_Vio_Detached            = 465;  { This call is not allowed for a detached PID }
  6163.   error_Mou_Detached            = 466;  { This call is not allowed for a detached PID }
  6164.   error_Vio_Font                = 467;  { No font is available to support the mode }
  6165.   error_Vio_User_Font           = 468;  { User font is active           }
  6166.   error_Vio_Bad_Cp              = 469;  { Invalid code page specified   }
  6167.   error_Vio_No_Cp               = 470;  { System displays do not support code page }
  6168.   error_Vio_Na_Cp               = 471;  { Current display does not support code page }
  6169.   error_Invalid_Code_Page       = 472;  { Invalid code page             }
  6170.   error_CpList_Too_Small        = 473;  { Code page list is too small   }
  6171.   error_Cp_Not_Moved            = 474;  { Code page was not moved       }
  6172.   error_Mode_Switch_Init        = 475;  { Mode switch initialization error }
  6173.   error_Code_Page_Not_Found     = 476;  { Code page was not found       }
  6174.   error_Unexpected_Slot_Returned = 477; { Internal error                }
  6175.   error_Smg_Invalid_Trace_Option = 478; { Invalid start session trace indicator }
  6176.   error_Vio_Internal_Resource   = 479;  { VIO internal resource error   }
  6177.   error_Vio_Shell_Init          = 480;  { VIO shell initialization error }
  6178.   error_Smg_No_Hard_Errors      = 481;  { No session manager hard errors }
  6179.   error_Cp_Switch_Incomplete    = 482;  { DosSetProcessCp is unable to set a KBD or VIO code page }
  6180.   error_Vio_Transparent_Popup   = 483;  { Error during VIO pop-up window }
  6181.   error_CritSec_Overflow        = 484;  { Critical section overflow     }
  6182.   error_CritSec_Underflow       = 485;  { Critical section underflow    }
  6183.   error_Vio_Bad_Reserve         = 486;  { Reserved parameter is not zero }
  6184.   error_Invalid_Address         = 487;  { Invalid physical address      }
  6185.   error_Zero_Selectors_Requested = 488; { At least one selector must be requested }
  6186.   error_Not_Enough_Selectors_Ava = 489; { Not enough GDT selectors to satisfy request }
  6187.   error_Invalid_Selector        = 490;  { Not a GDT selector            }
  6188.   error_Smg_Invalid_Program_Type = 491; { Invalid program type          }
  6189.   error_Smg_Invalid_Pgm_Control = 492;  { Invalid program control       }
  6190.   error_Smg_Invalid_Inherit_Opt = 493;  { Invalid inherit option        }
  6191.   error_Vio_Extended_Sg         = 494;  { Vio function not allowed in PM window }
  6192.   error_Vio_Not_Pres_Mgr_Sg     = 495;  { Function not supported in non-PM screen group }
  6193.   error_Vio_Shield_Owned        = 496;  { Vio shield already owned      }
  6194.   error_Vio_No_More_Handles     = 497;  { Vio handles exhausted         }
  6195.   error_Vio_See_Error_Log       = 498;  { Vio error occurred, details sent to error log }
  6196.   error_Vio_Associated_Dc       = 499;  { Invalid display context       }
  6197.   error_Kbd_No_Console          = 500;  { Kbd input not available       }
  6198.   error_Mouse_No_Console        = 501;  { Mou input not available       }
  6199.   error_Mouse_Invalid_Handle    = 502;  { Invalid mouse handle          }
  6200.   error_Smg_Invalid_Debug_Parms = 503;  { Invalid debugging parameters  }
  6201.   error_Kbd_Extended_Sg         = 504;  { Kbd function not allowed in PM window }
  6202.   error_Mou_Extended_Sg         = 505;  { Mou function not allowed in PM window }
  6203.   error_Smg_Invalid_Icon_File   = 506;  { Invalid icon file             }
  6204.   error_Trc_Pid_Non_Existent    = 507;  { The specified process doesn't exist }
  6205.   error_Trc_Count_Active        = 508;  { RAS trace count is already active }
  6206.   error_Trc_Suspended_By_Count  = 509;  { RAS tracing has been suspended }
  6207.   error_Trc_Count_Inactive      = 510;  { RAS trace-until-error has not been requested }
  6208.   error_Trc_Count_Reached       = 511;  { RAS trace-error-count has reached its limit }
  6209.   error_No_Mc_Trace             = 512;  { Minor code RAS tracing is disallowed }
  6210.   error_Mc_Trace                = 513;  { The RAS minor or major code table contains an error }
  6211.   error_Trc_Count_Zero          = 514;  { The requested RAS trace-until-error is not allowed }
  6212.   error_Smg_Too_Many_Dds        = 515;  { Too many device drivers are registered with the Session Manager }
  6213.   error_Smg_Invalid_Notification = 516; { The session notification bit map is not correct }
  6214.   error_Lf_Invalid_Function     = 517;
  6215.   error_Lf_Not_Avail            = 518;
  6216.   error_Lf_Suspended            = 519;
  6217.   error_Lf_Buf_Too_Small        = 520;
  6218.   error_Lf_Buffer_Corrupted     = 521;
  6219.   error_Lf_Buffer_Full          = 521;
  6220.   error_Lf_Invalid_Daemon       = 522;
  6221.   error_Lf_Invalid_Record       = 522;
  6222.   error_Lf_Invalid_Templ        = 523;
  6223.   error_Lf_Invalid_Service      = 523;
  6224.   error_Lf_General_Failure      = 524;
  6225.   error_Lf_Invalid_Id           = 525;
  6226.   error_Lf_Invalid_Handle       = 526;
  6227.   error_Lf_No_Id_Avail          = 527;
  6228.   error_Lf_Template_Area_Full   = 528;
  6229.   error_Lf_Id_In_Use            = 529;
  6230.   error_Mou_Not_Initialized     = 530;
  6231.   error_Mouinitreal_Done        = 531;
  6232.   error_Dossub_Corrupted        = 532;
  6233.   error_Mouse_Caller_Not_Subsys = 533;
  6234.   error_Arithmetic_Overflow     = 534;
  6235.   error_Tmr_No_Device           = 535;
  6236.   error_Tmr_Invalid_Time        = 536;
  6237.   error_Pvw_Invalid_Entity      = 537;
  6238.   error_Pvw_Invalid_Entity_Type = 538;
  6239.   error_Pvw_Invalid_Spec        = 539;
  6240.   error_Pvw_Invalid_Range_Type  = 540;
  6241.   error_Pvw_Invalid_Counter_Blk = 541;
  6242.   error_Pvw_Invalid_Text_Blk    = 542;
  6243.   error_Prf_Not_Initialized     = 543;
  6244.   error_Prf_Already_Initialized = 544;
  6245.   error_Prf_Not_Started         = 545;
  6246.   error_Prf_Already_Started     = 546;
  6247.   error_Prf_Timer_Out_Of_Range  = 547;
  6248.   error_Prf_Timer_Reset         = 548;
  6249.   error_VDD_Lock_Useage_Denied  = 639;
  6250.   error_Timeout                 = 640;
  6251.   error_VDM_Down                = 641;
  6252.   error_VDM_Limit               = 642;
  6253.   error_VDD_Not_Found           = 643;
  6254.   error_Invalid_Caller          = 644;
  6255.   error_Pid_Mismatch            = 645;
  6256.   error_Invalid_Vdd_Handle      = 646;
  6257.   error_VLPT_No_Spooler         = 647;
  6258.   error_VCOM_Device_Busy        = 648;
  6259.   error_VLPT_Device_Busy        = 649;
  6260.   error_Nesting_Too_Deep        = 650;
  6261.   error_VDD_Missing             = 651;
  6262.   error_Bidi_Invalid_Length     = 671;
  6263.   error_Bidi_Invalid_Increment  = 672;
  6264.   error_Bidi_Invalid_Combination = 673;
  6265.   error_Bidi_Invalid_Reserved   = 674;
  6266.   error_Bidi_Invalid_Effect     = 675;
  6267.   error_Bidi_Invalid_Csdrec     = 676;
  6268.   error_Bidi_Invalid_Csdstate   = 677;
  6269.   error_Bidi_Invalid_Level      = 678;
  6270.   error_Bidi_Invalid_Type_Support = 679;
  6271.   error_Bidi_Invalid_Orientation  = 680;
  6272.   error_Bidi_Invalid_Num_Shape  = 681;
  6273.   error_Bidi_Invalid_Csd        = 682;
  6274.   error_Bidi_No_Support         = 683;
  6275.   no_Error_Bidi_Rw_Incomplete   = 684;
  6276.   error_Imp_Invalid_Parm        = 691;
  6277.   error_Imp_Invalid_Length      = 692;
  6278.   error_Mon_Bad_Buffer          = 730;
  6279.  
  6280.   error_Module_Corrupted        = 731;
  6281.  
  6282.   error_Sm_OutOf_SwapFile       = 1477;
  6283.  
  6284.   error_Lf_Timeout              = 2055;
  6285.   error_Lf_Suspend_Success      = 2057;
  6286.   error_Lf_Resume_Success       = 2058;
  6287.   error_Lf_Redirect_Success     = 2059;
  6288.   error_Lf_Redirect_Failure     = 2060;
  6289.  
  6290.  
  6291.   error_Swapper_Not_Active      = 32768;
  6292.   error_Invalid_Swapid          = 32769;
  6293.   error_Ioerr_Swap_File         = 32770;
  6294.   error_Swap_Table_Full         = 32771;
  6295.   error_Swap_File_Full          = 32772;
  6296.   error_Cant_Init_Swapper       = 32773;
  6297.   error_Swapper_Already_Init    = 32774;
  6298.   error_Pmm_Insufficient_Memory = 32775;
  6299.   error_Pmm_Invalid_Flags       = 32776;
  6300.   error_Pmm_Invalid_Address     = 32777;
  6301.   error_Pmm_Lock_Failed         = 32778;
  6302.   error_Pmm_Unlock_Failed       = 32779;
  6303.   error_Pmm_Move_Incomplete     = 32780;
  6304.   error_Ucom_Drive_Renamed      = 32781;
  6305.   error_Ucom_Filename_Truncated = 32782;
  6306.   error_Ucom_Buffer_Length      = 32783;
  6307.   error_Mon_Chain_Handle        = 32784;
  6308.   error_Mon_Not_Registered      = 32785;
  6309.   error_Smg_Already_Top         = 32786;
  6310.   error_Pmm_Arena_Modified      = 32787;
  6311.   error_Smg_Printer_Open        = 32788;
  6312.   error_Pmm_Set_Flags_Failed    = 32789;
  6313.   error_Invalid_Dos_Dd          = 32790;
  6314.   error_Blocked                 = 32791;
  6315.   error_NoBlock                 = 32792;
  6316.   error_Instance_Shared         = 32793;
  6317.   error_No_Object               = 32794;
  6318.   error_Partial_Attach          = 32795;
  6319.   error_Incache                 = 32796;
  6320.   error_Swap_IO_Problems        = 32797;
  6321.   error_Crosses_Object_Boundary = 32798;
  6322.   error_LongLock                = 32799;
  6323.   error_ShortLock               = 32800;
  6324.   error_UVirtLock               = 32801;
  6325.   error_AliasLock               = 32802;
  6326.   error_Alias                   = 32803;
  6327.   error_No_More_Handles         = 32804;
  6328.   error_Scan_Terminated         = 32805;
  6329.   error_Terminator_Not_Found    = 32806;
  6330.   error_Not_Direct_Child        = 32807;
  6331.   error_Delay_Free              = 32808;
  6332.   error_Guardpage               = 32809;
  6333.   error_Swaperror               = 32900;
  6334.   error_Ldrerror                = 32901;
  6335.   error_Nomemory                = 32902;
  6336.   error_Noaccess                = 32903;
  6337.   error_No_Dll_Term             = 32904;
  6338.   error_Cpsio_Code_Page_Invalid = 65026;
  6339.   error_Cpsio_No_Spooler        = 65027;
  6340.   error_Cpsio_Font_Id_Invalid   = 65028;
  6341.   error_Cpsio_Internal_Error    = 65033;
  6342.   error_Cpsio_Invalid_Ptr_Name  = 65034;
  6343.   error_Cpsio_Not_Active        = 65037;
  6344.   error_Cpsio_Pid_Full          = 65039;
  6345.   error_Cpsio_Pid_Not_Found     = 65040;
  6346.   error_Cpsio_Read_Ctl_Seq      = 65043;
  6347.   error_Cpsio_Read_Fnt_Def      = 65045;
  6348.   error_Cpsio_Write_Error       = 65047;
  6349.   error_Cpsio_Write_Full_Error  = 65048;
  6350.   error_Cpsio_Write_Handle_Bad  = 65049;
  6351.   error_Cpsio_Swit_Load         = 65074;
  6352.   error_Cpsio_Inv_Command       = 65077;
  6353.   error_Cpsio_No_Font_Swit      = 65078;
  6354.   error_Entry_Is_CallGate       = 65079;
  6355.  
  6356. implementation
  6357.  
  6358. function DosAcknowledgeSignalException; external;
  6359. function DosAddMuxWaitSem;              external;
  6360. function DosAllocMem;                   external;
  6361. function DosAllocSharedMem;             external;
  6362. function DosAllocThreadLocalMemory;     external;
  6363. function DosAsyncTimer;                 external;
  6364. function DosBeep;                       external;
  6365. function DosCallNPipe;                  external;
  6366. function DosCancelLockRequest;          external;
  6367. function DosClose;                      external;
  6368. function DosCloseEventSem;              external;
  6369. function DosCloseMutexSem;              external;
  6370. function DosCloseMuxWaitSem;            external;
  6371. function DosCloseQueue;                 external;
  6372. function DosCloseVDD;                   external;
  6373. function DosConnectNPipe;               external;
  6374. function DosCopy;                       external;
  6375. function DosCreateDir;                  external;
  6376. function DosCreateEventSem;             external;
  6377. function DosCreateMutexSem;             external;
  6378. function DosCreateMuxWaitSem;           external;
  6379. function DosCreateNPipe;                external;
  6380. function DosCreatePipe;                 external;
  6381. function DosCreateQueue;                external;
  6382. function DosCreateThread;               external;
  6383. function DosDebug;                      external;
  6384. function DosDelete;                     external;
  6385. function DosDeleteDir;                  external;
  6386. function DosDeleteMuxWaitSem;           external;
  6387. function DosDevConfig;                  external;
  6388. function DosDevIOCtl;                   external;
  6389. function DosDisConnectNPipe;            external;
  6390. function DosDupHandle;                  external;
  6391. function DosEditName;                   external;
  6392. function DosEnterCritSec;               external;
  6393. function DosEnterMustComplete;          external;
  6394. function DosEnumAttribute;              external;
  6395. function DosErrClass;                   external;
  6396. function DosError;                      external;
  6397. function DosExecPgm;                    external;
  6398. function DosExit;                       external;
  6399. function DosExitCritSec;                external;
  6400. function DosExitList;                   external;
  6401. function DosExitMustComplete;           external;
  6402. function DosFSAttach;                   external;
  6403. function DosFSCtl;                      external;
  6404. function DosFindClose;                  external;
  6405. function DosFindFirst;                  external;
  6406. function DosFindNext;                   external;
  6407. function DosForceDelete;                external;
  6408. function DosFreeMem;                    external;
  6409. function DosFreeModule;                 external;
  6410. function DosFreeResource;               external;
  6411. function DosFreeThreadLocalMemory;      external;
  6412. function DosGetDateTime;                external;
  6413. function DosGetInfoBlocks;              external;
  6414. function DosGetMessage;                 external;
  6415. function DosGetNamedSharedMem;          external;
  6416. function DosGetResource;                external;
  6417. function DosGetSharedMem;               external;
  6418. function DosGiveSharedMem;              external;
  6419. function DosInsertMessage;              external;
  6420. function DosKillProcess;                external;
  6421. function DosKillThread;                 external;
  6422. function DosLoadModule;                 external;
  6423. function DosMapCase;                    external;
  6424. function DosMonClose;                   external;
  6425. function DosMonOpen;                    external;
  6426. function DosMonRead;                    external;
  6427. function DosMonReg;                     external;
  6428. function DosMonWrite;                   external;
  6429. function DosMove;                       external;
  6430. function DosOpen;                       external;
  6431. function DosOpenEventSem;               external;
  6432. function DosOpenMutexSem;               external;
  6433. function DosOpenMuxWaitSem;             external;
  6434. function DosOpenQueue;                  external;
  6435. function DosOpenVDD;                    external;
  6436. function DosPeekNPipe;                  external;
  6437. function DosPeekQueue;                  external;
  6438. function DosPhysicalDisk;               external;
  6439. function DosPostEventSem;               external;
  6440. function DosPurgeQueue;                 external;
  6441. function DosPutMessage;                 external;
  6442. function DosQueryAppType;               external;
  6443. function DosQueryCollate;               external;
  6444. function DosQueryCp;                    external;
  6445. function DosQueryCtryInfo;              external;
  6446. function DosQueryCurrentDir;            external;
  6447. function DosQueryCurrentDisk;           external;
  6448. function DosQueryDBCSEnv;               external;
  6449. function DosQueryDOSProperty;           external;
  6450. function DosQueryEventSem;              external;
  6451. function DosQueryExtLIBPATH;            external;
  6452. function DosQueryFHState;               external;
  6453. function DosQueryFSAttach;              external;
  6454. function DosQueryFSInfo;                external;
  6455. function DosQueryFileInfo;              external;
  6456. function DosQueryHType;                 external;
  6457. function DosQueryMem;                   external;
  6458. function DosQueryMessageCP;             external;
  6459. function DosQueryModuleHandle;          external;
  6460. function DosQueryModuleName;            external;
  6461. function DosQueryMutexSem;              external;
  6462. function DosQueryMuxWaitSem;            external;
  6463. function DosQueryNPHState;              external;
  6464. function DosQueryNPipeInfo;             external;
  6465. function DosQueryNPipeSemState;         external;
  6466. function DosQueryPathInfo;              external;
  6467. function DosQueryProcAddr;              external;
  6468. function DosQueryProcType;              external;
  6469. function DosQueryQueue;                 external;
  6470. function DosQueryRASInfo;               external;
  6471. function DosQueryResourceSize;          external;
  6472. function DosQuerySysInfo;               external;
  6473. function DosQueryVerify;                external;
  6474. function DosRaiseException;             external;
  6475. function DosRawReadNPipe;               external;
  6476. function DosRawWriteNPipe;              external;
  6477. function DosRead;                       external;
  6478. function DosReadQueue;                  external;
  6479. function DosRegisterPerfCtrs;           external;
  6480. function DosReleaseMutexSem;            external;
  6481. function DosRequestMutexSem;            external;
  6482. function DosRequestVDD;                 external;
  6483. function DosResetBuffer;                external;
  6484. function DosResetEventSem;              external;
  6485. function DosResumeThread;               external;
  6486. function DosScanEnv;                    external;
  6487. function DosSearchPath;                 external;
  6488. function DosSelectSession;              external;
  6489. function DosSendSignalException;        external;
  6490. function DosSetCurrentDir;              external;
  6491. function DosSetDOSProperty;             external;
  6492. function DosSetDateTime;                external;
  6493. function DosSetDefaultDisk;             external;
  6494. function DosSetExceptionHandler;        external;
  6495. function DosSetExtLIBPATH;              external;
  6496. function DosSetFHState;                 external;
  6497. function DosSetFSInfo;                  external;
  6498. function DosSetFileInfo;                external;
  6499. function DosSetFileLocks;               external;
  6500. function DosSetFilePtr;                 external;
  6501. function DosSetFileSize;                external;
  6502. function DosSetMaxFH;                   external;
  6503. function DosSetMem;                     external;
  6504. function DosSetNPHState;                external;
  6505. function DosSetNPipeSem;                external;
  6506. function DosSetPathInfo;                external;
  6507. function DosSetPriority;                external;
  6508. function DosSetProcessCp;               external;
  6509. function DosSetRelMaxFH;                external;
  6510. function DosSetSession;                 external;
  6511. function DosSetSignalExceptionFocus;    external;
  6512. function DosSetVerify;                  external;
  6513. function DosShutdown;                   external;
  6514. function DosSleep;                      external;
  6515. function DosStartSession;               external;
  6516. function DosStartTimer;                 external;
  6517. function DosStopSession;                external;
  6518. function DosStopTimer;                  external;
  6519. function DosSubAllocMem;                external;
  6520. function DosSubFreeMem;                 external;
  6521. function DosSubSetMem;                  external;
  6522. function DosSubUnsetMem;                external;
  6523. function DosSuppressPopUps;             external;
  6524. function DosSuspendThread;              external;
  6525. function DosTmrQueryFreq;               external;
  6526. function DosTmrQueryTime;               external;
  6527. function DosTransactNPipe;              external;
  6528. function DosUnsetExceptionHandler;      external;
  6529. function DosUnwindException;            external;
  6530. function DosWaitChild;                  external;
  6531. function DosWaitEventSem;               external;
  6532. function DosWaitMuxWaitSem;             external;
  6533. function DosWaitNPipe;                  external;
  6534. function DosWaitThread;                 external;
  6535. function DosWrite;                      external;
  6536. function DosWriteQueue;                 external;
  6537. function DosProtectClose;               external;
  6538. function DosProtectEnumAttribute;       external;
  6539. function DosProtectOpen;                external;
  6540. function DosProtectQueryFHState;        external;
  6541. function DosProtectQueryFileInfo;       external;
  6542. function DosProtectRead;                external;
  6543. function DosProtectSetFHState;          external;
  6544. function DosProtectSetFileInfo;         external;
  6545. function DosProtectSetFileLocks;        external;
  6546. function DosProtectSetFilePtr;          external;
  6547. function DosProtectSetFileSize;         external;
  6548. function DosProtectWrite;               external;
  6549. function KbdCharIn;                     external;
  6550. function KbdClose;                      external;
  6551. function KbdDeRegister;                 external;
  6552. function KbdFlushBuffer;                external;
  6553. function KbdFreeFocus;                  external;
  6554. function KbdGetCp;                      external;
  6555. function KbdGetFocus;                   external;
  6556. function KbdGetHwId;                    external;
  6557. function KbdGetStatus;                  external;
  6558. function KbdOpen;                       external;
  6559. function KbdPeek;                       external;
  6560. function KbdRegister;                   external;
  6561. function KbdSetCp;                      external;
  6562. function KbdSetCustXt;                  external;
  6563. function KbdSetFgnd;                    external;
  6564. function KbdSetHwId;                    external;
  6565. function KbdSetStatus;                  external;
  6566. function KbdStringIn;                   external;
  6567. function KbdSynch;                      external;
  6568. function KbdXlate;                      external;
  6569. function MouClose;                      external;
  6570. function MouDeRegister;                 external;
  6571. function MouDrawPtr;                    external;
  6572. function MouFlushQue;                   external;
  6573. function MouGetDevStatus;               external;
  6574. function MouGetEventMask;               external;
  6575. function MouGetHotKey;                  external;
  6576. function MouGetNumButtons;              external;
  6577. function MouGetNumMickeys;              external;
  6578. function MouGetNumQueEl;                external;
  6579. function MouGetPtrPos;                  external;
  6580. function MouGetPtrShape;                external;
  6581. function MouGetScaleFact;               external;
  6582. function MouGetThreshold;               external;
  6583. function MouInitReal;                   external;
  6584. function MouOpen;                       external;
  6585. function MouReadEventQue;               external;
  6586. function MouRegister;                   external;
  6587. function MouRemovePtr;                  external;
  6588. function MouSetDevStatus;               external;
  6589. function MouSetEventMask ;              external;
  6590. function MouSetHotKey;                  external;
  6591. function MouSetPtrPos ;                 external;
  6592. function MouSetPtrShape;                external;
  6593. function MouSetScaleFact ;              external;
  6594. function MouSetThreshold;               external;
  6595. function MouSynch;                      external;
  6596. function NlsConvertBidiNumerics;        external;
  6597. function NlsConvertBidiString;          external;
  6598. function NlsEditShape;                  external;
  6599. function NlsInverseString;              external;
  6600. function NlsQueryBidiAtt;               external;
  6601. function NlsSetBidiAtt;                 external;
  6602. function NlsSetBidiPrint;               external;
  6603. function NlsShapeBidiString;            external;
  6604. function VioCheckCharType;              external;
  6605. function VioDeRegister;                 external;
  6606. function VioEndPopUp;                   external;
  6607. function VioGetAnsi;                    external;
  6608. function VioGetBuf;                     external;
  6609. function VioGetConfig;                  external;
  6610. function VioGetCp;                      external;
  6611. function VioGetCurPos;                  external;
  6612. function VioGetCurType;                 external;
  6613. function VioGetFont;                    external;
  6614. function VioGetMode;                    external;
  6615. function VioGetPhysBuf;                 external;
  6616. function VioGetState;                   external;
  6617. function VioModeUndo;                   external;
  6618. function VioModeWait;                   external;
  6619. function VioPopUp;                      external;
  6620. function VioPrtSc;                      external;
  6621. function VioPrtScToggle;                external;
  6622. function VioReadCellStr;                external;
  6623. function VioReadCharStr;                external;
  6624. function VioRegister;                   external;
  6625. function VioSavRedrawUndo;              external;
  6626. function VioSavRedrawWait;              external;
  6627. function VioScrLock;                    external;
  6628. function VioScrUnLock;                  external;
  6629. function VioScrollDn;                   external;
  6630. function VioScrollLf;                   external;
  6631. function VioScrollRt;                   external;
  6632. function VioScrollUp;                   external;
  6633. function VioSetAnsi;                    external;
  6634. function VioSetCp;                      external;
  6635. function VioSetCurPos;                  external;
  6636. function VioSetCurType;                 external;
  6637. function VioSetFont;                    external;
  6638. function VioSetMode;                    external;
  6639. function VioSetState;                   external;
  6640. function VioShowBuf;                    external;
  6641. function VioWrtCellStr;                 external;
  6642. function VioWrtCharStr;                 external;
  6643. function VioWrtCharStrAtt;              external;
  6644. function VioWrtNAttr;                   external;
  6645. function VioWrtNCell;                   external;
  6646. function VioWrtNChar;                   external;
  6647. function VioWrtTTY;                     external;
  6648. procedure DosFlatToSel;                 external;
  6649. procedure DosSelToFlat;                 external;
  6650. {function VioRedrawSize;                 external;}
  6651.  
  6652. end.
  6653.