home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vp21beta.zip / OAPIINF.RAR / VPCP2.INF (.txt) < prev    next >
OS/2 Help File  |  2000-09-07  |  414KB  |  16,502 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Data Types ΓòÉΓòÉΓòÉ
  3.  
  4. The following are all the data types used by the Control Program. They are 
  5. listed in alphabetical order. 
  6.  
  7.  
  8. ΓòÉΓòÉΓòÉ 1.1. APIRET ΓòÉΓòÉΓòÉ
  9.  
  10. Unsigned integer in the range 0 through 4 294 967 295. 
  11.  
  12. Type
  13.   APIRET  = LONGINT;
  14.  
  15.  
  16. ΓòÉΓòÉΓòÉ 1.2. AVAILDATA ΓòÉΓòÉΓòÉ
  17.  
  18. Four-byte buffer in which the system returns the number of bytes that were 
  19. available in the named pipe. 
  20.  
  21. Type
  22.   AVAILDATA = Record
  23.     cbpipe:    SmallWord;               { bytes left in the pipe }
  24.     cbmessage: SmallWord;               { bytes left in the current message }
  25.   End;
  26.  
  27. Type
  28.   PAVAILDATA = ^AVAILDATA;
  29.  
  30.  
  31. ΓòÉΓòÉΓòÉ <hidden> AVAILDATA Field - cbpipe ΓòÉΓòÉΓòÉ
  32.  
  33.  cbpipe (USHORT) 
  34.     The number of bytes that were buffered in the pipe, including the 
  35.     message-header bytes and bytes that have been examined. 
  36.  
  37.  
  38. ΓòÉΓòÉΓòÉ <hidden> AVAILDATA Field - cbmessage ΓòÉΓòÉΓòÉ
  39.  
  40.  cbmessage (USHORT) 
  41.     Number of bytes in the current message. 
  42.  
  43.     A value of 0 indicates a byte-stream pipe. 
  44.  
  45.  
  46. ΓòÉΓòÉΓòÉ 1.3. BANKINFO ΓòÉΓòÉΓòÉ
  47.  
  48. Bank information data structure. 
  49.  
  50. Type
  51.   BANKINFO = Record
  52.     ulBankLength:    ULong;
  53.     usBank:          SmallWord;
  54.     usVideoModeType: SmallWord;
  55.     usReadWriteMode: SmallWord;
  56.   End;
  57.  
  58.  
  59. ΓòÉΓòÉΓòÉ <hidden> BANKINFO Field - ulBankLength ΓòÉΓòÉΓòÉ
  60.  
  61.  ulBankLength (ULONG) 
  62.     Length of the bank. 
  63.  
  64.     Represents the combined length of all parameter packet fields. This is a 
  65.     required field for all calls, including those made by way of the 32-bit 
  66.     DosDevIOCtl, with a minimum packet length of 10 bytes. 
  67.  
  68.  
  69. ΓòÉΓòÉΓòÉ <hidden> BANKINFO Field - usBank ΓòÉΓòÉΓòÉ
  70.  
  71.  usBank (USHORT) 
  72.     Current bank. 
  73.  
  74.     The current bank value to be set/returned. The bank size is 64KB regardless 
  75.     of the value specified for the video mode type field. 
  76.  
  77.  
  78. ΓòÉΓòÉΓòÉ <hidden> BANKINFO Field - usVideoModeType ΓòÉΓòÉΓòÉ
  79.  
  80.  usVideoModeType (USHORT) 
  81.     Current video mode type. 
  82.  
  83.     Defines the adapter video mode type to the device driver, and has one of 
  84.     the following values: 
  85.  
  86.     0              Text Mode 
  87.     1              Planar Mode 
  88.     2              Linear Mode 
  89.  
  90.     This field is required. 
  91.  
  92.  
  93. ΓòÉΓòÉΓòÉ <hidden> BANKINFO Field - usReadWriteMode ΓòÉΓòÉΓòÉ
  94.  
  95.  usReadWriteMode (USHORT) 
  96.     Read/Write bank mode. 
  97.  
  98.     Specifies what bank type is to be set/returned, and has one of the 
  99.     following values: 
  100.  
  101.     0              Read 
  102.     1              Write 
  103.  
  104.     This field is required. 
  105.  
  106.  
  107. ΓòÉΓòÉΓòÉ 1.4. BIOSPARAMETERBLOCK ΓòÉΓòÉΓòÉ
  108.  
  109. BIOS Parameter Block (BPB). 
  110.  
  111. Type
  112.   BIOSPARAMETERBLOCK = Record
  113.     usBytesPerSector:   SmallWord;
  114.     bSectorsPerCluster: Byte;
  115.     usReservedSectors:  SmallWord;
  116.     cFATs:              Byte;
  117.     cRootEntries:       SmallWord;
  118.     cSectors:           SmallWord;
  119.     bMedia:             Byte;
  120.     usSectorsPerFAT:    SmallWord;
  121.     usSectorsPerTrack:  SmallWord;
  122.     cHeads:             SmallWord;
  123.     cHiddenSectors:     ULong;
  124.     cLargeSectors:      ULong;
  125.     abReserved: array[0..5] of Byte;
  126.     cCylinders:         SmallWord;
  127.     bDeviceType:        Byte;
  128.     fsDeviceAttr:       SmallWord;
  129.   End;
  130.  
  131. Type
  132.   PBIOSPARAMETERBLOCK = ^BIOSPARAMETERBLOCK;
  133.  
  134.  
  135. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - usBytesPerSector ΓòÉΓòÉΓòÉ
  136.  
  137.  usBytesPerSector (USHORT) 
  138.     Number of bytes per sector. 
  139.  
  140.  
  141. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - bSectorsPerCluster ΓòÉΓòÉΓòÉ
  142.  
  143.  bSectorsPerCluster (BYTE) 
  144.     Number of sectors per cluster. 
  145.  
  146.  
  147. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - usReservedSectors ΓòÉΓòÉΓòÉ
  148.  
  149.  usReservedSectors (USHORT) 
  150.     Number of reserved sectors. 
  151.  
  152.  
  153. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - cFATs ΓòÉΓòÉΓòÉ
  154.  
  155.  cFATs (BYTE) 
  156.     Number of FATs. 
  157.  
  158.  
  159. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - cRootEntries ΓòÉΓòÉΓòÉ
  160.  
  161.  cRootEntries (USHORT) 
  162.     Number of root directory entries. 
  163.  
  164.  
  165. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - cSectors ΓòÉΓòÉΓòÉ
  166.  
  167.  cSectors (USHORT) 
  168.     Number of sectors. 
  169.  
  170.  
  171. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - bMedia ΓòÉΓòÉΓòÉ
  172.  
  173.  bMedia (BYTE) 
  174.     Media descriptor. 
  175.  
  176.  
  177. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - usSectorsPerFAT ΓòÉΓòÉΓòÉ
  178.  
  179.  usSectorsPerFAT (USHORT) 
  180.     Number of secctors per FAT. 
  181.  
  182.  
  183. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - usSectorsPerTrack ΓòÉΓòÉΓòÉ
  184.  
  185.  usSectorsPerTrack (USHORT) 
  186.     Number of sectors per track. 
  187.  
  188.  
  189. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - cHeads ΓòÉΓòÉΓòÉ
  190.  
  191.  cHeads (USHORT) 
  192.     Number of heads. 
  193.  
  194.  
  195. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - cHiddenSectors ΓòÉΓòÉΓòÉ
  196.  
  197.  cHiddenSectors (ULONG) 
  198.     Number of hidden sectors. 
  199.  
  200.  
  201. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - cLargeSectors ΓòÉΓòÉΓòÉ
  202.  
  203.  cLargeSectors (ULONG) 
  204.     Number of large sectors. 
  205.  
  206.  
  207. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - abReserved[6] ΓòÉΓòÉΓòÉ
  208.  
  209.  abReserved[6] (BYTE) 
  210.     Reserved. 
  211.  
  212.  
  213. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - cCylinders ΓòÉΓòÉΓòÉ
  214.  
  215.  cCylinders (USHORT) 
  216.     Number of cylinders defined for the physical device. 
  217.  
  218.  
  219. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - bDeviceType ΓòÉΓòÉΓòÉ
  220.  
  221.  bDeviceType (BYTE) 
  222.     Physical layout of the specified device. 
  223.  
  224.     0 
  225.             48 TPI low-density diskette drive 
  226.     1 
  227.             96 TPI high-density diskette drive 
  228.     2 
  229.             Small (3.5-inch) 720KB drive 
  230.     3 
  231.             8-inch single-density diskette drive 
  232.     4 
  233.             8-inch double-density diskette drive 
  234.     5 
  235.             Fixed disk 
  236.     6 
  237.             Tape drive 
  238.     7 
  239.             Other (includes 1.44MB 3.5-inch diskette drive) 
  240.     8 
  241.             R/W optical disk 
  242.     9 
  243.             3.5-inch 4.0MB diskette drive (2.88MB formatted) 
  244.  
  245.  
  246. ΓòÉΓòÉΓòÉ <hidden> BIOSPARAMETERBLOCK Field - fsDeviceAttr ΓòÉΓòÉΓòÉ
  247.  
  248.  fsDeviceAttr (USHORT) 
  249.     A bit field that returns flag information about the specified drive. 
  250.  
  251.     Bit 0 
  252.             Removable Media flag. 
  253.  
  254.             0        Media is removable. 
  255.  
  256.             1        Media cannot be removed. 
  257.  
  258.     Bit 1 
  259.             Changeline flag. 
  260.  
  261.             0        The physical device driver returns the value 0, Unsure if 
  262.                      media has changed, from the Media Check function. 
  263.  
  264.             1        Device support determines that the media was removed since 
  265.                      the last I/O operation. 
  266.  
  267.  
  268. ΓòÉΓòÉΓòÉ 1.5. BOOL ΓòÉΓòÉΓòÉ
  269.  
  270. Boolean. 
  271.  
  272. Valid values are: 
  273.  
  274.      FALSE, which is 0 
  275.      TRUE, which is 1 
  276.  
  277.   Type
  278.     BOOL    = LONGBOOL;
  279.  
  280.  
  281. ΓòÉΓòÉΓòÉ 1.6. BOOL32 ΓòÉΓòÉΓòÉ
  282.  
  283. Boolean. 
  284.  
  285. Valid values are: 
  286.  
  287.      FALSE, which is 0 
  288.      TRUE, which is 1 
  289.  
  290.   Type
  291.     BOOL32  = LONGBOOL;
  292.  
  293.  
  294. ΓòÉΓòÉΓòÉ 1.7. BYTE ΓòÉΓòÉΓòÉ
  295.  
  296. A byte. 
  297.  
  298.   Stupid hotlink... - A byte is a byte!
  299.  
  300.  
  301. ΓòÉΓòÉΓòÉ 1.8. CHAR ΓòÉΓòÉΓòÉ
  302.  
  303. Single-byte character. 
  304.  
  305.  
  306. ΓòÉΓòÉΓòÉ 1.9. COLOR ΓòÉΓòÉΓòÉ
  307.  
  308. Color value. 
  309.  
  310. Type
  311.   COLOR = LONG;
  312.  
  313.  
  314. ΓòÉΓòÉΓòÉ 1.10. CONTEXTRECORD ΓòÉΓòÉΓòÉ
  315.  
  316. This is the machine specific register contents for the thread at the time of 
  317. the exception. 
  318.  
  319. Note that only the register sets specified by ContextFlags contain valid data. 
  320. Conversely, only registers specified in ContextFlags will be restored if an 
  321. exception is handled. 
  322.  
  323. Type
  324.   CONTEXTRECORD = Record
  325.     { The flags values within this flag control the contents of
  326.     a ContextRecord.
  327.     If the ContextRecord is used as an input parameter, then
  328.     for each portion of the ContextRecord controlled by a flag
  329.     whose value is set, it is assumed that that portion of the
  330.     ContextRecord contains valid context. If the ContextRecord
  331.     is being used to modify a thread's context, then only that
  332.     portion of the thread's context will be modified.
  333.  
  334.     If the ContextRecord is used as an Input/Output parameter to
  335.     capture the context of a thread, then only those portions of the
  336.     thread's context corresponding to set flags will be returned.
  337.     }
  338.     ContextFlags: ULong;
  339.     { This section is specified/returned if the ContextFlags
  340.     contains the flag context_Floating_Point.
  341.     }
  342.     ctx_env:   array [0..6] of ULong;    { coprocessor environment }
  343.     ctx_stack: array [0..7] of FpReg;    { register set            }
  344.     { This section is specified/returned if the ContextFlags
  345.     contains the flag context_Segments.
  346.     }
  347.     ctx_SegGs:  ULong;
  348.     ctx_SegFs:  ULong;
  349.     ctx_SegEs:  ULong;
  350.     ctx_SegDs:  ULong;
  351.     { This section is specified/returned if the ContextFlags
  352.     contains the flag context_Integer.
  353.     }
  354.     ctx_RegEdi: ULong;
  355.     ctx_RegEsi: ULong;
  356.     ctx_RegEax: ULong;
  357.     ctx_RegEbx: ULong;
  358.     ctx_RegEcx: ULong;
  359.     ctx_RegEdx: ULong;
  360.     { This section is specified/returned if the ContextFlags
  361.     contains the flag context_Control.
  362.     }
  363.     ctx_RegEbp: ULong;
  364.     ctx_RegEip: ULong;
  365.     ctx_SegCs:  ULong;
  366.     ctx_EFlags: ULong;
  367.     ctx_RegEsp: ULong;
  368.     ctx_SegSs:  ULong;
  369.   End;
  370.  
  371. Type
  372.   PCONTEXTRECORD = ^CONTEXTRECORD;
  373.  
  374.  
  375. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ContextFlags ΓòÉΓòÉΓòÉ
  376.  
  377.  ContextFlags (ULONG) 
  378.     Flags which control the contents of the context record. 
  379.  
  380.     Possible values are shown in the following list: 
  381.  
  382.     CONTEXT_CONTROL (0x00000001) 
  383.              SS:ESP, CS:EIP, EFLAGS and EBP 
  384.  
  385.     CONTEXT_INTEGER (0x00000002) 
  386.              EAX, EBX, ECX, EDX, ESI and EDI 
  387.  
  388.     CONTEXT_SEGMENTS (0x00000004) 
  389.              DS, ES, FS, and GS 
  390.  
  391.     CONTEXT_FLOATING_POINT (0x00000008) 
  392.              numeric coprocessor state 
  393.  
  394.     CONTEXT_FULL 
  395.              CONTEXT_CONTROL Γöé CONTEXT_INTEGER Γöé CONTEXT_SEGMENTS Γöé 
  396.              CONTEXT_FLOATING_POINT 
  397.  
  398.     If the context record is used as an input parameter, then for each portion 
  399.     of the context record controlled by a flag whose value is set, it is 
  400.     assumed that the portion of the context record contains valid context. If 
  401.     the context record is being used to modify a thread's context, then only 
  402.     that portion of the thread's context will be modified. 
  403.  
  404.     If the context record is used as an input/output parameter to capture the 
  405.     context of a thread, then only those portions of the thread's context 
  406.     corresponding to set flags will be returned. 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_env[7] ΓòÉΓòÉΓòÉ
  410.  
  411.  ctx_env[7] (ULONG) 
  412.     This parameter is used only when ContextFlags is set to 
  413.     CONTEXT_FLOATING_POINT. 
  414.  
  415.  
  416. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_stack[8] ΓòÉΓòÉΓòÉ
  417.  
  418.  ctx_stack[8] (FPREG) 
  419.     This parameter is used only when ContextFlags is set to 
  420.     CONTEXT_FLOATING_POINT. 
  421.  
  422.  
  423. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_SegGs ΓòÉΓòÉΓòÉ
  424.  
  425.  ctx_SegGs (ULONG) 
  426.     GS register. 
  427.  
  428.     This parameter is used only when ContextFlags is set to CONTEXT_SEGMENTS. 
  429.  
  430.  
  431. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_SegFs ΓòÉΓòÉΓòÉ
  432.  
  433.  ctx_SegFs (ULONG) 
  434.     FS register. 
  435.  
  436.     This parameter is used only when ContextFlags is set to CONTEXT_SEGMENTS. 
  437.  
  438.  
  439. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_SegEs ΓòÉΓòÉΓòÉ
  440.  
  441.  ctx_SegEs (ULONG) 
  442.     ES register. 
  443.  
  444.     This parameter is used only when ContextFlags is set to CONTEXT_SEGMENTS. 
  445.  
  446.  
  447. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_SegDs ΓòÉΓòÉΓòÉ
  448.  
  449.  ctx_SegDs (ULONG) 
  450.     DS register. 
  451.  
  452.     This parameter is used only when ContextFlags is set to CONTEXT_SEGMENTS. 
  453.  
  454.  
  455. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEdi ΓòÉΓòÉΓòÉ
  456.  
  457.  ctx_RegEdi (ULONG) 
  458.     EDI register. 
  459.  
  460.     This parameter is used only when ContextFlags is set to CONTEXT_INTEGER. 
  461.  
  462.  
  463. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEsi ΓòÉΓòÉΓòÉ
  464.  
  465.  ctx_RegEsi (ULONG) 
  466.     ESI register. 
  467.  
  468.     This parameter is used only when ContextFlags is set to CONTEXT_INTEGER. 
  469.  
  470.  
  471. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEax ΓòÉΓòÉΓòÉ
  472.  
  473.  ctx_RegEax (ULONG) 
  474.     EAX register. 
  475.  
  476.     This parameter is used only when ContextFlags is set to CONTEXT_INTEGER. 
  477.  
  478.  
  479. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEbx ΓòÉΓòÉΓòÉ
  480.  
  481.  ctx_RegEbx (ULONG) 
  482.     EBX register. 
  483.  
  484.     This parameter is used only when ContextFlags is set to CONTEXT_INTEGER. 
  485.  
  486.  
  487. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEcx ΓòÉΓòÉΓòÉ
  488.  
  489.  ctx_RegEcx (ULONG) 
  490.     ECX register. 
  491.  
  492.     This parameter is used only when ContextFlags is set to CONTEXT_INTEGER. 
  493.  
  494.  
  495. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEdx ΓòÉΓòÉΓòÉ
  496.  
  497.  ctx_RegEdx (ULONG) 
  498.     EDX register. 
  499.  
  500.     This parameter is used only when ContextFlags is set to CONTEXT_INTEGER. 
  501.  
  502.  
  503. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEbp ΓòÉΓòÉΓòÉ
  504.  
  505.  ctx_RegEbp (ULONG) 
  506.     EBP register. 
  507.  
  508.     This parameter is used only when ContextFlags is set to CONTEXT_CONTROL. 
  509.  
  510.  
  511. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEip ΓòÉΓòÉΓòÉ
  512.  
  513.  ctx_RegEip (ULONG) 
  514.     EIP register. 
  515.  
  516.     This parameter is used only when ContextFlags is set to CONTEXT_CONTROL. 
  517.  
  518.  
  519. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_SegCs ΓòÉΓòÉΓòÉ
  520.  
  521.  ctx_SegCs (ULONG) 
  522.     CS register. 
  523.  
  524.     This parameter is used only when ContextFlags is set to CONTEXT_CONTROL. 
  525.  
  526.  
  527. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_EFlags ΓòÉΓòÉΓòÉ
  528.  
  529.  ctx_EFlags (ULONG) 
  530.     EFLAGS register. 
  531.  
  532.     This parameter is used only when ContextFlags is set to CONTEXT_CONTROL. 
  533.  
  534.  
  535. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_RegEsp ΓòÉΓòÉΓòÉ
  536.  
  537.  ctx_RegEsp (ULONG) 
  538.     ESP register. 
  539.  
  540.     This parameter is used only when ContextFlags is set to CONTEXT_CONTROL. 
  541.  
  542.  
  543. ΓòÉΓòÉΓòÉ <hidden> CONTEXTRECORD Field - ctx_SegSs ΓòÉΓòÉΓòÉ
  544.  
  545.  ctx_SegSs (ULONG) 
  546.     SS register. 
  547.  
  548.     This parameter is used only when ContextFlags is set to CONTEXT_CONTROL. 
  549.  
  550.  
  551. ΓòÉΓòÉΓòÉ 1.11. COUNTRYCODE ΓòÉΓòÉΓòÉ
  552.  
  553. Country code and code page. 
  554.  
  555. Type
  556.   COUNTRYCODE = Record
  557.     country:  ULong;
  558.     codepage: ULong;
  559.   End;
  560.  
  561. Type
  562.   PCOUNTRYCODE = ^COUNTRYCODE;
  563.  
  564. The following table shows the country, country code, primary code page, and 
  565. secondary code page identifier values: 
  566.  
  567. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  568. ΓöéCountry                       ΓöéCountry   ΓöéPrimary   ΓöéSecondary Γöé
  569. Γöé                              ΓöéCode      Γöé          Γöé          Γöé
  570. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  571. ΓöéAsian English                 Γöé099       Γöé437       Γöé850       Γöé
  572. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  573. ΓöéAustralia                     Γöé061       Γöé437       Γöé850       Γöé
  574. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  575. ΓöéBelgium                       Γöé032       Γöé437       Γöé850       Γöé
  576. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  577. ΓöéCanadian French               Γöé002       Γöé863       Γöé850       Γöé
  578. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  579. ΓöéCzechoslovakia                Γöé042       Γöé852       Γöé850       Γöé
  580. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  581. ΓöéDenmark                       Γöé045       Γöé865       Γöé850       Γöé
  582. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  583. ΓöéFinland                       Γöé358       Γöé437       Γöé850       Γöé
  584. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  585. ΓöéFrance                        Γöé033       Γöé437       Γöé850       Γöé
  586. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  587. ΓöéGermany                       Γöé049       Γöé437       Γöé850       Γöé
  588. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  589. ΓöéHungary                       Γöé036       Γöé852       Γöé850       Γöé
  590. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  591. ΓöéIceland                       Γöé354       Γöé850       Γöé861       Γöé
  592. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  593. ΓöéItaly                         Γöé039       Γöé437       Γöé850       Γöé
  594. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  595. ΓöéJapan                         Γöé081       Γöé932       Γöé437, 850  Γöé
  596. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  597. ΓöéJapan  SAA                    Γöé081       Γöé942       Γöé437, 850  Γöé
  598. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  599. ΓöéKorea                         Γöé082       Γöé934       Γöé437, 850  Γöé
  600. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  601. ΓöéKorea  SAA                    Γöé082       Γöé944       Γöé437, 850  Γöé
  602. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  603. ΓöéLatin America                 Γöé003       Γöé437       Γöé850       Γöé
  604. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  605. ΓöéNetherlands                   Γöé031       Γöé437       Γöé850       Γöé
  606. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  607. ΓöéNorway                        Γöé047       Γöé865       Γöé850       Γöé
  608. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  609. ΓöéPeople's Republic of China    Γöé086       Γöé936       Γöé437, 850  Γöé
  610. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  611. ΓöéPeople's Republic of China    Γöé086       Γöé946       Γöé437, 850  Γöé
  612. ΓöéSAA                           Γöé          Γöé          Γöé          Γöé
  613. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  614. ΓöéPoland                        Γöé048       Γöé852       Γöé850       Γöé
  615. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  616. ΓöéPortugal                      Γöé351       Γöé860       Γöé850       Γöé
  617. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  618. ΓöéSpain                         Γöé034       Γöé437       Γöé850       Γöé
  619. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  620. ΓöéSweden                        Γöé046       Γöé437       Γöé850       Γöé
  621. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  622. ΓöéSwitzerland                   Γöé041       Γöé437       Γöé850       Γöé
  623. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  624. ΓöéTaiwan                        Γöé088       Γöé938       Γöé437, 850  Γöé
  625. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  626. ΓöéTaiwan  SAA                   Γöé088       Γöé948       Γöé437, 850  Γöé
  627. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  628. ΓöéTurkey                        Γöé090       Γöé857       Γöé850       Γöé
  629. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  630. ΓöéUnited Kingdom                Γöé044       Γöé437       Γöé850       Γöé
  631. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  632. ΓöéUnited States                 Γöé001       Γöé437       Γöé850       Γöé
  633. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  634. ΓöéYugoslavia                    Γöé038       Γöé852       Γöé850       Γöé
  635. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  636.  
  637. Note:  Code pages 932, 934, 936, 938, 942, 944, 946, and 948 are supported only 
  638.        with the Asian version of the operating system on Asian hardware. 
  639.  
  640.  
  641. ΓòÉΓòÉΓòÉ <hidden> COUNTRYCODE Field - country ΓòÉΓòÉΓòÉ
  642.  
  643.  country (ULONG) 
  644.     The binary value of the selected country code. 
  645.  
  646.     If country is set to 0, the country information of the default system 
  647.     country code is used. 
  648.  
  649.  
  650. ΓòÉΓòÉΓòÉ <hidden> COUNTRYCODE Field - codepage ΓòÉΓòÉΓòÉ
  651.  
  652.  codepage (ULONG) 
  653.     The binary value of the selected code page identifier. 
  654.  
  655.     If codepage is set to 0, the country information for the current process 
  656.     code page of the caller is used. 
  657.  
  658.  
  659. ΓòÉΓòÉΓòÉ 1.12. COUNTRYINFO ΓòÉΓòÉΓòÉ
  660.  
  661. Country information. 
  662.  
  663. Type
  664.   COUNTRYINFO = Record
  665.     country:              ULong;
  666.     codepage:             ULong;
  667.     fsDateFmt:            ULong;
  668.     szCurrency:           array [0..4] of Char;
  669.     szThousandsSeparator: array [0..1] of Char;
  670.     szDecimal:            array [0..1] of Char;
  671.     szDateSeparator:      array [0..1] of Char;
  672.     szTimeSeparator:      array [0..1] of Char;
  673.     fsCurrencyFmt:        Byte;
  674.     cDecimalPlace:        Byte;
  675.     fsTimeFmt:            Byte;
  676.     abReserved1:          array [0..1] of SmallWord;
  677.     szDataSeparator:      array [0..1] of Char;
  678.     abReserved2:          array [0..4] of SmallWord;
  679.   End;
  680.  
  681. Type
  682.   PCOUNTRYINFO = ^COUNTRYINFO;
  683.  
  684.  
  685. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - country ΓòÉΓòÉΓòÉ
  686.  
  687.  country (ULONG) 
  688.     Country code. 
  689.  
  690.  
  691. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - codepage ΓòÉΓòÉΓòÉ
  692.  
  693.  codepage (ULONG) 
  694.     Code page. 
  695.  
  696.  
  697. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - fsDateFmt ΓòÉΓòÉΓòÉ
  698.  
  699.  fsDateFmt (ULONG) 
  700.     Date format. 
  701.  
  702.     Possible values are shown in the following list: 
  703.  
  704.     0        mm/dd/yy 
  705.     1        dd/mm/yy 
  706.     2        yy/mm/dd 
  707.  
  708.  
  709. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - szCurrency[5] ΓòÉΓòÉΓòÉ
  710.  
  711.  szCurrency[5] (CHAR) 
  712.     Currency indicator, null terminated. 
  713.  
  714.  
  715. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - szThousandsSeparator[2] ΓòÉΓòÉΓòÉ
  716.  
  717.  szThousandsSeparator[2] (CHAR) 
  718.     Thousands separator, null terminated. 
  719.  
  720.  
  721. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - szDecimal[2] ΓòÉΓòÉΓòÉ
  722.  
  723.  szDecimal[2] (CHAR) 
  724.     Decimal separator, null terminated. 
  725.  
  726.  
  727. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - szDateSeparator[2] ΓòÉΓòÉΓòÉ
  728.  
  729.  szDateSeparator[2] (CHAR) 
  730.     Date separator, null terminated. 
  731.  
  732.  
  733. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - szTimeSeparator[2] ΓòÉΓòÉΓòÉ
  734.  
  735.  szTimeSeparator[2] (CHAR) 
  736.     Time separator, null terminated. 
  737.  
  738.  
  739. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - fsCurrencyFmt ΓòÉΓòÉΓòÉ
  740.  
  741.  fsCurrencyFmt (UCHAR) 
  742.     Bit fields for currency format. 
  743.  
  744.     This field contains the following bit fields: 
  745.  
  746.     Bit      Description 
  747.  
  748.     0        Placement of the currency indicator. 
  749.  
  750.              0        currency indicator precedes money value 
  751.              1        currency indicator follows money value 
  752.  
  753.     1        Number of spaces (0 or 1) between currency indicator and money 
  754.              value. 
  755.  
  756.     2        When this bit is set, ignore the first two bits; the currency 
  757.              indicator replaces the decimal indicator. 
  758.  
  759.  
  760. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - cDecimalPlace ΓòÉΓòÉΓòÉ
  761.  
  762.  cDecimalPlace (UCHAR) 
  763.     Binary number of decimal places used in the currency indication. 
  764.  
  765.  
  766. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - fsTimeFmt ΓòÉΓòÉΓòÉ
  767.  
  768.  fsTimeFmt (UCHAR) 
  769.     Time format for file directory presentation. 
  770.  
  771.     The following values are possible: 
  772.  
  773.     0        12 hour with "am" or "pm" 
  774.     1        24 hour 
  775.  
  776.  
  777. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - abReserved[2] ΓòÉΓòÉΓòÉ
  778.  
  779.  abReserved[2] (USHORT) 
  780.     Reserved; set to 0. 
  781.  
  782.  
  783. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - szDataSeparator[2] ΓòÉΓòÉΓòÉ
  784.  
  785.  szDataSeparator[2] (CHAR) 
  786.     Data list separator, null terminated. 
  787.  
  788.  
  789. ΓòÉΓòÉΓòÉ <hidden> COUNTRYINFO Field - abReserved2[5] ΓòÉΓòÉΓòÉ
  790.  
  791.  abReserved2[5] (USHORT) 
  792.     Reserved; set to 0. 
  793.  
  794.  
  795. ΓòÉΓòÉΓòÉ 1.13. CPID ΓòÉΓòÉΓòÉ
  796.  
  797. Code page identification data structure. 
  798.  
  799. Type
  800.   CPID = Record
  801.     idCodePage: SmallWord;
  802.     Reserved:   SmallWord;
  803.   End;
  804.  
  805. Type
  806.   PCPID = ^CPID;
  807.  
  808.  
  809. ΓòÉΓòÉΓòÉ <hidden> CPID Field - idCodePage ΓòÉΓòÉΓòÉ
  810.  
  811.  idCodePage (USHORT) 
  812.     Current code page number. 
  813.  
  814.  
  815. ΓòÉΓòÉΓòÉ <hidden> CPID Field - reserved ΓòÉΓòÉΓòÉ
  816.  
  817.  reserved (USHORT) 
  818.     Reserved. 
  819.  
  820.     Set to 0. 
  821.  
  822.  
  823. ΓòÉΓòÉΓòÉ 1.14. DATETIME ΓòÉΓòÉΓòÉ
  824.  
  825. Date and time data structure. 
  826.  
  827. Type
  828.   DATETIME = Record
  829.     hours:      Byte;
  830.     minutes:    Byte;
  831.     seconds:    Byte;
  832.     hundredths: Byte;
  833.     day:        Byte;
  834.     month:      Byte;
  835.     year:       SmallWord;
  836.     timezone:   SmallInt;
  837.     weekday:    Byte;
  838.   End;
  839.  
  840. Type
  841.   PDATETIME = ^DATETIME;
  842.  
  843.  
  844. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - hours ΓòÉΓòÉΓòÉ
  845.  
  846.  hours (UCHAR) 
  847.     Current hour, using values 0 through 23. 
  848.  
  849.  
  850. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - minutes ΓòÉΓòÉΓòÉ
  851.  
  852.  minutes (UCHAR) 
  853.     Current minute, using values 0 through 59. 
  854.  
  855.  
  856. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - seconds ΓòÉΓòÉΓòÉ
  857.  
  858.  seconds (UCHAR) 
  859.     Current second, using values 0 through 59. 
  860.  
  861.  
  862. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - hundredths ΓòÉΓòÉΓòÉ
  863.  
  864.  hundredths (UCHAR) 
  865.     Current hundredths of a second, using values 0 through 99. 
  866.  
  867.  
  868. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - day ΓòÉΓòÉΓòÉ
  869.  
  870.  day (UCHAR) 
  871.     Current day of the month, using values 1 through 31. 
  872.  
  873.  
  874. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - month ΓòÉΓòÉΓòÉ
  875.  
  876.  month (UCHAR) 
  877.     Current month of the year, using values 1 through 12. 
  878.  
  879.  
  880. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - year ΓòÉΓòÉΓòÉ
  881.  
  882.  year (USHORT) 
  883.     Current year. 
  884.  
  885.  
  886. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - timezone ΓòÉΓòÉΓòÉ
  887.  
  888.  timezone (SHORT) 
  889.     The difference in minutes between the current time zone and Greenwich Mean 
  890.     Time (GMT). 
  891.  
  892.     This value is positive for time zones west of Greenwich, England, and 
  893.     negative for time zones east of Greenwich. A value of -1 indicates that the 
  894.     time zone is undefined. 
  895.  
  896.  
  897. ΓòÉΓòÉΓòÉ <hidden> DATETIME Field - weekday ΓòÉΓòÉΓòÉ
  898.  
  899.  weekday (UCHAR) 
  900.     Current day of the week, using values 0 through 6. 
  901.  
  902.     Sunday is equal to 0. 
  903.  
  904.  
  905. ΓòÉΓòÉΓòÉ 1.15. DCBINFO ΓòÉΓòÉΓòÉ
  906.  
  907. Device control block information data structure. 
  908.  
  909. Type
  910.   DCBINFO = Record
  911.     usWriteTimeout:        SmallWord;
  912.     usReadTimeout:         SmallWord;
  913.     fbCtlHndShake:         Byte;
  914.     fbFlowReplace:         Byte;
  915.     fbTimeout:             Byte;
  916.     bErrorReplacementChar: Byte;
  917.     bBreakReplacementChar: Byte;
  918.     bXONChar:              Byte;
  919.     bXOFFChar:             Byte;
  920.   End;
  921.  
  922. Type
  923.   PDCBINFO = ^DCBINFO;
  924.  
  925.  
  926. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - usWriteTimeout ΓòÉΓòÉΓòÉ
  927.  
  928.  usWriteTimeout (USHORT) 
  929.     Time period used for Write Timeout processing. 
  930.  
  931.     Specifies the time period used for Write Timeout processing.  See Note 8 of 
  932.     ASYNC_SETDCBINFO. The value is in .01 second units based on zero (where 0 = 
  933.     .01 seconds). 
  934.  
  935.  
  936. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - usReadTimeout ΓòÉΓòÉΓòÉ
  937.  
  938.  usReadTimeout (USHORT) 
  939.     Time period used for Read Timeout processing. 
  940.  
  941.     Specifies the time period used for Read Timeout processing. See Note 9 of 
  942.     ASYNC_SETDCBINFO. The value is in .01 second units based on zero (where 0 
  943.     =.01 seconds). 
  944.  
  945.  
  946. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - fbCtlHndShake ΓòÉΓòÉΓòÉ
  947.  
  948.  fbCtlHndShake (BYTE) 
  949.     HandShake Control flag. 
  950.  
  951.     Has the following bits: 
  952.  
  953.     Bits 0-1      DTR Control mode.  Has the following: 
  954.  
  955.                        Bit 1   Bit 0    Description 
  956.                    0            0      Disable 
  957.                    0            1      Enable 
  958.                    1            0      Input handshaking 
  959.                    1            1      Invalid input.  Results in a general 
  960.                                failure error. 
  961.  
  962.     Bit 2         Reserved. Must be 0. 
  963.  
  964.     Bit 3         Enable output handshaking using CTS 
  965.  
  966.     Bit 4         Enable output handshaking using DSR 
  967.  
  968.     Bit 5         Enable output handshaking using DCD 
  969.  
  970.     Bit 6         Enable input sensitivity using DSR 
  971.  
  972.     Bit 7         Reserved. Must be 0. 
  973.  
  974.  
  975. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - fbFlowReplace ΓòÉΓòÉΓòÉ
  976.  
  977.  fbFlowReplace (BYTE) 
  978.     Flow Control flag. 
  979.  
  980.     Has the following bits: 
  981.  
  982.     Bit 0         Enable Automatic Transmit Flow Control (XON/XOFF) 
  983.  
  984.     Bit 1         Enable Automatic Receive Flow Control (XON/XOFF) 
  985.  
  986.     Bit 2         Enable error replacement character 
  987.  
  988.     Bit 3         Enable null stripping (remove null bytes) 
  989.  
  990.     Bit 4         Enable break replacement character 
  991.  
  992.     Bit 5         Automatic Receive Flow Control: 
  993.  
  994.                   0 =     Normal 
  995.                   1 =     Full-Duplex 
  996.  
  997.     Bits 6-7      RTS Control mode.  Has the following: 
  998.  
  999.                        Bit 7   Bit 6    Description 
  1000.                    0            0      Disable 
  1001.                    0            1      Enable 
  1002.                    1            0      Input handshaking 
  1003.                    1            1      Toggling on transmit 
  1004.  
  1005.  
  1006. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - fbTimeout ΓòÉΓòÉΓòÉ
  1007.  
  1008.  fbTimeout (BYTE) 
  1009.     Timeout flag. 
  1010.  
  1011.     Has the following bits: 
  1012.  
  1013.     Bit 0         Enable Write Infinite Timeout processing 
  1014.  
  1015.     Bits 1-2      Read Timeout processing.  Has the following: 
  1016.  
  1017.                        Bit 2   Bit 1    Description 
  1018.                    0            1      Normal Read Timeout processing 
  1019.                    1            0      Wait-For-Something, Read Timeout 
  1020.                                processing 
  1021.                    1            1      No-Wait, Read Timeout processing 
  1022.  
  1023.     Bits 3-4      Extended Hardware Buffering.  Has the following: 
  1024.  
  1025.                        Bit 4   Bit 3    Description 
  1026.                    0            0      Not supported 
  1027.                    0            1      Extended Hardware Buffering Disabled 
  1028.                    1            0      Extended Hardware Buffering Enabled 
  1029.                    1            1      Automatic Protocol Override 
  1030.  
  1031.     Bits 5-6      Receive Trigger Level.  Has the following: 
  1032.  
  1033.                        Bit 6   Bit 5    Description 
  1034.                    0            0      1 character 
  1035.                    0            1      4 characters 
  1036.                    1            0      8 characters 
  1037.                    1            1      14 characters 
  1038.  
  1039.     Bit 7         Transmit Buffer Load Count 
  1040.  
  1041.                   0 =     1 character 
  1042.                   1 =     16 characters 
  1043.  
  1044.     See ASYNC_SETDCBINFO for field definitions. 
  1045.  
  1046.  
  1047. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - bErrorReplacementChar ΓòÉΓòÉΓòÉ
  1048.  
  1049.  bErrorReplacementChar (BYTE) 
  1050.     Error Replacement Character. 
  1051.  
  1052.     Value in the range 00h-FFh. See note 5 of ASYNC_SETDCBINFO 
  1053.  
  1054.  
  1055. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - bBreakReplacementChar ΓòÉΓòÉΓòÉ
  1056.  
  1057.  bBreakReplacementChar (BYTE) 
  1058.     Break Replacement Character. 
  1059.  
  1060.     Value in the range 00h-FFh. See note 7 of ASYNC_SETDCBINFO 
  1061.  
  1062.  
  1063. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - bXONChar ΓòÉΓòÉΓòÉ
  1064.  
  1065.  bXONChar (BYTE) 
  1066.     Character XON. 
  1067.  
  1068.     Value in the range 00h-FFh. See note 2 of ASYNC_SETDCBINFO 
  1069.  
  1070.  
  1071. ΓòÉΓòÉΓòÉ <hidden> DCBINFO Field - bXOFFChar ΓòÉΓòÉΓòÉ
  1072.  
  1073.  bXOFFChar (BYTE) 
  1074.     Character XOFF. 
  1075.  
  1076.     Value in the range 00h-FFh. See note 2 of ASYNC_SETDCBINFO 
  1077.  
  1078.  
  1079. ΓòÉΓòÉΓòÉ 1.16. DENA2 ΓòÉΓòÉΓòÉ
  1080.  
  1081. DENA2 data structure. 
  1082.  
  1083. Type
  1084.   DENA2 = FEA2;
  1085.  
  1086.  
  1087. ΓòÉΓòÉΓòÉ 1.17. DEVICEPARAMETERBLOCK ΓòÉΓòÉΓòÉ
  1088.  
  1089. Device Parameter Block data structure. 
  1090.  
  1091. Type
  1092.   DEVICEPARAMETERBLOCK = Record
  1093.     reserved1:        SmallWord;
  1094.     cCylinders:       SmallWord;
  1095.     cHeads:           SmallWord;
  1096.     cSectorsPerTrack: SmallWord;
  1097.     reserved2:        SmallWord;
  1098.     reserved3:        SmallWord;
  1099.     reserved4:        SmallWord;
  1100.     reserved5:        SmallWord;
  1101.   End;
  1102.  
  1103. Type
  1104.   PDEVICEPARAMETERBLOCK = ^DEVICEPARAMETERBLOCK;
  1105.  
  1106.  
  1107. ΓòÉΓòÉΓòÉ <hidden> DEVICEPARAMETERBLOCK Field - reserved1 ΓòÉΓòÉΓòÉ
  1108.  
  1109.  reserved1 (USHORT) 
  1110.     Reserved. 
  1111.  
  1112.  
  1113. ΓòÉΓòÉΓòÉ <hidden> DEVICEPARAMETERBLOCK Field - cCylinders ΓòÉΓòÉΓòÉ
  1114.  
  1115.  cCylinders (USHORT) 
  1116.     Number of Cylinders on the physical drive. 
  1117.  
  1118.  
  1119. ΓòÉΓòÉΓòÉ <hidden> DEVICEPARAMETERBLOCK Field - cHeads ΓòÉΓòÉΓòÉ
  1120.  
  1121.  cHeads (USHORT) 
  1122.     Number of Heads on the physical drive. 
  1123.  
  1124.  
  1125. ΓòÉΓòÉΓòÉ <hidden> DEVICEPARAMETERBLOCK Field - cSectorsPerTrack ΓòÉΓòÉΓòÉ
  1126.  
  1127.  cSectorsPerTrack (USHORT) 
  1128.     Number of Sectors per track on the physical drive. 
  1129.  
  1130.  
  1131. ΓòÉΓòÉΓòÉ <hidden> DEVICEPARAMETERBLOCK Field - reserved2 ΓòÉΓòÉΓòÉ
  1132.  
  1133.  reserved2 (USHORT) 
  1134.     Reserved. 
  1135.  
  1136.  
  1137. ΓòÉΓòÉΓòÉ <hidden> DEVICEPARAMETERBLOCK Field - reserved3 ΓòÉΓòÉΓòÉ
  1138.  
  1139.  reserved3 (USHORT) 
  1140.     Reserved. 
  1141.  
  1142.  
  1143. ΓòÉΓòÉΓòÉ <hidden> DEVICEPARAMETERBLOCK Field - reserved4 ΓòÉΓòÉΓòÉ
  1144.  
  1145.  reserved4 (USHORT) 
  1146.     Reserved. 
  1147.  
  1148.  
  1149. ΓòÉΓòÉΓòÉ <hidden> DEVICEPARAMETERBLOCK Field - reserved5 ΓòÉΓòÉΓòÉ
  1150.  
  1151.  reserved5 (USHORT) 
  1152.     Reserved. 
  1153.  
  1154.  
  1155. ΓòÉΓòÉΓòÉ 1.18. DosDebug Buffer ΓòÉΓòÉΓòÉ
  1156.  
  1157. DosDebug buffer structure. 
  1158.  
  1159. Type
  1160.   _DosDebug buffer = Record
  1161.       ULONG      Pid;     /*  Debuggee Process ID */
  1162.       ULONG      Tid;     /*  Debuggee Thread ID */
  1163.       LONG       Cmd;     /*  Command or Notification */
  1164.       LONG       Value;   /*  Generic Data Value */
  1165.       ULONG      Addr;    /*  Debuggee Address */
  1166.       ULONG      Buffer;  /*  Debugger Buffer Address */
  1167.       ULONG      Len;     /*  Length of Range */
  1168.       ULONG      Index;   /*  Generic Identifier Index */
  1169.       ULONG      MTE;     /*  Module Table Entry Handle */
  1170.       ULONG      EAX;     /*  Register Set */
  1171.       ULONG      ECX;
  1172.       ULONG      EDX;
  1173.       ULONG      EBX;
  1174.       ULONG      ESP;
  1175.       ULONG      EBP;
  1176.       ULONG      ESI;
  1177.       ULONG      EDI;
  1178.       ULONG      EFlags;
  1179.       ULONG      EIP;
  1180.       ULONG      CSLim;   /*  Byte Granular Limits */
  1181.       ULONG      CSBase;  /*  Byte Granular Base */
  1182.       UCHAR      CSAcc;   /*  Access Bytes */
  1183.       UCHAR      CSAtr;   /*  Attribute Bytes */
  1184.       USHORT     CS;
  1185.       ULONG      DSLim;
  1186.       ULONG      DSBase;
  1187.       UCHAR      DSAcc;
  1188.       UCHAR      DSAtr;
  1189.       USHORT     DS;
  1190.       ULONG      ESLim;
  1191.       ULONG      ESBase;
  1192.       UCHAR      ESAcc;
  1193.       UCHAR      ESAtr;
  1194.       USHORT     ES;
  1195.       ULONG      FSLim;
  1196.       ULONG      FSBase;
  1197.       UCHAR      FSAcc;
  1198.       UCHAR      FSAtr;
  1199.       USHORT     FS;
  1200.       ULONG      GSLim;
  1201.       ULONG      GSBase;
  1202.       UCHAR      GSAcc;
  1203.       UCHAR      GSAtr;
  1204.       USHORT     GS;
  1205.       ULONG      SSLim;
  1206.       ULONG      SSBase;
  1207.       UCHAR      SSAcc;
  1208.       UCHAR      SSAtr;
  1209.       USHORT     SS;
  1210.   End;
  1211.  
  1212. Type
  1213.   DBUGBUF = ^DosDebug Buffer;
  1214.  
  1215.  
  1216. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - Pid ΓòÉΓòÉΓòÉ
  1217.  
  1218.  Pid (ULONG) 
  1219.     Debuggee Process ID 
  1220.  
  1221.  
  1222. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - Tid ΓòÉΓòÉΓòÉ
  1223.  
  1224.  Tid (ULONG) 
  1225.     Debuggee Thread ID 
  1226.  
  1227.  
  1228. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - Cmd ΓòÉΓòÉΓòÉ
  1229.  
  1230.  Cmd (LONG) 
  1231.     Command or Notification 
  1232.  
  1233.  
  1234. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - Value ΓòÉΓòÉΓòÉ
  1235.  
  1236.  Value (LONG) 
  1237.     Generic Data Value 
  1238.  
  1239.  
  1240. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - Addr ΓòÉΓòÉΓòÉ
  1241.  
  1242.  Addr (ULONG) 
  1243.     Debuggee Address 
  1244.  
  1245.  
  1246. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - Buffer ΓòÉΓòÉΓòÉ
  1247.  
  1248.  Buffer (ULONG) 
  1249.     Debugger Buffer Address 
  1250.  
  1251.  
  1252. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - Len ΓòÉΓòÉΓòÉ
  1253.  
  1254.  Len (ULONG) 
  1255.     Length of Range 
  1256.  
  1257.  
  1258. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - Index ΓòÉΓòÉΓòÉ
  1259.  
  1260.  Index (ULONG) 
  1261.     Generic Identifier Index 
  1262.  
  1263.  
  1264. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - MTE ΓòÉΓòÉΓòÉ
  1265.  
  1266.  MTE (ULONG) 
  1267.     Module Table Entry Handle 
  1268.  
  1269.  
  1270. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - EAX ΓòÉΓòÉΓòÉ
  1271.  
  1272.  EAX (ULONG) 
  1273.     Register Set 
  1274.  
  1275.  
  1276. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - ECX ΓòÉΓòÉΓòÉ
  1277.  
  1278.  ECX (ULONG) 
  1279.  
  1280.  
  1281. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - EDX ΓòÉΓòÉΓòÉ
  1282.  
  1283.  EDX (ULONG) 
  1284.  
  1285.  
  1286. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - EBX ΓòÉΓòÉΓòÉ
  1287.  
  1288.  EBX (ULONG) 
  1289.  
  1290.  
  1291. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - ESP ΓòÉΓòÉΓòÉ
  1292.  
  1293.  ESP (ULONG) 
  1294.  
  1295.  
  1296. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - EBP ΓòÉΓòÉΓòÉ
  1297.  
  1298.  EBP (ULONG) 
  1299.  
  1300.  
  1301. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - ESI ΓòÉΓòÉΓòÉ
  1302.  
  1303.  ESI (ULONG) 
  1304.  
  1305.  
  1306. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - EDI ΓòÉΓòÉΓòÉ
  1307.  
  1308.  EDI (ULONG) 
  1309.  
  1310.  
  1311. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - EFlags ΓòÉΓòÉΓòÉ
  1312.  
  1313.  EFlags (ULONG) 
  1314.  
  1315.  
  1316. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - EIP ΓòÉΓòÉΓòÉ
  1317.  
  1318.  EIP (ULONG) 
  1319.  
  1320.  
  1321. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - CSLim ΓòÉΓòÉΓòÉ
  1322.  
  1323.  CSLim (ULONG) 
  1324.     Byte Granular Limits 
  1325.  
  1326.  
  1327. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - CSBase ΓòÉΓòÉΓòÉ
  1328.  
  1329.  CSBase (ULONG) 
  1330.     Byte Granular Base 
  1331.  
  1332.  
  1333. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - CSAcc ΓòÉΓòÉΓòÉ
  1334.  
  1335.  CSAcc (UCHAR) 
  1336.     Access Bytes 
  1337.  
  1338.  
  1339. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - CSAtr ΓòÉΓòÉΓòÉ
  1340.  
  1341.  CSAtr (UCHAR) 
  1342.     Attribute Bytes 
  1343.  
  1344.  
  1345. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - CS ΓòÉΓòÉΓòÉ
  1346.  
  1347.  CS (USHORT) 
  1348.  
  1349.  
  1350. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - DSLim ΓòÉΓòÉΓòÉ
  1351.  
  1352.  DSLim (ULONG) 
  1353.  
  1354.  
  1355. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - DSBase ΓòÉΓòÉΓòÉ
  1356.  
  1357.  DSBase (ULONG) 
  1358.  
  1359.  
  1360. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - DSAcc ΓòÉΓòÉΓòÉ
  1361.  
  1362.  DSAcc (UCHAR) 
  1363.  
  1364.  
  1365. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - DSAtr ΓòÉΓòÉΓòÉ
  1366.  
  1367.  DSAtr (UCHAR) 
  1368.  
  1369.  
  1370. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - DS ΓòÉΓòÉΓòÉ
  1371.  
  1372.  DS (USHORT) 
  1373.  
  1374.  
  1375. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - ESLim ΓòÉΓòÉΓòÉ
  1376.  
  1377.  ESLim (ULONG) 
  1378.  
  1379.  
  1380. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - ESBase ΓòÉΓòÉΓòÉ
  1381.  
  1382.  ESBase (ULONG) 
  1383.  
  1384.  
  1385. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - ESAcc ΓòÉΓòÉΓòÉ
  1386.  
  1387.  ESAcc (UCHAR) 
  1388.  
  1389.  
  1390. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - ESAtr ΓòÉΓòÉΓòÉ
  1391.  
  1392.  ESAtr (UCHAR) 
  1393.  
  1394.  
  1395. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - ES ΓòÉΓòÉΓòÉ
  1396.  
  1397.  ES (USHORT) 
  1398.  
  1399.  
  1400. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - FSLim ΓòÉΓòÉΓòÉ
  1401.  
  1402.  FSLim (ULONG) 
  1403.  
  1404.  
  1405. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - FSBase ΓòÉΓòÉΓòÉ
  1406.  
  1407.  FSBase (ULONG) 
  1408.  
  1409.  
  1410. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - FSAcc ΓòÉΓòÉΓòÉ
  1411.  
  1412.  FSAcc (UCHAR) 
  1413.  
  1414.  
  1415. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - FSAtr ΓòÉΓòÉΓòÉ
  1416.  
  1417.  FSAtr (UCHAR) 
  1418.  
  1419.  
  1420. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - FS ΓòÉΓòÉΓòÉ
  1421.  
  1422.  FS (USHORT) 
  1423.  
  1424.  
  1425. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - GSLim ΓòÉΓòÉΓòÉ
  1426.  
  1427.  GSLim (ULONG) 
  1428.  
  1429.  
  1430. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - GSBase ΓòÉΓòÉΓòÉ
  1431.  
  1432.  GSBase (ULONG) 
  1433.  
  1434.  
  1435. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - GSAcc ΓòÉΓòÉΓòÉ
  1436.  
  1437.  GSAcc (UCHAR) 
  1438.  
  1439.  
  1440. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - GSAtr ΓòÉΓòÉΓòÉ
  1441.  
  1442.  GSAtr (UCHAR) 
  1443.  
  1444.  
  1445. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - GS ΓòÉΓòÉΓòÉ
  1446.  
  1447.  GS (USHORT) 
  1448.  
  1449.  
  1450. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - SSLim ΓòÉΓòÉΓòÉ
  1451.  
  1452.  SSLim (ULONG) 
  1453.  
  1454.  
  1455. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - SSBase ΓòÉΓòÉΓòÉ
  1456.  
  1457.  SSBase (ULONG) 
  1458.  
  1459.  
  1460. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - SSAcc ΓòÉΓòÉΓòÉ
  1461.  
  1462.  SSAcc (UCHAR) 
  1463.  
  1464.  
  1465. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - SSAtr ΓòÉΓòÉΓòÉ
  1466.  
  1467.  SSAtr (UCHAR) 
  1468.  
  1469.  
  1470. ΓòÉΓòÉΓòÉ <hidden> DosDebug Buffer Field - SS ΓòÉΓòÉΓòÉ
  1471.  
  1472.  SS (USHORT) 
  1473.  
  1474.  
  1475. ΓòÉΓòÉΓòÉ 1.19. EAOP2 ΓòÉΓòÉΓòÉ
  1476.  
  1477. EAOP2 data structure. 
  1478.  
  1479. Type
  1480.   EAOP2 = Record
  1481.     fpGEA2List: PGea2List;      { GEA set }
  1482.     fpFEA2List: PFea2List;      { FEA set }
  1483.     oError:    ULong;           { offset of FEA error }
  1484.   End;
  1485.  
  1486. Type
  1487.   PEAOP2 = ^EAOP2;
  1488.  
  1489.  
  1490. ΓòÉΓòÉΓòÉ <hidden> EAOP2 Field - fpGEA2List ΓòÉΓòÉΓòÉ
  1491.  
  1492.  fpGEA2List (PGEA2LIST) 
  1493.     GEA set. 
  1494.  
  1495.  
  1496. ΓòÉΓòÉΓòÉ <hidden> EAOP2 Field - fpFEA2List ΓòÉΓòÉΓòÉ
  1497.  
  1498.  fpFEA2List (PFEA2LIST) 
  1499.     FEA set. 
  1500.  
  1501.  
  1502. ΓòÉΓòÉΓòÉ <hidden> EAOP2 Field - oError ΓòÉΓòÉΓòÉ
  1503.  
  1504.  oError (ULONG) 
  1505.     Offset of FEA error. 
  1506.  
  1507.  
  1508. ΓòÉΓòÉΓòÉ 1.20. EASIZEBUF ΓòÉΓòÉΓòÉ
  1509.  
  1510. Maximum size of extended attributes (EAs). 
  1511.  
  1512. Type
  1513.   EASIZEBUF = Record
  1514.     cbMaxEASize:     SmallWord;         { max. size of one EA }
  1515.     cbMaxEAListSize: ULong;             { max size of the full EA List }
  1516.   End;
  1517.  
  1518. Type
  1519.   PEASIZEBUF = ^EASIZEBUF;
  1520.  
  1521.  
  1522. ΓòÉΓòÉΓòÉ <hidden> EASIZEBUF Field - cbMaxEASize ΓòÉΓòÉΓòÉ
  1523.  
  1524.  cbMaxEASize (USHORT) 
  1525.     Maximum size of an EA. 
  1526.  
  1527.  
  1528. ΓòÉΓòÉΓòÉ <hidden> EASIZEBUF Field - cbMaxEAListSize ΓòÉΓòÉΓòÉ
  1529.  
  1530.  cbMaxEAListSize (ULONG) 
  1531.     Maximum size of the full EA list. 
  1532.  
  1533.  
  1534. ΓòÉΓòÉΓòÉ 1.21. ERRORID ΓòÉΓòÉΓòÉ
  1535.  
  1536. Error identity. 
  1537.  
  1538. Type
  1539.   ERRORID = ULONG;
  1540.  
  1541.  
  1542. ΓòÉΓòÉΓòÉ 1.22. EXCEPTIONREGISTRATIONRECORD ΓòÉΓòÉΓòÉ
  1543.  
  1544. These structures are linked together to form a chain of exception handlers that 
  1545. are dispatched upon receipt of an exception. Exception handlers should not be 
  1546. registered directly from a high level language such as "C". This is the 
  1547. responsibility of the language runtime routine. 
  1548.  
  1549. Type
  1550.   EXCEPTIONREGISTRATIONRECORD = Record
  1551.     Prev_Structure:   PExceptionRegistrationRecord;
  1552.     ExceptionHandler: Err;
  1553.   End;
  1554.  
  1555. Type
  1556.   PEXCEPTIONREGISTRATIONRECORD = ^EXCEPTIONREGISTRATIONRECORD;
  1557.  
  1558.  
  1559. ΓòÉΓòÉΓòÉ <hidden> EXCEPTIONREGISTRATIONRECORD Field - prev_structure ΓòÉΓòÉΓòÉ
  1560.  
  1561.  prev_structure (STRUCT _EXCEPTIONREGISTRATIONRECORD *) 
  1562.     Nested exception registration record structure. 
  1563.  
  1564.     This field should be treated as a C-language volatile field. That is, even 
  1565.     though this field may be changed in ways unknown to your program, the 
  1566.     intent of the original expression will be maintained. 
  1567.  
  1568.  
  1569. ΓòÉΓòÉΓòÉ <hidden> EXCEPTIONREGISTRATIONRECORD Field - ExceptionHandler ΓòÉΓòÉΓòÉ
  1570.  
  1571.  ExceptionHandler (_ERR *) 
  1572.     Pointer to the ERR function. 
  1573.  
  1574.     This field must be treated as a C-language volatile field. That is, even 
  1575.     though this field may be changed in ways unknown to your program, the 
  1576.     intent of the original expression will be maintained. 
  1577.  
  1578.     The ERR function is defined below: 
  1579.  
  1580.  
  1581.         typedef ULONG APIENTRY _ERR (PEXECPTIONREPORTRECORD,
  1582.                                      struct _EXCEPTIONREGISTRATIONRECORD *,
  1583.                                      PCONTEXTRECORD,
  1584.                                      PVOID);
  1585.  
  1586.         PErr - Not defined
  1587.  
  1588.  
  1589. ΓòÉΓòÉΓòÉ 1.23. EXCEPTIONREPORTRECORD ΓòÉΓòÉΓòÉ
  1590.  
  1591. This structure contains machine-independent information about an exception or 
  1592. unwind. No system exception will ever have more parameters than the value of 
  1593. EXCEPTION_MAXIMUM_PARAMETERS. User exceptions are not bound to this limit. 
  1594.  
  1595. Type
  1596.   ExceptionReportRecord = Record
  1597.     ExceptionNum:     ULong;            { exception number }
  1598.     fHandlerFlags:    ULong;
  1599.     NestedExceptionReportRecord: PExceptionReportRecord;
  1600.     ExceptionAddress: Pointer;
  1601.     cParameters:      ULong;            { Size of Exception Specific Info }
  1602.     ExceptionInfo: array [0..exception_Maximum_Parameters-1] of ULong;
  1603.   end;                                  { Exception Specfic Info }
  1604.  
  1605. Type
  1606.   PEXCEPTIONREPORTRECORD = ^EXCEPTIONREPORTRECORD;
  1607.  
  1608.  
  1609. ΓòÉΓòÉΓòÉ <hidden> EXCEPTIONREPORTRECORD Field - ExceptionNum ΓòÉΓòÉΓòÉ
  1610.  
  1611.  ExceptionNum (ULONG) 
  1612.     Exception number. 
  1613.  
  1614.  
  1615. ΓòÉΓòÉΓòÉ <hidden> EXCEPTIONREPORTRECORD Field - fHandlerFlags ΓòÉΓòÉΓòÉ
  1616.  
  1617.  fHandlerFlags (ULONG) 
  1618.     Handler flags. 
  1619.  
  1620.  
  1621. ΓòÉΓòÉΓòÉ <hidden> EXCEPTIONREPORTRECORD Field - NestedExceptionReportRecord ΓòÉΓòÉΓòÉ
  1622.  
  1623.  NestedExceptionReportRecord (STRUCT _EXCEPTIONREPORTRECORD *) 
  1624.     Nested exception report record structure. 
  1625.  
  1626.  
  1627. ΓòÉΓòÉΓòÉ <hidden> EXCEPTIONREPORTRECORD Field - ExceptionAddress ΓòÉΓòÉΓòÉ
  1628.  
  1629.  ExceptionAddress (PVOID) 
  1630.     Address of the exception. 
  1631.  
  1632.  
  1633. ΓòÉΓòÉΓòÉ <hidden> EXCEPTIONREPORTRECORD Field - cParameters ΓòÉΓòÉΓòÉ
  1634.  
  1635.  cParameters (ULONG) 
  1636.     Size of exception specific information. 
  1637.  
  1638.  
  1639. ΓòÉΓòÉΓòÉ <hidden> EXCEPTIONREPORTRECORD Field - ExceptionInfo[EXCEPTION_MAXIMUM_PARAMETERS] ΓòÉΓòÉΓòÉ
  1640.  
  1641.  ExceptionInfo[EXCEPTION_MAXIMUM_PARAMETERS] (ULONG) 
  1642.     Exception specific information. 
  1643.  
  1644.  
  1645. ΓòÉΓòÉΓòÉ 1.24. FDATE ΓòÉΓòÉΓòÉ
  1646.  
  1647. Date data structure for file-system functions. 
  1648.  
  1649. Type
  1650.   FDATE = Record
  1651.  
  1652.     const
  1653.     mfdDay                        = $001F;
  1654.     sfdDay                        = 0;
  1655.     mfdMonth                      = $01E0;
  1656.     sfdMonth                      = 5;
  1657.     mfdYear                       = $FE00;
  1658.     sfdYear                       = 9;
  1659.  
  1660.     type
  1661.     PVolumeLabel = ^VolumeLabel;
  1662.     VolumeLabel = String[12];
  1663.  
  1664.     PFsInfo = ^FsInfo;
  1665.     FsInfo = record
  1666.     fdateCreation:  FDate;
  1667.     ftimeCreation:  FTime;
  1668.     vol:            VolumeLabel;
  1669.   End;
  1670.  
  1671. Type
  1672.   PFDATE = ^FDATE;
  1673.  
  1674.  
  1675. ΓòÉΓòÉΓòÉ <hidden> FDATE Field - day:5 ΓòÉΓòÉΓòÉ
  1676.  
  1677.  day:5 (USHORT) 
  1678.     Binary day for directory entry. 
  1679.  
  1680.  
  1681. ΓòÉΓòÉΓòÉ <hidden> FDATE Field - month:4 ΓòÉΓòÉΓòÉ
  1682.  
  1683.  month:4 (USHORT) 
  1684.     Binary month for directory entry. 
  1685.  
  1686.  
  1687. ΓòÉΓòÉΓòÉ <hidden> FDATE Field - year:7 ΓòÉΓòÉΓòÉ
  1688.  
  1689.  year:7 (USHORT) 
  1690.     The number of years since 1980 for this directory entry. 
  1691.  
  1692.  
  1693. ΓòÉΓòÉΓòÉ 1.25. FEA2 ΓòÉΓòÉΓòÉ
  1694.  
  1695. FEA2 defines the format for setting the full extended attributes in the file. 
  1696.  
  1697. Type
  1698.   FEA2 = Record
  1699.     oNextEntryOffset: ULong;    { new field }
  1700.     fEA:              Byte;
  1701.     cbName:           Byte;
  1702.     cbValue:          SmallWord;
  1703.     szName:           Char;     { new field }
  1704.   End;
  1705.  
  1706. Type
  1707.   PFEA2 = ^FEA2;
  1708.  
  1709. Extended attributes (EAs) are non-critical by default. A non-critical EA is one 
  1710. that is not necessary to the functionality of the application. If a 
  1711. non-critical EA is lost, the system continues to operate correctly. For 
  1712. example, losing the icons associated with data files does not generally cause 
  1713. any ill effect other than the inability to show the icon. 
  1714.  
  1715. A critical extended attribute is one which is necessary for the correct 
  1716. operation of the operating system or of a particular operation. EAs should be 
  1717. marked as critical if their loss would cause the system or program to perform 
  1718. incorrectly. For example, a mail program might store mail headers in EAs. The 
  1719. loss of the header from a message would normally render the mail program unable 
  1720. to further use that message. This would be unacceptable, so the mail program 
  1721. should mark this EA as critical. 
  1722.  
  1723.  
  1724. ΓòÉΓòÉΓòÉ <hidden> FEA2 Field - oNextEntryOffset ΓòÉΓòÉΓòÉ
  1725.  
  1726.  oNextEntryOffset (ULONG) 
  1727.     Offset to next entry. 
  1728.  
  1729.  
  1730. ΓòÉΓòÉΓòÉ <hidden> FEA2 Field - fEA ΓòÉΓòÉΓòÉ
  1731.  
  1732.  fEA (BYTE) 
  1733.     Extended attributes flag. 
  1734.  
  1735.     FEA_NEEDEA 
  1736.             Extended attributes are critical. 
  1737.  
  1738.             If this flag is set, this file cannot be copied to a file system 
  1739.             that does not support extended attributes. This flag should only be 
  1740.             set if extended attributes are critical to the processing of this 
  1741.             file. 
  1742.  
  1743.     0 
  1744.             Extended attributes are not critical. 
  1745.  
  1746.  
  1747. ΓòÉΓòÉΓòÉ <hidden> FEA2 Field - cbName ΓòÉΓòÉΓòÉ
  1748.  
  1749.  cbName (BYTE) 
  1750.     Length of szName, not including nil. 
  1751.  
  1752.     This value must be greater than 0. 
  1753.  
  1754.  
  1755. ΓòÉΓòÉΓòÉ <hidden> FEA2 Field - cbValue ΓòÉΓòÉΓòÉ
  1756.  
  1757.  cbValue (USHORT) 
  1758.     Value length. 
  1759.  
  1760.     Sending an EA with cbValue set to 0 in the FEA2 data structure causes that 
  1761.     attribute to be deleted, if possible. Receiving an EA with cbValue set to 0 
  1762.     in the FEA2 data structure indicates that the attribute is not present. 
  1763.  
  1764.  
  1765. ΓòÉΓòÉΓòÉ <hidden> FEA2 Field - szName[1] ΓòÉΓòÉΓòÉ
  1766.  
  1767.  szName[1] (CHAR) 
  1768.     Extended attribute name. 
  1769.  
  1770.  
  1771. ΓòÉΓòÉΓòÉ 1.26. FEA2LIST ΓòÉΓòÉΓòÉ
  1772.  
  1773. FEA2 data structure. 
  1774.  
  1775. Type
  1776.   FEA2LIST = Record
  1777.     cbList:           ULong;
  1778.     list: array [0..0] of Fea2;
  1779.   End;
  1780.  
  1781. Type
  1782.   PFEA2LIST = ^FEA2LIST;
  1783.  
  1784.  
  1785. ΓòÉΓòÉΓòÉ <hidden> FEA2LIST Field - cbList ΓòÉΓòÉΓòÉ
  1786.  
  1787.  cbList (ULONG) 
  1788.     Total bytes of structure including full list. 
  1789.  
  1790.  
  1791. ΓòÉΓòÉΓòÉ <hidden> FEA2LIST Field - list[1] ΓòÉΓòÉΓòÉ
  1792.  
  1793.  list[1] (FEA2) 
  1794.     Variable-length FEA2 structures. 
  1795.  
  1796.  
  1797. ΓòÉΓòÉΓòÉ 1.27. FHLOCK ΓòÉΓòÉΓòÉ
  1798.  
  1799. Unsigned integer in the range 0 through 4 294 967 295. 
  1800.  
  1801. Type
  1802.   FHLOCK = ULong;
  1803.  
  1804.  
  1805. ΓòÉΓòÉΓòÉ 1.28. FILEFINDBUF ΓòÉΓòÉΓòÉ
  1806.  
  1807. Find file buffer data structure. 
  1808.  
  1809. Type
  1810.   FILEFINDBUF = Record
  1811.     fdateCreation:   FDate;
  1812.     ftimeCreation:   FTime;
  1813.     fdateLastAccess: FDate;
  1814.     ftimeLastAccess: FTime;
  1815.     fdateLastWrite:  FDate;
  1816.     ftimeLastWrite:  FTime;
  1817.     cbFile:          ULong;
  1818.     cbFileAlloc:     ULong;
  1819.     attrFile:        SmallWord;
  1820.     achName:         String[cchMaxPathComp-1];
  1821.   End;
  1822.  
  1823. Type
  1824.   PFILEFINDBUF = ^FILEFINDBUF;
  1825.  
  1826.  
  1827. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - fdateCreation ΓòÉΓòÉΓòÉ
  1828.  
  1829.  fdateCreation (FDATE) 
  1830.     Date of file creation. 
  1831.  
  1832.  
  1833. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - ftimeCreation ΓòÉΓòÉΓòÉ
  1834.  
  1835.  ftimeCreation (FTIME) 
  1836.     Time of file creation. 
  1837.  
  1838.  
  1839. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - fdateLastAccess ΓòÉΓòÉΓòÉ
  1840.  
  1841.  fdateLastAccess (FDATE) 
  1842.     Date of last access. 
  1843.  
  1844.  
  1845. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - ftimeLastAccess ΓòÉΓòÉΓòÉ
  1846.  
  1847.  ftimeLastAccess (FTIME) 
  1848.     Time of last access. 
  1849.  
  1850.  
  1851. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - fdateLastWrite ΓòÉΓòÉΓòÉ
  1852.  
  1853.  fdateLastWrite (FDATE) 
  1854.     Date of last write. 
  1855.  
  1856.  
  1857. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - ftimeLastWrite ΓòÉΓòÉΓòÉ
  1858.  
  1859.  ftimeLastWrite (FTIME) 
  1860.     Time of last write. 
  1861.  
  1862.  
  1863. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - cbFile ΓòÉΓòÉΓòÉ
  1864.  
  1865.  cbFile (ULONG) 
  1866.     Size of file. 
  1867.  
  1868.  
  1869. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - cbFileAlloc ΓòÉΓòÉΓòÉ
  1870.  
  1871.  cbFileAlloc (ULONG) 
  1872.     Allocated size. 
  1873.  
  1874.  
  1875. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - attrFile ΓòÉΓòÉΓòÉ
  1876.  
  1877.  attrFile (USHORT) 
  1878.     File attributes. 
  1879.  
  1880.  
  1881. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - cchName ΓòÉΓòÉΓòÉ
  1882.  
  1883.  cchName (UCHAR) 
  1884.     Length of file name. 
  1885.  
  1886.  
  1887. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF Field - achName[CCHMAXPATHCOMP] ΓòÉΓòÉΓòÉ
  1888.  
  1889.  achName[CCHMAXPATHCOMP] (CHAR) 
  1890.     File name including null terminator. 
  1891.  
  1892.  
  1893. ΓòÉΓòÉΓòÉ 1.29. FILEFINDBUF3 ΓòÉΓòÉΓòÉ
  1894.  
  1895. Level 1 (32-bit) information (used without EAs). 
  1896.  
  1897. Type
  1898.   FILEFINDBUF3 = Record
  1899.     oNextEntryOffset: ULong;    { new field }
  1900.     fdateCreation:    FDate;
  1901.     ftimeCreation:    FTime;
  1902.     fdateLastAccess:  FDate;
  1903.     ftimeLastAccess:  FTime;
  1904.     fdateLastWrite:   FDate;
  1905.     ftimeLastWrite:   FTime;
  1906.     cbFile:           ULong;
  1907.     cbFileAlloc:      ULong;
  1908.     attrFile:         ULong;    { widened field }
  1909.     achName:          String[cchMaxPathComp-1];
  1910.   End;
  1911.  
  1912. Type
  1913.   PFILEFINDBUF3 = ^FILEFINDBUF3;
  1914.  
  1915.  
  1916. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - oNextEntryOffset ΓòÉΓòÉΓòÉ
  1917.  
  1918.  oNextEntryOffset (ULONG) 
  1919.     Offset of next entry. 
  1920.  
  1921.  
  1922. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - fdateCreation ΓòÉΓòÉΓòÉ
  1923.  
  1924.  fdateCreation (FDATE) 
  1925.     Date of file creation. 
  1926.  
  1927.  
  1928. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - ftimeCreation ΓòÉΓòÉΓòÉ
  1929.  
  1930.  ftimeCreation (FTIME) 
  1931.     Time of file creation. 
  1932.  
  1933.  
  1934. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - fdateLastAccess ΓòÉΓòÉΓòÉ
  1935.  
  1936.  fdateLastAccess (FDATE) 
  1937.     Date of last access. 
  1938.  
  1939.  
  1940. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - ftimeLastAccess ΓòÉΓòÉΓòÉ
  1941.  
  1942.  ftimeLastAccess (FTIME) 
  1943.     Time of last access. 
  1944.  
  1945.  
  1946. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - fdateLastWrite ΓòÉΓòÉΓòÉ
  1947.  
  1948.  fdateLastWrite (FDATE) 
  1949.     Date of last write. 
  1950.  
  1951.  
  1952. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - ftimeLastWrite ΓòÉΓòÉΓòÉ
  1953.  
  1954.  ftimeLastWrite (FTIME) 
  1955.     Time of last write. 
  1956.  
  1957.  
  1958. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - cbFile ΓòÉΓòÉΓòÉ
  1959.  
  1960.  cbFile (ULONG) 
  1961.     Size of file. 
  1962.  
  1963.  
  1964. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - cbFileAlloc ΓòÉΓòÉΓòÉ
  1965.  
  1966.  cbFileAlloc (ULONG) 
  1967.     Allocation size. 
  1968.  
  1969.  
  1970. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - attrFile ΓòÉΓòÉΓòÉ
  1971.  
  1972.  attrFile (ULONG) 
  1973.     File attributes. 
  1974.  
  1975.  
  1976. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - cchName ΓòÉΓòÉΓòÉ
  1977.  
  1978.  cchName (UCHAR) 
  1979.  
  1980.  
  1981. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF3 Field - achName[CCHMAXPATHCOMP] ΓòÉΓòÉΓòÉ
  1982.  
  1983.  achName[CCHMAXPATHCOMP] (CHAR) 
  1984.     File name including null terminator. 
  1985.  
  1986.  
  1987. ΓòÉΓòÉΓòÉ 1.30. FILEFINDBUF4 ΓòÉΓòÉΓòÉ
  1988.  
  1989. Level 2 (32-bit) information (used with EAs). 
  1990.  
  1991. Type
  1992.   FILEFINDBUF4 = Record
  1993.     oNextEntryOffset: ULong;    { new field }
  1994.     fdateCreation:    FDate;
  1995.     ftimeCreation:    FTime;
  1996.     fdateLastAccess:  FDate;
  1997.     ftimeLastAccess:  FTime;
  1998.     fdateLastWrite:   FDate;
  1999.     ftimeLastWrite:   FTime;
  2000.     cbFile:           ULong;
  2001.     cbFileAlloc:      ULong;
  2002.     attrFile:         ULong;    { widened field }
  2003.     cbList:           ULong;
  2004.     achName:          String[cchMaxPathComp-1];
  2005.   End;
  2006.  
  2007. Type
  2008.   PFILEFINDBUF4 = ^FILEFINDBUF4;
  2009.  
  2010.  
  2011. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - oNextEntryOffset ΓòÉΓòÉΓòÉ
  2012.  
  2013.  oNextEntryOffset (ULONG) 
  2014.     Offset of next entry. 
  2015.  
  2016.  
  2017. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - fdateCreation ΓòÉΓòÉΓòÉ
  2018.  
  2019.  fdateCreation (FDATE) 
  2020.     Date of file creation. 
  2021.  
  2022.  
  2023. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - ftimeCreation ΓòÉΓòÉΓòÉ
  2024.  
  2025.  ftimeCreation (FTIME) 
  2026.     Time of file creation. 
  2027.  
  2028.  
  2029. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - fdateLastAccess ΓòÉΓòÉΓòÉ
  2030.  
  2031.  fdateLastAccess (FDATE) 
  2032.     Date of last access. 
  2033.  
  2034.  
  2035. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - ftimeLastAccess ΓòÉΓòÉΓòÉ
  2036.  
  2037.  ftimeLastAccess (FTIME) 
  2038.     Time of last access. 
  2039.  
  2040.  
  2041. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - fdateLastWrite ΓòÉΓòÉΓòÉ
  2042.  
  2043.  fdateLastWrite (FDATE) 
  2044.     Date of last write. 
  2045.  
  2046.  
  2047. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - ftimeLastWrite ΓòÉΓòÉΓòÉ
  2048.  
  2049.  ftimeLastWrite (FTIME) 
  2050.     Time of last write. 
  2051.  
  2052.  
  2053. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - cbFile ΓòÉΓòÉΓòÉ
  2054.  
  2055.  cbFile (ULONG) 
  2056.     Size of file. 
  2057.  
  2058.  
  2059. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - cbFileAlloc ΓòÉΓòÉΓòÉ
  2060.  
  2061.  cbFileAlloc (ULONG) 
  2062.     Allocated size. 
  2063.  
  2064.  
  2065. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - attrFile ΓòÉΓòÉΓòÉ
  2066.  
  2067.  attrFile (ULONG) 
  2068.     File attributes. 
  2069.  
  2070.  
  2071. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - cbList ΓòÉΓòÉΓòÉ
  2072.  
  2073.  cbList (ULONG) 
  2074.     Size of the file's extended attributes. 
  2075.  
  2076.     The size is measured in bytes and is the size of the file's entire extended 
  2077.     attribute set on the disk. 
  2078.  
  2079.  
  2080. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - cchName ΓòÉΓòÉΓòÉ
  2081.  
  2082.  cchName (UCHAR) 
  2083.     Length of file name. 
  2084.  
  2085.  
  2086. ΓòÉΓòÉΓòÉ <hidden> FILEFINDBUF4 Field - achName[CCHMAXPATHCOMP] ΓòÉΓòÉΓòÉ
  2087.  
  2088.  achName[CCHMAXPATHCOMP] (CHAR) 
  2089.     File name including null terminator. 
  2090.  
  2091.  
  2092. ΓòÉΓòÉΓòÉ 1.31. FILELOCK ΓòÉΓòÉΓòÉ
  2093.  
  2094. FILELOCK data structure. 
  2095.  
  2096. Type
  2097.   FILELOCK = Record
  2098.     lOffset: Long;
  2099.     lRange:  Long;
  2100.   End;
  2101.  
  2102. Type
  2103.   PFILELOCK = ^FILELOCK;
  2104.  
  2105.  
  2106. ΓòÉΓòÉΓòÉ <hidden> FILELOCK Field - lOffset ΓòÉΓòÉΓòÉ
  2107.  
  2108.  lOffset (LONG) 
  2109.     Offset to the beginning of the lock (or unlock) range. 
  2110.  
  2111.  
  2112. ΓòÉΓòÉΓòÉ <hidden> FILELOCK Field - lRange ΓòÉΓòÉΓòÉ
  2113.  
  2114.  lRange (LONG) 
  2115.     Length, in bytes, of the lock (or unlock) range. 
  2116.  
  2117.     A value of 0 indicates that locking (or unlocking) is not required. 
  2118.  
  2119.  
  2120. ΓòÉΓòÉΓòÉ 1.32. FILESTATUS ΓòÉΓòÉΓòÉ
  2121.  
  2122. Use for Level 1 (FIL_STANDARD) file information for: 
  2123.  
  2124.      DosQueryFileInfo 
  2125.      DosQueryPathInfo 
  2126.      DosSetFileInfo 
  2127.      DosSetPathInfo 
  2128.  
  2129.   Type
  2130.     FILESTATUS = Record
  2131.       fdateCreation:   FDate;
  2132.       ftimeCreation:   FTime;
  2133.       fdateLastAccess: FDate;
  2134.       ftimeLastAccess: FTime;
  2135.       fdateLastWrite:  FDate;
  2136.       ftimeLastWrite:  FTime;
  2137.       cbFile:          ULong;
  2138.       cbFileAlloc:     ULong;
  2139.       attrFile:        SmallWord;
  2140.     End;
  2141.  
  2142.   Type
  2143.     PFILESTATUS = ^FILESTATUS;
  2144.  
  2145.  
  2146. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - fdateCreation ΓòÉΓòÉΓòÉ
  2147.  
  2148.  fdateCreation (FDATE) 
  2149.     Date of file creation. 
  2150.  
  2151.  
  2152. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - ftimeCreation ΓòÉΓòÉΓòÉ
  2153.  
  2154.  ftimeCreation (FTIME) 
  2155.     Time of file creation. 
  2156.  
  2157.  
  2158. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - fdateLastAccess ΓòÉΓòÉΓòÉ
  2159.  
  2160.  fdateLastAccess (FDATE) 
  2161.     Date of last access. 
  2162.  
  2163.  
  2164. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - ftimeLastAccess ΓòÉΓòÉΓòÉ
  2165.  
  2166.  ftimeLastAccess (FTIME) 
  2167.     Time of last access. 
  2168.  
  2169.  
  2170. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - fdateLastWrite ΓòÉΓòÉΓòÉ
  2171.  
  2172.  fdateLastWrite (FDATE) 
  2173.     Date of last write. 
  2174.  
  2175.  
  2176. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - ftimeLastWrite ΓòÉΓòÉΓòÉ
  2177.  
  2178.  ftimeLastWrite (FTIME) 
  2179.     Time of last write. 
  2180.  
  2181.  
  2182. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - cbFile ΓòÉΓòÉΓòÉ
  2183.  
  2184.  cbFile (ULONG) 
  2185.     File size (end of data). 
  2186.  
  2187.  
  2188. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - cbFileAlloc ΓòÉΓòÉΓòÉ
  2189.  
  2190.  cbFileAlloc (ULONG) 
  2191.     File allocated size. 
  2192.  
  2193.  
  2194. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS Field - attrFile ΓòÉΓòÉΓòÉ
  2195.  
  2196.  attrFile (USHORT) 
  2197.     Attributes of the file. 
  2198.  
  2199.  
  2200. ΓòÉΓòÉΓòÉ 1.33. FILESTATUS3 ΓòÉΓòÉΓòÉ
  2201.  
  2202. Level 1 (32-bit) (FIL_STANDARD) information. 
  2203.  
  2204. Type
  2205.   FILESTATUS3 = Record
  2206.     fdateCreation:   FDate;
  2207.     ftimeCreation:   FTime;
  2208.     fdateLastAccess: FDate;
  2209.     ftimeLastAccess: FTime;
  2210.     fdateLastWrite:  FDate;
  2211.     ftimeLastWrite:  FTime;
  2212.     cbFile:          ULong;
  2213.     cbFileAlloc:     ULong;
  2214.     attrFile:        ULong;
  2215.   End;
  2216.  
  2217. Type
  2218.   PFILESTATUS3 = ^FILESTATUS3;
  2219.  
  2220.  
  2221. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - fdateCreation ΓòÉΓòÉΓòÉ
  2222.  
  2223.  fdateCreation (FDATE) 
  2224.     Date of file creation. 
  2225.  
  2226.  
  2227. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - ftimeCreation ΓòÉΓòÉΓòÉ
  2228.  
  2229.  ftimeCreation (FTIME) 
  2230.     Time of file creation. 
  2231.  
  2232.  
  2233. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - fdateLastAccess ΓòÉΓòÉΓòÉ
  2234.  
  2235.  fdateLastAccess (FDATE) 
  2236.     Date of last access. 
  2237.  
  2238.  
  2239. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - ftimeLastAccess ΓòÉΓòÉΓòÉ
  2240.  
  2241.  ftimeLastAccess (FTIME) 
  2242.     Time of last access. 
  2243.  
  2244.  
  2245. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - fdateLastWrite ΓòÉΓòÉΓòÉ
  2246.  
  2247.  fdateLastWrite (FDATE) 
  2248.     Date of last write. 
  2249.  
  2250.  
  2251. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - ftimeLastWrite ΓòÉΓòÉΓòÉ
  2252.  
  2253.  ftimeLastWrite (FTIME) 
  2254.     Time of last write. 
  2255.  
  2256.  
  2257. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - cbFile ΓòÉΓòÉΓòÉ
  2258.  
  2259.  cbFile (ULONG) 
  2260.     File size (end of data). 
  2261.  
  2262.  
  2263. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - cbFileAlloc ΓòÉΓòÉΓòÉ
  2264.  
  2265.  cbFileAlloc (ULONG) 
  2266.     File allocated size. 
  2267.  
  2268.  
  2269. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS3 Field - attrFile ΓòÉΓòÉΓòÉ
  2270.  
  2271.  attrFile (ULONG) 
  2272.     Attributes of the file. 
  2273.  
  2274.  
  2275. ΓòÉΓòÉΓòÉ 1.34. FILESTATUS4 ΓòÉΓòÉΓòÉ
  2276.  
  2277. Level 2 (32-bit) (FIL_QUERYEASIZE) information. 
  2278.  
  2279. Type
  2280.   FILESTATUS4 = Record
  2281.     fdateCreation:   FDate;
  2282.     ftimeCreation:   FTime;
  2283.     fdateLastAccess: FDate;
  2284.     ftimeLastAccess: FTime;
  2285.     fdateLastWrite:  FDate;
  2286.     ftimeLastWrite:  FTime;
  2287.     cbFile:          ULong;
  2288.     cbFileAlloc:     ULong;
  2289.     attrFile:        ULong;
  2290.     cbList:          ULong;
  2291.   End;
  2292.  
  2293. Type
  2294.   PFILESTATUS4 = ^FILESTATUS4;
  2295.  
  2296.  
  2297. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - fdateCreation ΓòÉΓòÉΓòÉ
  2298.  
  2299.  fdateCreation (FDATE) 
  2300.     Date of file creation. 
  2301.  
  2302.  
  2303. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - ftimeCreation ΓòÉΓòÉΓòÉ
  2304.  
  2305.  ftimeCreation (FTIME) 
  2306.     Time of file creation. 
  2307.  
  2308.  
  2309. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - fdateLastAccess ΓòÉΓòÉΓòÉ
  2310.  
  2311.  fdateLastAccess (FDATE) 
  2312.     Date of last access. 
  2313.  
  2314.  
  2315. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - ftimeLastAccess ΓòÉΓòÉΓòÉ
  2316.  
  2317.  ftimeLastAccess (FTIME) 
  2318.     Time of last access. 
  2319.  
  2320.  
  2321. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - fdateLastWrite ΓòÉΓòÉΓòÉ
  2322.  
  2323.  fdateLastWrite (FDATE) 
  2324.     Date of last write. 
  2325.  
  2326.  
  2327. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - ftimeLastWrite ΓòÉΓòÉΓòÉ
  2328.  
  2329.  ftimeLastWrite (FTIME) 
  2330.     Time of last write. 
  2331.  
  2332.  
  2333. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - cbFile ΓòÉΓòÉΓòÉ
  2334.  
  2335.  cbFile (ULONG) 
  2336.     File size (end of data). 
  2337.  
  2338.  
  2339. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - cbFileAlloc ΓòÉΓòÉΓòÉ
  2340.  
  2341.  cbFileAlloc (ULONG) 
  2342.     File allocated size. 
  2343.  
  2344.  
  2345. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - attrFile ΓòÉΓòÉΓòÉ
  2346.  
  2347.  attrFile (ULONG) 
  2348.     Attributes of the file. 
  2349.  
  2350.  
  2351. ΓòÉΓòÉΓòÉ <hidden> FILESTATUS4 Field - cbList ΓòÉΓòÉΓòÉ
  2352.  
  2353.  cbList (ULONG) 
  2354.     Length of entire EA set. 
  2355.  
  2356.  
  2357. ΓòÉΓòÉΓòÉ 1.35. FPREG ΓòÉΓòÉΓòÉ
  2358.  
  2359. Coprocessor stack register element. 
  2360.  
  2361. Type
  2362.   FPREG = Record
  2363.     losig:   ULong;
  2364.     hisig:   ULong;
  2365.     signexp: SmallWord;
  2366.   End;
  2367.  
  2368. Type
  2369.   PFPREG = ^FPREG;
  2370.  
  2371. A floating point register is 80 bits wide and consists of three fields. The 
  2372. following graphic shows the layout of the floating point register: 
  2373.  
  2374.  
  2375.   79  78         64 63                                     0
  2376.   ΓöîΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2377.   Γöé   Γöé            Γöé             Significand               Γöé
  2378.   ΓööΓöÇ@>@ΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2379.     Γöé        Γöé
  2380.     Γöé        Exponent
  2381.    Sign
  2382.  
  2383.  
  2384. ΓòÉΓòÉΓòÉ <hidden> FPREG Field - losig ΓòÉΓòÉΓòÉ
  2385.  
  2386.  losig (ULONG) 
  2387.     Low 32-bits of the significand. 
  2388.  
  2389.     The low 32-bits of the number's significant digits are held in the lower 
  2390.     part of the significand field. 
  2391.  
  2392.  
  2393. ΓòÉΓòÉΓòÉ <hidden> FPREG Field - hisig ΓòÉΓòÉΓòÉ
  2394.  
  2395.  hisig (ULONG) 
  2396.     High 32-bits of the significand. 
  2397.  
  2398.     The high 32-bits of the number's significant digits are held in the higher 
  2399.     part of the significand field. 
  2400.  
  2401.  
  2402. ΓòÉΓòÉΓòÉ <hidden> FPREG Field - signexp ΓòÉΓòÉΓòÉ
  2403.  
  2404.  signexp (USHORT) 
  2405.     Sign and exponent. 
  2406.  
  2407.     The exponent field (bits 64-78) locates the binary point within the 
  2408.     significand field (bits 0-63). 
  2409.  
  2410.     The 1-bit sign field (bit 79) indicates whether the number is positive or 
  2411.     negative 
  2412.  
  2413.  
  2414. ΓòÉΓòÉΓòÉ 1.36. FRAME ΓòÉΓòÉΓòÉ
  2415.  
  2416. Frame control data structure. 
  2417.  
  2418. Type
  2419.   FRAME = Record
  2420.     bCharsPerLine: Byte;
  2421.     bLinesPerInch: Byte;
  2422.   End;
  2423.  
  2424. Type
  2425.   PFRAME = ^FRAME;
  2426.  
  2427.  
  2428. ΓòÉΓòÉΓòÉ <hidden> FRAME Field - bCharsPerLine ΓòÉΓòÉΓòÉ
  2429.  
  2430.  bCharsPerLine (BYTE) 
  2431.     Characters per line. 
  2432.  
  2433.     Valid values are 80 and 132. 
  2434.  
  2435.  
  2436. ΓòÉΓòÉΓòÉ <hidden> FRAME Field - bLinesPerInch ΓòÉΓòÉΓòÉ
  2437.  
  2438.  bLinesPerInch (BYTE) 
  2439.     Lines per inch. 
  2440.  
  2441.     Valid values are 6 and 8. 
  2442.  
  2443.  
  2444. ΓòÉΓòÉΓòÉ 1.37. FSALLOCATE ΓòÉΓòÉΓòÉ
  2445.  
  2446. File-system device allocation. 
  2447.  
  2448. Type
  2449.   FSALLOCATE = Record
  2450.     idFileSystem: ULong;
  2451.     cSectorUnit:  ULong;
  2452.     cUnit:        ULong;
  2453.     cUnitAvail:   ULong;
  2454.     cbSector:     SmallWord;
  2455.   End;
  2456.  
  2457. Type
  2458.   PFSALLOCATE = ^FSALLOCATE;
  2459.  
  2460.  
  2461. ΓòÉΓòÉΓòÉ <hidden> FSALLOCATE Field - idFileSystem ΓòÉΓòÉΓòÉ
  2462.  
  2463.  idFileSystem (ULONG) 
  2464.     File system identification. 
  2465.  
  2466.  
  2467. ΓòÉΓòÉΓòÉ <hidden> FSALLOCATE Field - cSectorUnit ΓòÉΓòÉΓòÉ
  2468.  
  2469.  cSectorUnit (ULONG) 
  2470.     Number of sectors per allocation unit. 
  2471.  
  2472.  
  2473. ΓòÉΓòÉΓòÉ <hidden> FSALLOCATE Field - cUnit ΓòÉΓòÉΓòÉ
  2474.  
  2475.  cUnit (ULONG) 
  2476.     Number of allocation units. 
  2477.  
  2478.  
  2479. ΓòÉΓòÉΓòÉ <hidden> FSALLOCATE Field - cUnitAvail ΓòÉΓòÉΓòÉ
  2480.  
  2481.  cUnitAvail (ULONG) 
  2482.     Number of allocation units available. 
  2483.  
  2484.  
  2485. ΓòÉΓòÉΓòÉ <hidden> FSALLOCATE Field - cbSector ΓòÉΓòÉΓòÉ
  2486.  
  2487.  cbSector (USHORT) 
  2488.     Number of bytes per sector. 
  2489.  
  2490.  
  2491. ΓòÉΓòÉΓòÉ 1.38. FSINFO ΓòÉΓòÉΓòÉ
  2492.  
  2493. File-system information data structure. 
  2494.  
  2495. Type
  2496.   FSINFO = Record
  2497.     fdateCreation:  FDate;
  2498.     ftimeCreation:  FTime;
  2499.     vol:            VolumeLabel;
  2500.   End;
  2501.  
  2502. Type
  2503.   PFSINFO = ^FSINFO;
  2504.  
  2505.  
  2506. ΓòÉΓòÉΓòÉ <hidden> FSINFO Field - ulVSN ΓòÉΓòÉΓòÉ
  2507.  
  2508.  ulVSN (ULONG) 
  2509.     Volume Serial Number. 
  2510.  
  2511.     Volume Serial Number is a unique 32-bit number that the operating system 
  2512.     uses to identify its disk or diskette volumes. The hard error prompts the 
  2513.     user for an unmounted removable volume by displaying both the Volume Serial 
  2514.     Number (an 8-digit hexadecimal number) and the Volume Label. 
  2515.  
  2516.  
  2517. ΓòÉΓòÉΓòÉ <hidden> FSINFO Field - vol ΓòÉΓòÉΓòÉ
  2518.  
  2519.  vol (VOLUMELABEL) 
  2520.     Volume label. 
  2521.  
  2522.     Trailing blanks in the time the volume label are not considered part of the 
  2523.     label, and are not returned as valid label data. The volume label is 
  2524.     limited to a length of 11 bytes. 
  2525.  
  2526.  
  2527. ΓòÉΓòÉΓòÉ 1.39. FSQBUFFER2 ΓòÉΓòÉΓòÉ
  2528.  
  2529. Data structure for information about an attached file system (local or remote), 
  2530. or about a character device or pseudocharacter device attached to the file 
  2531. system. 
  2532.  
  2533. Type
  2534.   FSQBUFFER2 = Record
  2535.     iType:        SmallWord;
  2536.     cbName:       SmallWord;
  2537.     cbFSDName:    SmallWord;
  2538.     cbFSAData:    SmallWord;
  2539.     szName:    array [0..0] of Char;
  2540.     szFSDName: array [0..0] of Char;
  2541.     rgFSAData: array [0..0] of Byte;
  2542.   End;
  2543.  
  2544. Type
  2545.   PFSQBUFFER2 = ^FSQBUFFER2;            { FSQBUF DATA STRUCTURE FOR QFSATTACH}
  2546.  
  2547.  
  2548. ΓòÉΓòÉΓòÉ <hidden> FSQBUFFER2 Field - iType ΓòÉΓòÉΓòÉ
  2549.  
  2550.  iType (USHORT) 
  2551.     Type of item. 
  2552.  
  2553.     Possible values are described in the following list: 
  2554.  
  2555.     1        FSAT_CHARDEV 
  2556.              Resident character device 
  2557.  
  2558.     2        FSAT_PSEUDODEV 
  2559.              Pseudocharacter device 
  2560.  
  2561.     3        FSAT_LOCALDRV 
  2562.              Local drive 
  2563.  
  2564.     4        FSAT_REMOTEDRV 
  2565.              Remote drive attached to the file-system driver. 
  2566.  
  2567.  
  2568. ΓòÉΓòÉΓòÉ <hidden> FSQBUFFER2 Field - cbName ΓòÉΓòÉΓòÉ
  2569.  
  2570.  cbName (USHORT) 
  2571.     Length, in bytes, of the item name, not including null. 
  2572.  
  2573.  
  2574. ΓòÉΓòÉΓòÉ <hidden> FSQBUFFER2 Field - cbFSDName ΓòÉΓòÉΓòÉ
  2575.  
  2576.  cbFSDName (USHORT) 
  2577.     Length, in bytes, of the file-system driver name, not including null. 
  2578.  
  2579.  
  2580. ΓòÉΓòÉΓòÉ <hidden> FSQBUFFER2 Field - cbFSAData ΓòÉΓòÉΓòÉ
  2581.  
  2582.  cbFSAData (USHORT) 
  2583.     Length, in bytes, of the file-system driver Attach data returned by the 
  2584.     file-system driver. 
  2585.  
  2586.  
  2587. ΓòÉΓòÉΓòÉ <hidden> FSQBUFFER2 Field - szName[1] ΓòÉΓòÉΓòÉ
  2588.  
  2589.  szName[1] (UCHAR) 
  2590.     Item name. 
  2591.  
  2592.     The name is an ASCIIZ string. 
  2593.  
  2594.  
  2595. ΓòÉΓòÉΓòÉ <hidden> FSQBUFFER2 Field - szFSDName[1] ΓòÉΓòÉΓòÉ
  2596.  
  2597.  szFSDName[1] (UCHAR) 
  2598.     Name of the file-system driver that the item is attached to. 
  2599.  
  2600.     The name is an ASCIIZ string. 
  2601.  
  2602.  
  2603. ΓòÉΓòÉΓòÉ <hidden> FSQBUFFER2 Field - rgFSAData[1] ΓòÉΓòÉΓòÉ
  2604.  
  2605.  rgFSAData[1] (UCHAR) 
  2606.     File-system driver Attach data returned by the file-system driver. 
  2607.  
  2608.  
  2609. ΓòÉΓòÉΓòÉ 1.40. FTIME ΓòÉΓòÉΓòÉ
  2610.  
  2611. Time data structure for file-system functions. 
  2612.  
  2613. Type
  2614.   FTIME = Record
  2615.  
  2616.     const
  2617.     mftTwoSecs                    = $001F;
  2618.     sftTwoSecs                    = 0;
  2619.     mftMinutes                    = $07E0;
  2620.     sftMinutes                    = 5;
  2621.     mftHours                      = $F800;
  2622.     sftHours                      = 11;
  2623.  
  2624.     (*    typedef struct _FDATE
  2625.     {
  2626.     UINT   day     : 5;
  2627.     UINT   month   : 4;
  2628.     UINT   year    : 7;
  2629.     } FDATE;
  2630.     *)
  2631.  
  2632.     type
  2633.     PFDate = ^FDate;
  2634.     FDate = SmallWord;
  2635.  
  2636.     const
  2637.     mfdDay                        = $001F;
  2638.     sfdDay                        = 0;
  2639.     mfdMonth                      = $01E0;
  2640.     sfdMonth                      = 5;
  2641.     mfdYear                       = $FE00;
  2642.     sfdYear                       = 9;
  2643.  
  2644.     type
  2645.     PVolumeLabel = ^VolumeLabel;
  2646.     VolumeLabel = String[12];
  2647.  
  2648.     PFsInfo = ^FsInfo;
  2649.     FsInfo = record
  2650.     fdateCreation:  FDate;
  2651.     ftimeCreation:  FTime;
  2652.     vol:            VolumeLabel;
  2653.   End;
  2654.  
  2655. Type
  2656.   PFTIME = ^FTIME;
  2657.  
  2658.  
  2659. ΓòÉΓòÉΓòÉ <hidden> FTIME Field - twosecs:5 ΓòÉΓòÉΓòÉ
  2660.  
  2661.  twosecs:5 (USHORT) 
  2662.     Binary number of two-second increments. 
  2663.  
  2664.  
  2665. ΓòÉΓòÉΓòÉ <hidden> FTIME Field - minutes:6 ΓòÉΓòÉΓòÉ
  2666.  
  2667.  minutes:6 (USHORT) 
  2668.     Binary number of minutes. 
  2669.  
  2670.  
  2671. ΓòÉΓòÉΓòÉ <hidden> FTIME Field - hours:5 ΓòÉΓòÉΓòÉ
  2672.  
  2673.  hours:5 (USHORT) 
  2674.     Binary number of hours. 
  2675.  
  2676.  
  2677. ΓòÉΓòÉΓòÉ 1.41. GEA2 ΓòÉΓòÉΓòÉ
  2678.  
  2679. Level 3 (32-bit) (FIL_QUERYEASFROMLIST) file information - get extended 
  2680. attributes. 
  2681.  
  2682. Type
  2683.   GEA2 = Record
  2684.     oNextEntryOffset: ULong;      { new field }
  2685.     cbName:           Byte;
  2686.     szName: array [0..0] of Char;
  2687.   End;
  2688.  
  2689. Type
  2690.   PGEA2 = ^GEA2;
  2691.  
  2692.  
  2693. ΓòÉΓòÉΓòÉ <hidden> GEA2 Field - oNextEntryOffset ΓòÉΓòÉΓòÉ
  2694.  
  2695.  oNextEntryOffset (ULONG) 
  2696.     Offset to next entry. 
  2697.  
  2698.  
  2699. ΓòÉΓòÉΓòÉ <hidden> GEA2 Field - cbName ΓòÉΓòÉΓòÉ
  2700.  
  2701.  cbName (BYTE) 
  2702.     Name length not including nil. 
  2703.  
  2704.  
  2705. ΓòÉΓòÉΓòÉ <hidden> GEA2 Field - szName[1] ΓòÉΓòÉΓòÉ
  2706.  
  2707.  szName[1] (CHAR) 
  2708.     Attribute name. 
  2709.  
  2710.  
  2711. ΓòÉΓòÉΓòÉ 1.42. GEA2LIST ΓòÉΓòÉΓòÉ
  2712.  
  2713. Get extended attributes list. 
  2714.  
  2715. Type
  2716.   GEA2LIST = Record
  2717.     cbList: ULong;
  2718.     list: array[0..0] of Gea2;
  2719.   End;
  2720.  
  2721. Type
  2722.   PGEA2LIST = ^GEA2LIST;
  2723.  
  2724.  
  2725. ΓòÉΓòÉΓòÉ <hidden> GEA2LIST Field - cbList ΓòÉΓòÉΓòÉ
  2726.  
  2727.  cbList (ULONG) 
  2728.     Total bytes of structure including full list. 
  2729.  
  2730.  
  2731. ΓòÉΓòÉΓòÉ <hidden> GEA2LIST Field - list[1] ΓòÉΓòÉΓòÉ
  2732.  
  2733.  list[1] (GEA2) 
  2734.     Variable-length GEA2 structures. 
  2735.  
  2736.  
  2737. ΓòÉΓòÉΓòÉ 1.43. HDC ΓòÉΓòÉΓòÉ
  2738.  
  2739. Device-context handle. 
  2740.  
  2741. Type
  2742.   HDC = LHANDLE;
  2743.  
  2744.  
  2745. ΓòÉΓòÉΓòÉ 1.44. HDIR ΓòÉΓòÉΓòÉ
  2746.  
  2747. Value (32-bit) used as a directory handle. 
  2748.  
  2749. Type
  2750.   HDIR = LHANDLE;
  2751.  
  2752.  
  2753. ΓòÉΓòÉΓòÉ 1.45. HEV ΓòÉΓòÉΓòÉ
  2754.  
  2755. Value (32-bit) used as an event semaphore handle. 
  2756.  
  2757. Type
  2758.   HEV    = ULONG;
  2759.  
  2760.  
  2761. ΓòÉΓòÉΓòÉ 1.46. HFILE ΓòÉΓòÉΓòÉ
  2762.  
  2763. File handle. 
  2764.  
  2765. Type
  2766.   HFILE    = SHANDLE;
  2767.  
  2768.  
  2769. ΓòÉΓòÉΓòÉ 1.47. HKBD ΓòÉΓòÉΓòÉ
  2770.  
  2771. Keyboard handle. 
  2772.  
  2773. Type
  2774.   HKBD = BYTE;
  2775.  
  2776.  
  2777. ΓòÉΓòÉΓòÉ 1.48. HMODULE ΓòÉΓòÉΓòÉ
  2778.  
  2779. Module handle. 
  2780.  
  2781. Type
  2782.   HMODULE = LHANDLE;
  2783.  
  2784.  
  2785. ΓòÉΓòÉΓòÉ 1.49. HMTX ΓòÉΓòÉΓòÉ
  2786.  
  2787. Value (32-bit) used as a mutex semaphore handle. 
  2788.  
  2789. Type
  2790.   HMTX  = ULONG;
  2791.  
  2792.  
  2793. ΓòÉΓòÉΓòÉ 1.50. HMUX ΓòÉΓòÉΓòÉ
  2794.  
  2795. Value (32-bit) used as a muxwait semaphore handle. 
  2796.  
  2797. Type
  2798.   HMUX  = ULONG;
  2799.  
  2800.  
  2801. ΓòÉΓòÉΓòÉ 1.51. HOTKEY ΓòÉΓòÉΓòÉ
  2802.  
  2803. Session Manager Hot Key data structure. 
  2804.  
  2805. Type
  2806.   HOTKEY = Record
  2807.     fsHotKey:         SmallWord;
  2808.     uchScancodeMake:  Byte;
  2809.     uchScancodeBreak: Byte;
  2810.     idHotKey:         SmallWord;
  2811.   End;
  2812.  
  2813. Type
  2814.   PHOTKEY = ^HOTKEY;
  2815.  
  2816.  
  2817. ΓòÉΓòÉΓòÉ <hidden> HOTKEY Field - fsHotKey ΓòÉΓòÉΓòÉ
  2818.  
  2819.  fsHotKey (USHORT) 
  2820.     State Key Flag. 
  2821.  
  2822.     Has the following settings: 
  2823.  
  2824.     High Byte        Bit settings are as follows: 
  2825.  
  2826.                      Bit 15       Reserved = 0 
  2827.                      Bit 14       Reserved = 0 
  2828.                      Bit 13       Reserved = 0 
  2829.                      Bit 12       Reserved = 0 
  2830.                      Bit 11       Right Alt key down 
  2831.                      Bit 10       Right Ctrl key down 
  2832.                      Bit  9       Left Alt key down 
  2833.                      Bit  8       Left Ctrl key down 
  2834.  
  2835.     Low Byte         Bit settings are as follows: 
  2836.  
  2837.                      Bit 7        Reserved = 0 
  2838.                      Bit 6        Reserved = 0 
  2839.                      Bit 5        Reserved = 0 
  2840.                      Bit 4        Reserved = 0 
  2841.                      Bit 3        Reserved = 0 
  2842.                      Bit 2        Reserved = 0 
  2843.                      Bit 1        Left Shift key down 
  2844.                      Bit 0        Right Shift key down 
  2845.  
  2846.  
  2847. ΓòÉΓòÉΓòÉ <hidden> HOTKEY Field - uchScancodeMake ΓòÉΓòÉΓòÉ
  2848.  
  2849.  uchScancodeMake (UCHAR) 
  2850.     The Scan Code of the hot key, Make. 
  2851.  
  2852.  
  2853. ΓòÉΓòÉΓòÉ <hidden> HOTKEY Field - uchScancodeBreak ΓòÉΓòÉΓòÉ
  2854.  
  2855.  uchScancodeBreak (UCHAR) 
  2856.     The Scan Code of the hot key, Break. 
  2857.  
  2858.  
  2859. ΓòÉΓòÉΓòÉ <hidden> HOTKEY Field - idHotKey ΓòÉΓòÉΓòÉ
  2860.  
  2861.  idHotKey (USHORT) 
  2862.     Hot Key Id. 
  2863.  
  2864.     The Hot Key Id value is set by the caller. Notice that ID value FFFFh is 
  2865.     reserved and must not be used as a Hot Key ID. See Remarks in 
  2866.     KBD_SETSESMGRHOTKEY. 
  2867.  
  2868.     A maximum of two of the above bit selections can be selected for a given 
  2869.     hot key definition. If more than two bits are selected or if a reserved bit 
  2870.     is selected, the result is an INVALID_PARAMETER error code returned to the 
  2871.     caller. 
  2872.  
  2873.  
  2874. ΓòÉΓòÉΓòÉ 1.52. HPIPE ΓòÉΓòÉΓòÉ
  2875.  
  2876. Value (32-bit) used as a pipe handle. 
  2877.  
  2878. Type
  2879.   HPIPE  = LHANDLE;
  2880.  
  2881.  
  2882. ΓòÉΓòÉΓòÉ 1.53. HQUEUE ΓòÉΓòÉΓòÉ
  2883.  
  2884. Value (32-bit) used as a system queue handle. 
  2885.  
  2886. Type
  2887.   HQUEUE  = LHANDLE;
  2888.  
  2889.  
  2890. ΓòÉΓòÉΓòÉ 1.54. HRGN ΓòÉΓòÉΓòÉ
  2891.  
  2892. Region handle. 
  2893.  
  2894. Type
  2895.   HRGN = LHANDLE;
  2896.  
  2897.  
  2898. ΓòÉΓòÉΓòÉ 1.55. HSEM ΓòÉΓòÉΓòÉ
  2899.  
  2900. Semaphore handle. 
  2901.  
  2902. Type
  2903.   HSEM = POINTER;
  2904.  
  2905.  
  2906. ΓòÉΓòÉΓòÉ 1.56. HSPINLOCK ΓòÉΓòÉΓòÉ
  2907.  
  2908. A value (32-bit) used as a handle to a spin lock. 
  2909.  
  2910.  
  2911. ΓòÉΓòÉΓòÉ 1.57. HTIMER ΓòÉΓòÉΓòÉ
  2912.  
  2913. Value (32-bit) used as a timer handle. 
  2914.  
  2915. Type
  2916.   HTIMER = LHANDLE;
  2917.  
  2918.  
  2919. ΓòÉΓòÉΓòÉ 1.58. HVDD ΓòÉΓòÉΓòÉ
  2920.  
  2921. 32-bit value used as a virtual device driver handle. 
  2922.  
  2923. Type
  2924.   HVDD = LHANDLE;
  2925.  
  2926.  
  2927. ΓòÉΓòÉΓòÉ 1.59. KBDKEYINFO ΓòÉΓòÉΓòÉ
  2928.  
  2929. The Character data structure of the API function KbdCharIn. 
  2930.  
  2931. Type
  2932.   KBDKEYINFO = Record
  2933.     chChar:     Char;           { ASCII char (0 or $E0 = extended ASCII)    }
  2934.     chScan:     Byte;           { Scan code (or extended ASCII char)        }
  2935.     fbStatus:   Byte;           { Miscellaneous status; key recieved flag   }
  2936.     bNlsShift:  Byte;           { NLS Shift Status                          }
  2937.     fsState:    SmallWord;      { State of shift keys                       }
  2938.     time:       ULong;          { TimeStamp (unique number of milliseconds) }
  2939.   End;
  2940.  
  2941.  
  2942. Type
  2943.   PKBDKEYINFO = ^KBDKEYINFO;
  2944.  
  2945.  
  2946. ΓòÉΓòÉΓòÉ <hidden> KBDKEYINFO Field - chChar ΓòÉΓòÉΓòÉ
  2947.  
  2948.  chChar (UCHAR) 
  2949.     ASCII Character code. 
  2950.  
  2951.     The scan code received from the keyboard is translated to the ASCII 
  2952.     character code. 
  2953.  
  2954.  
  2955. ΓòÉΓòÉΓòÉ <hidden> KBDKEYINFO Field - chScan ΓòÉΓòÉΓòÉ
  2956.  
  2957.  chScan (UCHAR) 
  2958.     Code received for the keyboard. 
  2959.  
  2960.     Scan code received from the keyboard is translated to the ASCII character 
  2961.     code. 
  2962.  
  2963.  
  2964. ΓòÉΓòÉΓòÉ <hidden> KBDKEYINFO Field - fbStatus ΓòÉΓòÉΓòÉ
  2965.  
  2966.  fbStatus (UCHAR) 
  2967.     State of the keystroke event flag. 
  2968.  
  2969.     Bits 7-6        Has the following values: 
  2970.  
  2971.                     00        Undefined. 
  2972.                     01        Final character; interim character flag is turned 
  2973.                               off. 
  2974.                     10        Interim character. 
  2975.                     11        Final character; interim character flag is turned 
  2976.                               on. 
  2977.  
  2978.     Bit  5          If set to 1, immediate conversion requested. 
  2979.  
  2980.     Bits 4-2        Reserved. 
  2981.  
  2982.     Bit  1          Has the following values: 
  2983.  
  2984.                     0        Scan code is a character 
  2985.                     1        Scan code is not a character; instead it is an 
  2986.                              extended key code from the keyboard. 
  2987.  
  2988.     Bit 0           If set to 1, shift status returned without a character. 
  2989.  
  2990.  
  2991. ΓòÉΓòÉΓòÉ <hidden> KBDKEYINFO Field - bNlsShift ΓòÉΓòÉΓòÉ
  2992.  
  2993.  bNlsShift (UCHAR) 
  2994.     NLS shift status. Reserved, must be 0. 
  2995.  
  2996.  
  2997. ΓòÉΓòÉΓòÉ <hidden> KBDKEYINFO Field - fsState ΓòÉΓòÉΓòÉ
  2998.  
  2999.  fsState (USHORT) 
  3000.     Shift key status flag. 
  3001.  
  3002.     Values are: 
  3003.  
  3004.     Bit 15        SysReq key down 
  3005.     Bit 14        Caps Lock key down 
  3006.     Bit 13        NumLock key down 
  3007.     Bit 12        Scroll Lock key down 
  3008.     Bit 11        Right Alt key down 
  3009.     Bit 10        Right Ctrl key down 
  3010.     Bit  9        Left Alt key down 
  3011.     Bit  8        Left Ctrl key down 
  3012.     Bit  7        Insert on 
  3013.     Bit  6        Caps Lock on 
  3014.     Bit  5        NumLock on. 
  3015.     Bit  4        Scroll Lock on 
  3016.     Bit  3        Either Alt key down 
  3017.     Bit  2        Either Ctrl key down 
  3018.     Bit  1        Left Shift key down 
  3019.     Bit  0        Right Shift key down 
  3020.  
  3021.  
  3022. ΓòÉΓòÉΓòÉ <hidden> KBDKEYINFO Field - time ΓòÉΓòÉΓòÉ
  3023.  
  3024.  time (ULONG) 
  3025.     Time stamp in milliseconds. 
  3026.  
  3027.     Time stamp indicating when a key was pressed. It is specified in 
  3028.     milliseconds from the time the system was started. 
  3029.  
  3030.  
  3031. ΓòÉΓòÉΓòÉ 1.60. LDTADDRINFO ΓòÉΓòÉΓòÉ
  3032.  
  3033. LDT Address Information data structure. 
  3034.  
  3035. Type
  3036.   LDTADDRINFO = Record
  3037.     pulPhysAddr: PULong;
  3038.     cb:          SmallWord;
  3039.   End;
  3040.  
  3041. Type
  3042.   PLDTADDRINFO = ^LDTADDRINFO;
  3043.  
  3044.  
  3045. ΓòÉΓòÉΓòÉ <hidden> LDTADDRINFO Field - pulPhysAddr ΓòÉΓòÉΓòÉ
  3046.  
  3047.  pulPhysAddr (PULONG) 
  3048.     Physical address. 
  3049.  
  3050.  
  3051. ΓòÉΓòÉΓòÉ <hidden> LDTADDRINFO Field - cb ΓòÉΓòÉΓòÉ
  3052.  
  3053.  cb (USHORT) 
  3054.     Length. 
  3055.  
  3056.  
  3057. ΓòÉΓòÉΓòÉ 1.61. LINECONTROL ΓòÉΓòÉΓòÉ
  3058.  
  3059. Line characteristics. 
  3060.  
  3061. Type
  3062.   LINECONTROL = Record
  3063.     bDataBits:   Byte;
  3064.     bParity:     Byte;
  3065.     bStopBits:   Byte;
  3066.     fTransBreak: Byte;
  3067.   End;
  3068.  
  3069. Type
  3070.   PLINECONTROL = ^LINECONTROL;
  3071.  
  3072.  
  3073. ΓòÉΓòÉΓòÉ <hidden> LINECONTROL Field - bDataBits ΓòÉΓòÉΓòÉ
  3074.  
  3075.  bDataBits (BYTE) 
  3076.     Data bits flag. 
  3077.  
  3078.     0x00-0x04 
  3079.             Reserved 
  3080.     0x05 
  3081.             5 data bits 
  3082.     0x06 
  3083.             6 data bits 
  3084.     0x07 
  3085.             7 data bits (initial value) 
  3086.     0x08 
  3087.             8 data bits 
  3088.     0x09-0xFF 
  3089.             Reserved 
  3090.  
  3091.  
  3092. ΓòÉΓòÉΓòÉ <hidden> LINECONTROL Field - bParity ΓòÉΓòÉΓòÉ
  3093.  
  3094.  bParity (BYTE) 
  3095.     Parity flag. 
  3096.  
  3097.     0x00 
  3098.             No parity 
  3099.     0x01 
  3100.             Odd parity 
  3101.     0x02 
  3102.             Even parity (initial value) 
  3103.     0x03 
  3104.             Mark parity (parity bit always 1) 
  3105.     0x04 
  3106.             Space parity (parity bit always 0) 
  3107.     0x05-0xFF 
  3108.             Reserved 
  3109.  
  3110.  
  3111. ΓòÉΓòÉΓòÉ <hidden> LINECONTROL Field - bStopBits ΓòÉΓòÉΓòÉ
  3112.  
  3113.  bStopBits (BYTE) 
  3114.     Stop bit flag. 
  3115.  
  3116.     0x00 
  3117.             1 stop bit (initial value) 
  3118.     0x01 
  3119.             1.5 stop bits (valid with 5-bit WORD length only) 
  3120.     0x02 
  3121.             2 stop bits (not valid with 5-bit WORD length) 
  3122.     0x03-0xFF 
  3123.             Reserved 
  3124.  
  3125.  
  3126. ΓòÉΓòÉΓòÉ <hidden> LINECONTROL Field - fTransBreak ΓòÉΓòÉΓòÉ
  3127.  
  3128.  fTransBreak (BYTE) 
  3129.     Transmitting break flag. 
  3130.  
  3131.     0 
  3132.             Not currently transmitting break. 
  3133.     1 
  3134.             Currently transmitting break. 
  3135.  
  3136.  
  3137. ΓòÉΓòÉΓòÉ 1.62. LONG ΓòÉΓòÉΓòÉ
  3138.  
  3139. Signed integer in the range -2 147 483 648 through 2 147 483 647. 
  3140.  
  3141. Note:  Where this data type represents a graphic coordinate in world or model 
  3142.        space, its value is restricted to -134 217 728 through 134 217 727. 
  3143.  
  3144. A graphic coordinate in device or screen coordinates is restricted to -32 768 
  3145. through 32 767. 
  3146.  
  3147. The value of a graphic coordinate may be further restricted by any transforms 
  3148. currently in force, including the positioning of the origin of the window on 
  3149. the screen. In particular, coordinates in world or model space must not 
  3150. generate coordinate values after transformation (that is, in device or screen 
  3151. space) outside the range -32 768 through 32 767. 
  3152.  
  3153.  
  3154. ΓòÉΓòÉΓòÉ 1.63. MODEMSTATUS ΓòÉΓòÉΓòÉ
  3155.  
  3156. Modem Control data structure. 
  3157.  
  3158. Type
  3159.   MODEMSTATUS = Record
  3160.     fbModemOn:  Byte;
  3161.     fbModemOff: Byte;
  3162.   End;
  3163.  
  3164. Type
  3165.   PMODEMSTATUS = ^MODEMSTATUS;
  3166.  
  3167.  
  3168. ΓòÉΓòÉΓòÉ <hidden> MODEMSTATUS Field - fbModemOn ΓòÉΓòÉΓòÉ
  3169.  
  3170.  fbModemOn (BYTE) 
  3171.     Modem Control Signals ON Mask. 
  3172.  
  3173.     The physical device driver sets the modem control signals as defined in 
  3174.     this field.  Bit 0 is DTR; bit 1 is RTS.  If any other bits are set/reset 
  3175.     by the masks, then a general failure error results.  The OFF mask contains 
  3176.     a mask (with all bits equal to 0) to turn the modem control signal off. The 
  3177.     ON mask contains a mask (with all bits equal to 1) to turn the modem 
  3178.     control signal on.  If the Parameter Packet indicates both turn off and 
  3179.     turn on on the same bit, the bit will be turned on. 
  3180.  
  3181.     For example: 
  3182.  
  3183.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3184.         ΓöéMask ON  ΓöéMask OFF ΓöéDescription    Γöé
  3185.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3186.         Γöé   01h   Γöé   FFh   ΓöéSet DTR        Γöé
  3187.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3188.         Γöé   00h   Γöé   FEh   ΓöéClear DTR      Γöé
  3189.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3190.         Γöé   02h   Γöé   FFh   ΓöéSet RTS        Γöé
  3191.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3192.         Γöé   00h   Γöé   FDh   ΓöéClear RTS      Γöé
  3193.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3194.         Γöé   03h   Γöé   FFh   ΓöéSet DTR and RTSΓöé
  3195.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3196.         Γöé   00h   Γöé   FCh   ΓöéClear DTR and  Γöé
  3197.         Γöé         Γöé         ΓöéRTS            Γöé
  3198.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3199.  
  3200.     If DTR Control mode input handshaking, RTS Control mode input handshaking 
  3201.     or toggling on transmit is set, then this request cannot try to change the 
  3202.     state of the modem control signals, that are being used for input 
  3203.     handshaking or toggling on transmit. If the request tries to modify a modem 
  3204.     control signal that is being used for input handshaking or toggling on 
  3205.     transmit, a general failure error results. 
  3206.  
  3207.  
  3208. ΓòÉΓòÉΓòÉ <hidden> MODEMSTATUS Field - fbModemOff ΓòÉΓòÉΓòÉ
  3209.  
  3210.  fbModemOff (BYTE) 
  3211.     Modem Control Signals OFF Mask. 
  3212.  
  3213.     See Modem Control Signals ON Mask above. 
  3214.  
  3215.  
  3216. ΓòÉΓòÉΓòÉ 1.64. MONITORPOSITION ΓòÉΓòÉΓòÉ
  3217.  
  3218. Monitor Position data structure. 
  3219.  
  3220. Type
  3221.   MONITORPOSITION = Record
  3222.     fPosition: SmallWord;
  3223.     index:     SmallWord;
  3224.     pbInBuf:   ULong;
  3225.     offOutBuf: SmallWord;
  3226.   End;
  3227.  
  3228. Type
  3229.   PMONITORPOSITION = ^MONITORPOSITION;
  3230.  
  3231.  
  3232. ΓòÉΓòÉΓòÉ <hidden> MONITORPOSITION Field - fPosition ΓòÉΓòÉΓòÉ
  3233.  
  3234.  fPosition (USHORT) 
  3235.     Placement flag. 
  3236.  
  3237.     The DosMonReg function call parameter that is used by an application to 
  3238.     indicate: 
  3239.  
  3240.         Where its monitor buffers are to be placed within a monitor chain 
  3241.          relative to monitors already registered on the monitor chain 
  3242.         What special processing requirements need to be supported by the 
  3243.          monitor dispatcher. 
  3244.  
  3245.     Refer to the DosMonReg function description in the OS/2 Control Program 
  3246.     Programming Reference for valid parameter values. 
  3247.  
  3248.  
  3249. ΓòÉΓòÉΓòÉ <hidden> MONITORPOSITION Field - index ΓòÉΓòÉΓòÉ
  3250.  
  3251.  index (USHORT) 
  3252.     Index. 
  3253.  
  3254.     Used by an application to indicate on which monitor chain its monitor 
  3255.     buffers are being registered. The accepted values for this parameter vary 
  3256.     for each device driver. See information on the physical mouse device 
  3257.     driver, the physical keyboard device driver and the physical parallel port 
  3258.     device driver in the OS/2 Input/Output Device Driver Reference to determine 
  3259.     the valid parameter value for each device driver. 
  3260.  
  3261.     Refer to the descriptions of the DosMonReg, DosMonRead, and DosMonWrite 
  3262.     functions in the OS/2 Control Program Programming Reference for more 
  3263.     information. 
  3264.  
  3265.  
  3266. ΓòÉΓòÉΓòÉ <hidden> MONITORPOSITION Field - pbInBuf ΓòÉΓòÉΓòÉ
  3267.  
  3268.  pbInBuf (ULONG) 
  3269.     Address of the Input Buffer. 
  3270.  
  3271.     Specifies the address of a monitor input buffer allocated by an 
  3272.     application, initialized by the monitor dispatcher, and used by the 
  3273.     DosMonRead function. 
  3274.  
  3275.  
  3276. ΓòÉΓòÉΓòÉ <hidden> MONITORPOSITION Field - offOutBuf ΓòÉΓòÉΓòÉ
  3277.  
  3278.  offOutBuf (USHORT) 
  3279.     Offset of the Output Buffer. 
  3280.  
  3281.     Specifies the offset of a monitor output buffer allocated by an application 
  3282.     in the same data segment as the input buffer, initialized by the monitor 
  3283.     dispatcher, and used by the DosMonWrite function. 
  3284.  
  3285.  
  3286. ΓòÉΓòÉΓòÉ 1.65. NPCH ΓòÉΓòÉΓòÉ
  3287.  
  3288. Pointer (32-bit) to a value or array of values. 
  3289.  
  3290. Not defined
  3291.  
  3292.  
  3293. ΓòÉΓòÉΓòÉ 1.66. NPCHAR ΓòÉΓòÉΓòÉ
  3294.  
  3295. Near pointer to a character. 
  3296.  
  3297. Not defined
  3298.  
  3299.  
  3300. ΓòÉΓòÉΓòÉ 1.67. NPFN ΓòÉΓòÉΓòÉ
  3301.  
  3302. Pointer to a procedure. 
  3303.  
  3304. Not defined.
  3305.  
  3306. In the header file, this is a two-part definition as shown below: 
  3307.  
  3308. Not defined.
  3309.  
  3310. Not defined.
  3311.  
  3312.  
  3313. ΓòÉΓòÉΓòÉ 1.68. NPSZ ΓòÉΓòÉΓòÉ
  3314.  
  3315. Pointer (32-bit) to a null-terminated string. 
  3316.  
  3317. Not defined.
  3318.  
  3319.  
  3320. ΓòÉΓòÉΓòÉ 1.69. OEMINFO ΓòÉΓòÉΓòÉ
  3321.  
  3322. OEM information data structure. 
  3323.  
  3324. Type
  3325.   OEMINFO = Record
  3326.     OEMLength:        ULong;
  3327.     Manufacturer:     SmallWord;
  3328.     ManufacturerData: ULong;
  3329.   End;
  3330.  
  3331.  
  3332. ΓòÉΓòÉΓòÉ <hidden> OEMINFO Field - OEMLength ΓòÉΓòÉΓòÉ
  3333.  
  3334.  OEMLength (ULONG) 
  3335.     Length 
  3336.  
  3337.     Represents the combined length of all parameter packet fields. This is a 
  3338.     required field for all calls, including those made by way of the 32-bit 
  3339.     DosDevIOCtl, with a minimum packet length of 10 bytes. 
  3340.  
  3341.  
  3342. ΓòÉΓòÉΓòÉ <hidden> OEMINFO Field - Manufacturer ΓòÉΓòÉΓòÉ
  3343.  
  3344.  Manufacturer (USHORT) 
  3345.     Manufacturer Specific Data 
  3346.  
  3347.     Identifies the name of the manufacturer. 
  3348.  
  3349.  
  3350. ΓòÉΓòÉΓòÉ <hidden> OEMINFO Field - ManufacturerData ΓòÉΓòÉΓòÉ
  3351.  
  3352.  ManufacturerData (ULONG) 
  3353.     Manufacturer specific data 
  3354.  
  3355.     Manufacturer-specific data is in a format designated by the manufacturer. 
  3356.  
  3357.  
  3358. ΓòÉΓòÉΓòÉ 1.70. OEMSVGAINFO ΓòÉΓòÉΓòÉ
  3359.  
  3360. OEM graphic adapter information data structure. 
  3361.  
  3362. Type
  3363.   OEMSVGAINFO = Record
  3364.     AdapterType: SmallWord;
  3365.     ChipType:    SmallWord;
  3366.     Memory:      ULong;
  3367.   End;
  3368.  
  3369.  
  3370. ΓòÉΓòÉΓòÉ <hidden> OEMSVGAINFO Field - AdapterType ΓòÉΓòÉΓòÉ
  3371.  
  3372.  AdapterType (USHORT) 
  3373.     Adapter type. 
  3374.  
  3375.     Value of the chip set manufacturer. 
  3376.  
  3377.  
  3378. ΓòÉΓòÉΓòÉ <hidden> OEMSVGAINFO Field - ChipType ΓòÉΓòÉΓòÉ
  3379.  
  3380.  ChipType (USHORT) 
  3381.     Chip Type. 
  3382.  
  3383.     Chip type value according to the specific manufacturer. 
  3384.  
  3385.  
  3386. ΓòÉΓòÉΓòÉ <hidden> OEMSVGAINFO Field - Memory ΓòÉΓòÉΓòÉ
  3387.  
  3388.  Memory (ULONG) 
  3389.     Video memory. 
  3390.  
  3391.     Memory size of the video adapter detected. 
  3392.  
  3393.  
  3394. ΓòÉΓòÉΓòÉ 1.71. PCH ΓòÉΓòÉΓòÉ
  3395.  
  3396. Pointer to a character string. 
  3397.  
  3398. Not defined.
  3399.  
  3400.  
  3401. ΓòÉΓòÉΓòÉ 1.72. PCSZ ΓòÉΓòÉΓòÉ
  3402.  
  3403. Pointer to a constant null-terminated string. 
  3404.  
  3405. Not defined.
  3406.  
  3407.  
  3408. ΓòÉΓòÉΓòÉ 1.73. PFHLOCK ΓòÉΓòÉΓòÉ
  3409.  
  3410. Pointer to an unsigned integer in the range 0 through 4 294 967 295. 
  3411.  
  3412. Not defined
  3413.  
  3414.  
  3415. ΓòÉΓòÉΓòÉ 1.74. PFN ΓòÉΓòÉΓòÉ
  3416.  
  3417. Pointer to a procedure. 
  3418.  
  3419. Type
  3420.   PFN     = POINTER;
  3421.  
  3422. In the header file, this is a two-part definition as shown below: 
  3423.  
  3424. Not defined
  3425. Not defined
  3426.  
  3427.  
  3428. ΓòÉΓòÉΓòÉ 1.75. PFNEXITLIST ΓòÉΓòÉΓòÉ
  3429.  
  3430. Address of a routine to be executed. 
  3431.  
  3432. Not defined
  3433.  
  3434. In the header files, the FNEXITLIST structure is defined as shown below: 
  3435.  
  3436.  
  3437. Not defined
  3438.  
  3439.  
  3440. ΓòÉΓòÉΓòÉ 1.76. PFNSIGHANDLER ΓòÉΓòÉΓòÉ
  3441.  
  3442. Pointer (32-bit) to a function with pascal calling type. 
  3443.  
  3444. Not defined
  3445.  
  3446.  
  3447. ΓòÉΓòÉΓòÉ 1.77. PFNTHREAD ΓòÉΓòÉΓòÉ
  3448.  
  3449. Address of the code to be executed when the thread begins execution. 
  3450.  
  3451. Not defined
  3452.  
  3453. In the header files, the FNTHREAD structure is defined as shown below: 
  3454.  
  3455.  
  3456. Not defined
  3457.  
  3458.  
  3459. ΓòÉΓòÉΓòÉ 1.78. PIB ΓòÉΓòÉΓòÉ
  3460.  
  3461. Process Information Block structure. 
  3462.  
  3463. Type
  3464.   PIB = Record
  3465.     Pib_ulPid:            ULong;        { Process I.D.                        }
  3466.     Pib_ulPPid:           ULong;        { Parent process I.D.                 }
  3467.     Pib_hMte:             ULong;        { Program (.EXE) module handle        }
  3468.     Pib_pchCmd:           PChar;        { Command line pointer                }
  3469.     Pib_pchEnv:           PChar;        { Environment pointer                 }
  3470.     Pib_flStatus:         ULong;        { Process' status bits                }
  3471.     Pib_ulType:           ULong;        { Process' type code                  }
  3472.   End;
  3473.  
  3474. Type
  3475.   PPIB = ^PIB;
  3476.  
  3477. An OS/2 application that has been loaded into memory and prepared for execution 
  3478. is called a process. A process is the code, data, and other resources of an 
  3479. application, such as file handles, semaphores, pipes, queues, and so on. The 
  3480. OS/2 operating system considers every application it loads to be a process. 
  3481.  
  3482. Information about a process is kept in a read/write area of the process address 
  3483. space, called the Process Information Block (PIB). The operating system creates 
  3484. and maintains a PIB for every process in the system. 
  3485.  
  3486. An application can access the PIB of a specific process using DosGetInfoBlocks. 
  3487.  
  3488.  
  3489. ΓòÉΓòÉΓòÉ <hidden> PIB Field - pib_ulpid ΓòÉΓòÉΓòÉ
  3490.  
  3491.  pib_ulpid (ULONG) 
  3492.     Process identifier. 
  3493.  
  3494.  
  3495. ΓòÉΓòÉΓòÉ <hidden> PIB Field - pib_ulppid ΓòÉΓòÉΓòÉ
  3496.  
  3497.  pib_ulppid (ULONG) 
  3498.     Parent process identifier. 
  3499.  
  3500.  
  3501. ΓòÉΓòÉΓòÉ <hidden> PIB Field - pib_hmte ΓòÉΓòÉΓòÉ
  3502.  
  3503.  pib_hmte (ULONG) 
  3504.     Module handle of executable program. 
  3505.  
  3506.  
  3507. ΓòÉΓòÉΓòÉ <hidden> PIB Field - pib_pchcmd ΓòÉΓòÉΓòÉ
  3508.  
  3509.  pib_pchcmd (PCHAR) 
  3510.     Command line pointer. 
  3511.  
  3512.     This is the address of the ASCIIZ argument strings passed to the program. 
  3513.     This string represents command parameters. 
  3514.  
  3515.     The convention used by CMD.EXE is that the first of these strings is the 
  3516.     program name (as entered from the command prompt or found in a batch file), 
  3517.     and the second string consists of the parameters for the program. The 
  3518.     second ASCIIZ string is followed by an additional byte of zeros. A value of 
  3519.     zero for the address of pib_pchcmd means that no arguments are to be passed 
  3520.     to the program. 
  3521.  
  3522.  
  3523. ΓòÉΓòÉΓòÉ <hidden> PIB Field - pib_pchenv ΓòÉΓòÉΓòÉ
  3524.  
  3525.  pib_pchenv (PCHAR) 
  3526.     Environment pointer. 
  3527.  
  3528.     These strings represent environment variables and their current values. An 
  3529.     environment string has the following form: 
  3530.  
  3531.  
  3532.         variable=value
  3533.  
  3534.     The last ASCIIZ environment string must be followed by an additional byte 
  3535.     of zeros. 
  3536.  
  3537.  
  3538. ΓòÉΓòÉΓòÉ <hidden> PIB Field - pib_flstatus ΓòÉΓòÉΓòÉ
  3539.  
  3540.  pib_flstatus (ULONG) 
  3541.     Process' status bits. 
  3542.  
  3543.     A value of 1 in this bit flag indicates that the current process is in exit 
  3544.     list processing. 
  3545.  
  3546.  
  3547. ΓòÉΓòÉΓòÉ <hidden> PIB Field - pib_ultype ΓòÉΓòÉΓòÉ
  3548.  
  3549.  pib_ultype (ULONG) 
  3550.     Process' type code. 
  3551.  
  3552.     The following process' type codes are available: 
  3553.  
  3554.     0         Full screen protect-mode session 
  3555.     1         Requires real mode. Dos emulation. 
  3556.     2         VIO windowable protect-mode session 
  3557.     3         Presentation Manager protect-mode session 
  3558.     4         Detached protect-mode process. 
  3559.  
  3560.  
  3561. ΓòÉΓòÉΓòÉ 1.79. PID ΓòÉΓòÉΓòÉ
  3562.  
  3563. Process identity. 
  3564.  
  3565. Type
  3566.   PID     = LHANDLE;
  3567.  
  3568.  
  3569. ΓòÉΓòÉΓòÉ 1.80. PIPEINFO ΓòÉΓòÉΓòÉ
  3570.  
  3571. DosQueryNPipeInfo uses this data structure for level-1 information. 
  3572.  
  3573. Type
  3574.   PIPEINFO = Record
  3575.     cbOut:     SmallWord;          { length of outgoing I/O buffer }
  3576.     cbIn:      SmallWord;          { length of incoming I/O buffer }
  3577.     cbMaxInst: Byte;               { maximum number of instances   }
  3578.     cbCurInst: Byte;               { current number of instances   }
  3579.     cbName:    Byte;               { length of pipe name           }
  3580.     szName: array [0..0] of Char;  { start of name                 }
  3581.   End;
  3582.  
  3583. Type
  3584.   PIPEINFO = RECORD
  3585.  
  3586.  
  3587. ΓòÉΓòÉΓòÉ <hidden> PIPEINFO Field - cbOut ΓòÉΓòÉΓòÉ
  3588.  
  3589.  cbOut (USHORT) 
  3590.     Actual size of the buffer for outbound data. 
  3591.  
  3592.  
  3593. ΓòÉΓòÉΓòÉ <hidden> PIPEINFO Field - cbIn ΓòÉΓòÉΓòÉ
  3594.  
  3595.  cbIn (USHORT) 
  3596.     Actual size of the buffer for inbound data. 
  3597.  
  3598.  
  3599. ΓòÉΓòÉΓòÉ <hidden> PIPEINFO Field - cbMaxInst ΓòÉΓòÉΓòÉ
  3600.  
  3601.  cbMaxInst (BYTE) 
  3602.     Maximum number of pipe instances. 
  3603.  
  3604.  
  3605. ΓòÉΓòÉΓòÉ <hidden> PIPEINFO Field - cbCurInst ΓòÉΓòÉΓòÉ
  3606.  
  3607.  cbCurInst (BYTE) 
  3608.     Current number of pipe instances. 
  3609.  
  3610.  
  3611. ΓòÉΓòÉΓòÉ <hidden> PIPEINFO Field - cbName ΓòÉΓòÉΓòÉ
  3612.  
  3613.  cbName (BYTE) 
  3614.     Length of szName. 
  3615.  
  3616.  
  3617. ΓòÉΓòÉΓòÉ <hidden> PIPEINFO Field - szName[1] ΓòÉΓòÉΓòÉ
  3618.  
  3619.  szName[1] (CHAR) 
  3620.     Name of the pipe. 
  3621.  
  3622.     The name of the pipe (including \\ComputerName if the pipe is on a remote 
  3623.     system). 
  3624.  
  3625.  
  3626. ΓòÉΓòÉΓòÉ 1.81. PIPESEMSTATE ΓòÉΓòÉΓòÉ
  3627.  
  3628. Data structure for the status of a named pipe that is attached to a semaphore. 
  3629.  
  3630. Type
  3631.   PIPESEMSTATE = Record
  3632.     fStatus: Byte;          { type of record, 0 = EOI, 1 = read ok, }
  3633.     { 2 = write ok, 3 = pipe closed         }
  3634.     fFlag:   Byte;          { additional info, 01 = waiting thread  }
  3635.     usKey:   SmallWord;     { user's key value                      }
  3636.     usAvail: SmallWord;     { available data/space if status = 1/2  }
  3637.   End;
  3638.  
  3639. Type
  3640.   PPIPESEMSTATE = ^PIPESEMSTATE;
  3641.  
  3642.  
  3643. ΓòÉΓòÉΓòÉ <hidden> PIPESEMSTATE Field - fStatus ΓòÉΓòÉΓòÉ
  3644.  
  3645.  fStatus (BYTE) 
  3646.     A coded value that indicates the status of the named pipe. 
  3647.  
  3648.     The following codes are available: 
  3649.  
  3650.     0        NPSS_EOI 
  3651.              End of information buffer. No more information records follow, and 
  3652.              subsequent fields in this information record have no defined 
  3653.              value. 
  3654.  
  3655.     1        NPSS_RDATA 
  3656.              Read data is available. 
  3657.  
  3658.     2        NPSS_WSPACE 
  3659.              Write space is available. 
  3660.  
  3661.     3        NPSS_CLOSE 
  3662.              The pipe is closed. 
  3663.  
  3664.  
  3665. ΓòÉΓòÉΓòÉ <hidden> PIPESEMSTATE Field - fFlag ΓòÉΓòÉΓòÉ
  3666.  
  3667.  fFlag (BYTE) 
  3668.     Additional information about the state of the named pipe. 
  3669.  
  3670.     This parameter contains the following bit fields: 
  3671.  
  3672.     Bit            Description 
  3673.  
  3674.     7-1            Reserved 
  3675.  
  3676.     0              NPSS_WAIT 
  3677.                    If set, a thread is waiting at the other end of the pipe. 
  3678.  
  3679.  
  3680. ΓòÉΓòÉΓòÉ <hidden> PIPESEMSTATE Field - usKey ΓòÉΓòÉΓòÉ
  3681.  
  3682.  usKey (USHORT) 
  3683.     A key value that distinguishes events arriving on different named pipes 
  3684.     that are attached to the same semaphore. 
  3685.  
  3686.     This value is specified in the key field when DosSetNPipeSem is issued. 
  3687.  
  3688.  
  3689. ΓòÉΓòÉΓòÉ <hidden> PIPESEMSTATE Field - usAvail ΓòÉΓòÉΓòÉ
  3690.  
  3691.  usAvail (USHORT) 
  3692.     Number of bytes available in the pipe. 
  3693.  
  3694.     If fStatus has a value of 1, this field contains the number of bytes of 
  3695.     data that are available to read from the pipe. If fStatus has a value of 2, 
  3696.     this field contains the number of bytes of write space that are available 
  3697.     in the pipe. 
  3698.  
  3699.  
  3700. ΓòÉΓòÉΓòÉ 1.82. PSZ ΓòÉΓòÉΓòÉ
  3701.  
  3702. Pointer to a null-terminated string. 
  3703.  
  3704. If you are using C++ **, you may need to use PCSZ. 
  3705.  
  3706. Not defined
  3707.  
  3708.  
  3709. ΓòÉΓòÉΓòÉ 1.83. PTRDRAWDATA ΓòÉΓòÉΓòÉ
  3710.  
  3711. Pointer Draw Data structure. 
  3712.  
  3713. Type
  3714.   PTRDRAWDATA = Record
  3715.     cb:       SmallWord;
  3716.     usConfig: SmallWord;
  3717.     usFlag:   SmallWord;
  3718.   End;
  3719.  
  3720. Type
  3721.   PPTRDRAWDATA = ^PTRDRAWDATA;
  3722.  
  3723.  
  3724. ΓòÉΓòÉΓòÉ <hidden> PTRDRAWDATA Field - cb ΓòÉΓòÉΓòÉ
  3725.  
  3726.  cb (USHORT) 
  3727.     Length of the data structure. 
  3728.  
  3729.     The length of the data structure is equal to 6. 
  3730.  
  3731.  
  3732. ΓòÉΓòÉΓòÉ <hidden> PTRDRAWDATA Field - usConfig ΓòÉΓòÉΓòÉ
  3733.  
  3734.  usConfig (USHORT) 
  3735.     Display Configuration Number. 
  3736.  
  3737.     The display configuration number on which the pointer draw routine should 
  3738.     draw. 
  3739.  
  3740.  
  3741. ΓòÉΓòÉΓòÉ <hidden> PTRDRAWDATA Field - usFlag ΓòÉΓòÉΓòÉ
  3742.  
  3743.  usFlag (USHORT) 
  3744.     Caller flag. 
  3745.  
  3746.     Specifies whether this call is made for an application or the Base Video 
  3747.     Subsystem (BVS), where: 
  3748.  
  3749.     0              Application 
  3750.     1              BVS 
  3751.  
  3752.  
  3753. ΓòÉΓòÉΓòÉ 1.84. PTRDRAWFUNCTION ΓòÉΓòÉΓòÉ
  3754.  
  3755. Pointer Draw Routine access data structure. 
  3756.  
  3757. Type
  3758.   PTRDRAWFUNCTION = Record
  3759.     usReturnCode:     SmallWord;
  3760.     pfnDraw:          PFn;
  3761.     pchDataSeg:       PChar;
  3762.   End;
  3763.  
  3764. Type
  3765.   PPTRDRAWFUNCTION = ^PTRDRAWFUNCTION;
  3766.  
  3767.  
  3768. ΓòÉΓòÉΓòÉ <hidden> PTRDRAWFUNCTION Field - usReturnCode ΓòÉΓòÉΓòÉ
  3769.  
  3770.  usReturnCode (USHORT) 
  3771.     Return Code. 
  3772.  
  3773.  
  3774. ΓòÉΓòÉΓòÉ <hidden> PTRDRAWFUNCTION Field - pfnDraw ΓòÉΓòÉΓòÉ
  3775.  
  3776.  pfnDraw (PFN) 
  3777.     Pointer to Draw Routine Entry Point (Selector:offset). 
  3778.  
  3779.  
  3780. ΓòÉΓòÉΓòÉ <hidden> PTRDRAWFUNCTION Field - pchDataSeg ΓòÉΓòÉΓòÉ
  3781.  
  3782.  pchDataSeg (PCH) 
  3783.     Pointer to Draw Routine Data Segment Selector. 
  3784.  
  3785.  
  3786. ΓòÉΓòÉΓòÉ 1.85. PVOID ΓòÉΓòÉΓòÉ
  3787.  
  3788. Pointer to data type of any type. 
  3789.  
  3790. Type
  3791.   PVOID = Pointer;
  3792.  
  3793.  
  3794. ΓòÉΓòÉΓòÉ 1.86. QWORD ΓòÉΓòÉΓòÉ
  3795.  
  3796. Quad word structure. 
  3797.  
  3798. Type
  3799.   QWORD = Record
  3800.     Lo: ULong;
  3801.     Hi: ULong;
  3802.   End;
  3803.  
  3804. Type
  3805.   PQWORD = ^QWORD;
  3806.  
  3807.  
  3808. ΓòÉΓòÉΓòÉ <hidden> QWORD Field - qw_ulLo ΓòÉΓòÉΓòÉ
  3809.  
  3810.  qw_ulLo (ULONG) 
  3811.     Low word. 
  3812.  
  3813.  
  3814. ΓòÉΓòÉΓòÉ <hidden> QWORD Field - qw_ulHi ΓòÉΓòÉΓòÉ
  3815.  
  3816.  qw_ulHi (ULONG) 
  3817.     High word. 
  3818.  
  3819.  
  3820. ΓòÉΓòÉΓòÉ 1.87. RATEDELAY ΓòÉΓòÉΓòÉ
  3821.  
  3822. Typematic Rate and Delay data structure. 
  3823.  
  3824. Type
  3825.   RATEDELAY = Record
  3826.     usDelay: SmallWord;
  3827.     usRate:  SmallWord;
  3828.   End;
  3829.  
  3830. Type
  3831.   PRATEDELAY = ^RATEDELAY;
  3832.  
  3833.  
  3834. ΓòÉΓòÉΓòÉ <hidden> RATEDELAY Field - usDelay ΓòÉΓòÉΓòÉ
  3835.  
  3836.  usDelay (USHORT) 
  3837.     Typematic delay. 
  3838.  
  3839.     Specifies the typematic delay in milliseconds.  A value greater than the 
  3840.     maximum value defaults to the maximum value. 
  3841.  
  3842.  
  3843. ΓòÉΓòÉΓòÉ <hidden> RATEDELAY Field - usRate ΓòÉΓòÉΓòÉ
  3844.  
  3845.  usRate (USHORT) 
  3846.     Typematic rate. 
  3847.  
  3848.     Specifies the typematic rate in characters per second.  A value greater 
  3849.     than the maximum value defaults to the maximum value. 
  3850.  
  3851.  
  3852. ΓòÉΓòÉΓòÉ 1.88. REQUESTDATA ΓòÉΓòÉΓòÉ
  3853.  
  3854. REQUESTDATA data structure. 
  3855.  
  3856. Type
  3857.   REQUESTDATA = Record
  3858.     Pid:  Pid;
  3859.     Data: ULong;
  3860.   End;
  3861.  
  3862. Type
  3863.   PREQUESTDATA = ^REQUESTDATA;
  3864.  
  3865.  
  3866. ΓòÉΓòÉΓòÉ <hidden> REQUESTDATA Field - pid ΓòÉΓòÉΓòÉ
  3867.  
  3868.  pid (PID) 
  3869.     Process identifier of the process that placed the element into the queue. 
  3870.  
  3871.  
  3872. ΓòÉΓòÉΓòÉ <hidden> REQUESTDATA Field - ulData ΓòÉΓòÉΓòÉ
  3873.  
  3874.  ulData (ULONG) 
  3875.     An event code that is specified by the application. 
  3876.  
  3877.     This data is understood by both the thread that is adding the element to 
  3878.     the queue (the client thread) and the thread that receives the queue 
  3879.     element (server thread). It has no special meaning, and is not altered by 
  3880.     the operating system. 
  3881.  
  3882.  
  3883. ΓòÉΓòÉΓòÉ 1.89. RESULTCODES ΓòÉΓòÉΓòÉ
  3884.  
  3885. RESULTCODES data structure. 
  3886.  
  3887. Type
  3888.   RESULTCODES = Record
  3889.     codeTerminate: ULong;
  3890.     codeResult:    ULong;
  3891.   End;
  3892.  
  3893. Type
  3894.   PRESULTCODES = ^RESULTCODES;
  3895.  
  3896.  
  3897. ΓòÉΓòÉΓòÉ <hidden> RESULTCODES Field - codeTerminate ΓòÉΓòÉΓòÉ
  3898.  
  3899.  codeTerminate (ULONG) 
  3900.     Termination code or process identifier. 
  3901.  
  3902.     For asynchronous requests, this field contains the process identifier of 
  3903.     the child process. For synchronous requests, this field contains the 
  3904.     termination code furnished by the system describing why the child process 
  3905.     ended. The values of the termination code are shown in the following list: 
  3906.  
  3907.     0        TC_EXIT 
  3908.              Normal exit. 
  3909.  
  3910.     1        TC_HARDERROR 
  3911.              Hard-error halt 
  3912.  
  3913.     2        TC_TRAP 
  3914.              Trap operation for a 16-bit child process 
  3915.  
  3916.     3        TC_KILLPROCESS 
  3917.              Unintercepted DosKillProcess 
  3918.  
  3919.     4        TC_EXCEPTION 
  3920.              Exception operation for a 32-bit child process 
  3921.  
  3922.  
  3923. ΓòÉΓòÉΓòÉ <hidden> RESULTCODES Field - codeResult ΓòÉΓòÉΓòÉ
  3924.  
  3925.  codeResult (ULONG) 
  3926.     Exit code. 
  3927.  
  3928.     Result code specified by the terminating synchronous process on its last 
  3929.     call to DosExit. 
  3930.  
  3931.  
  3932. ΓòÉΓòÉΓòÉ 1.90. RXQUEUE ΓòÉΓòÉΓòÉ
  3933.  
  3934. Receive/Transmit Queue Information data structure. 
  3935.  
  3936. Type
  3937.   RXQUEUE = Record
  3938.     cch: SmallWord;
  3939.     cb:  SmallWord;
  3940.   End;
  3941.  
  3942. Type
  3943.   PRXQUEUE = ^RXQUEUE;
  3944.  
  3945.  
  3946. ΓòÉΓòÉΓòÉ <hidden> RXQUEUE Field - cch ΓòÉΓòÉΓòÉ
  3947.  
  3948.  cch (USHORT) 
  3949.     Number of characters in the queue. 
  3950.  
  3951.     Binary integer with the number of characters received/to be transmitted in 
  3952.     the physical device driver receive/transmit queue.  This is a memory buffer 
  3953.     between the memory pointed to by the READ/WRITE request packet and the 
  3954.     receive/transmit hardware for this COM device. 
  3955.  
  3956.     Note:  The behavior of data movement between the READ/WRITE request and the 
  3957.            receive/transmit queue can change with each release of the physical 
  3958.            device driver. Applications should not be dependent on this 
  3959.            information. 
  3960.  
  3961.  
  3962. ΓòÉΓòÉΓòÉ <hidden> RXQUEUE Field - cb ΓòÉΓòÉΓòÉ
  3963.  
  3964.  cb (USHORT) 
  3965.     Size of receive/transmit queue. 
  3966.  
  3967.     Binary integer with the size of the physical device driver receive/transmit 
  3968.     queue. Applications should be independent of the receive/transmit queue 
  3969.     size (fixed or not fixed).  The information in this field allows the 
  3970.     application to get the size of the receive/transmit queue, but is subject 
  3971.     to change. The current size of the receive queue is approximately 1KB. 
  3972.  
  3973.     Using this information, the application should avoid device driver receive 
  3974.     queue overruns by using an application-to-application block protocol with 
  3975.     the system communicating with the application. 
  3976.  
  3977.  
  3978. ΓòÉΓòÉΓòÉ 1.91. SEMRECORD ΓòÉΓòÉΓòÉ
  3979.  
  3980. Muxwait semaphore data structure. 
  3981.  
  3982. Type
  3983.   SEMRECORD = Record
  3984.     hsemCur: HSem;
  3985.     ulUser:  ULong;
  3986.   End;
  3987.  
  3988. Type
  3989.   PSEMRECORD = ^SEMRECORD;
  3990.  
  3991.  
  3992. ΓòÉΓòÉΓòÉ <hidden> SEMRECORD Field - hsemCur ΓòÉΓòÉΓòÉ
  3993.  
  3994.  hsemCur (HSEM) 
  3995.     Handle of the semaphore. 
  3996.  
  3997.  
  3998. ΓòÉΓòÉΓòÉ <hidden> SEMRECORD Field - ulUser ΓòÉΓòÉΓòÉ
  3999.  
  4000.  ulUser (ULONG) 
  4001.     User-defined value. 
  4002.  
  4003.  
  4004. ΓòÉΓòÉΓòÉ 1.92. SEL ΓòÉΓòÉΓòÉ
  4005.  
  4006. Selector. 
  4007.  
  4008. Not defined
  4009.  
  4010.  
  4011. ΓòÉΓòÉΓòÉ 1.93. SGID ΓòÉΓòÉΓòÉ
  4012.  
  4013. This data type is specific to versions, higher than version 3, of the OS/2 
  4014. operating system. 
  4015.  
  4016. Value used to hold a screen group ID. 
  4017.  
  4018. #Ifdef _PPC_
  4019. Type
  4020.   SGID    = WORD;
  4021. #Else
  4022. Type
  4023.   SGID    = WORD;
  4024. #endIf
  4025.  
  4026.  
  4027. ΓòÉΓòÉΓòÉ 1.94. SHIFTSTATE ΓòÉΓòÉΓòÉ
  4028.  
  4029. Shift State data structure. 
  4030.  
  4031. Type
  4032.   SHIFTSTATE = Record
  4033.     fsState: SmallWord;
  4034.     fNLS:    Byte;
  4035.   End;
  4036.  
  4037. Type
  4038.   PSHIFTSTATE = ^SHIFTSTATE;
  4039.  
  4040.  
  4041. ΓòÉΓòÉΓòÉ <hidden> SHIFTSTATE Field - fsState ΓòÉΓòÉΓòÉ
  4042.  
  4043.  fsState (USHORT) 
  4044.     Shift state flag. 
  4045.  
  4046.     High Byte        Has the following settings: 
  4047.  
  4048.                      Bit 15       SysReq key down 
  4049.                      Bit 14       Caps Lock key down 
  4050.                      Bit 13       NumLock key down 
  4051.                      Bit 12       ScrollLock key down 
  4052.                      Bit 11       Right Alt key down 
  4053.                      Bit 10       Right Ctrl key down 
  4054.                      Bit  9       Left Alt key down 
  4055.                      Bit  8       Left Ctrl key down 
  4056.  
  4057.     Low Byte         Has the following: 
  4058.  
  4059.                      Bit 7        Insert on 
  4060.                      Bit 6        Caps Lock on 
  4061.                      Bit 5        NumLock on 
  4062.                      Bit 4        ScrollLock on 
  4063.                      Bit 3        Either Alt key down 
  4064.                      Bit 2        Either Ctrl key down 
  4065.                      Bit 1        Left Shift key down 
  4066.                      Bit 0        Right Shift key down 
  4067.  
  4068.  
  4069. ΓòÉΓòÉΓòÉ <hidden> SHIFTSTATE Field - fNLS ΓòÉΓòÉΓòÉ
  4070.  
  4071.  fNLS (BYTE) 
  4072.     NLS shift status flag. 
  4073.  
  4074.  
  4075. ΓòÉΓòÉΓòÉ 1.95. SHORT ΓòÉΓòÉΓòÉ
  4076.  
  4077. Signed integer in the range -32 768 through 32 767. 
  4078.  
  4079.  
  4080. ΓòÉΓòÉΓòÉ 1.96. STARTDATA ΓòÉΓòÉΓòÉ
  4081.  
  4082. Start session data structure. 
  4083.  
  4084. Type
  4085.   STARTDATA = Record
  4086.     Length:        SmallWord;
  4087.     Related:       SmallWord;
  4088.     FgBg:          SmallWord;
  4089.     TraceOpt:      SmallWord;
  4090.     PgmTitle:      PChar;
  4091.     PgmName:       PChar;
  4092.     PgmInputs:     PChar;
  4093.     TermQ:         PChar;
  4094.     Environment:   PChar;
  4095.     InheritOpt:    SmallWord;
  4096.     SessionType:   SmallWord;
  4097.     IconFile:      PChar;
  4098.     PgmHandle:     ULong;
  4099.     PgmControl:    SmallWord;
  4100.     InitXPos:      SmallWord;
  4101.     InitYPos:      SmallWord;
  4102.     InitXSize:     SmallWord;
  4103.     InitYSize:     SmallWord;
  4104.     Reserved:      SmallWord;
  4105.     ObjectBuffer:  PChar;
  4106.     ObjectBuffLen: ULong;
  4107.   End;
  4108.  
  4109. Not defined
  4110.  
  4111.  
  4112. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - Length ΓòÉΓòÉΓòÉ
  4113.  
  4114.  Length (USHORT) 
  4115.     The length of the data structure, in bytes, including Length itself. 
  4116.  
  4117.     A length of at least 32 bytes must be used to start a DOS session with the 
  4118.     session type specified. A length greater than 32 is not allowed if the 
  4119.     Session Manager detects that the Presentation Manager is not present. 
  4120.  
  4121.     When a Length of 24 or 30 bytes is specified, DosStartSession initializes 
  4122.     the missing parameters to 0. This allows the Shell to provide values for 
  4123.     the missing information, based on the installation file entry for the 
  4124.     program being started. 
  4125.  
  4126.     Specify a Length of 30 bytes to use the environment and inheritance 
  4127.     features of the system. Specify a Length of 50 bytes to specify the type of 
  4128.     session to start, and to define data for windows. 
  4129.  
  4130.     A Length of 60 bytes allows you to use all of the functions provided by 
  4131.     DosStartSession. 
  4132.  
  4133.  
  4134. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - Related ΓòÉΓòÉΓòÉ
  4135.  
  4136.  Related (USHORT) 
  4137.     An indicator which specifies whether the session created is related to the 
  4138.     calling session. 
  4139.  
  4140.     The values of this field are as follows: 
  4141.  
  4142.     0        SSF_RELATED_INDEPENDENT 
  4143.              New session is an independent session (not related). 
  4144.  
  4145.     1        SSF_RELATED_CHILD 
  4146.              New session is a child session (related). 
  4147.  
  4148.     An independent session cannot be controlled by the calling program. It may 
  4149.     not be specified as the target of DosSelectSession, DosSetSession, or 
  4150.     DosStopSession. The TermQ field is ignored for independent sessions. 
  4151.  
  4152.     Refer to "Parent/Child Relationship" in the Remarks section in 
  4153.     DosStartSession for additional information about related sessions. 
  4154.  
  4155.  
  4156. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - FgBg ΓòÉΓòÉΓòÉ
  4157.  
  4158.  FgBg (USHORT) 
  4159.     An indicator which specifies whether the new session should be started in 
  4160.     the foreground or background. 
  4161.  
  4162.     If a windowed session is started in the foreground, the new session will be 
  4163.     given the window focus. The values of this field are described in the 
  4164.     following list: 
  4165.  
  4166.     0        SSF_FGBG_FORE 
  4167.              Start session in foreground 
  4168.  
  4169.     1        SSF_FGBG_BACK 
  4170.              Start session in background 
  4171.  
  4172.  
  4173. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - TraceOpt ΓòÉΓòÉΓòÉ
  4174.  
  4175.  TraceOpt (USHORT) 
  4176.     An indicator which specifies whether the program started in the new session 
  4177.     should be executed under conditions for tracing. 
  4178.  
  4179.     The values of this field are described in the following list: 
  4180.  
  4181.     0        SSF_TRACEOPT_NONE 
  4182.              No trace. 
  4183.  
  4184.     1        SSF_TRACEOPT_TRACE 
  4185.              Trace with no notification of descendants. 
  4186.  
  4187.     2        SSF_TRACEOPT_TRACEALL 
  4188.              Trace all descendant sessions. 
  4189.  
  4190.              Related equals 1 and a termination queue must be supplied when 
  4191.              this value is specified. 
  4192.  
  4193.     Refer to "Debugger Considerations" in the Remarks section in 
  4194.     DosStartSession for additional information about a tracing descendant 
  4195.     sessions. 
  4196.  
  4197.  
  4198. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - PgmTitle ΓòÉΓòÉΓòÉ
  4199.  
  4200.  PgmTitle (PSZ) 
  4201.     Address of an ASCIIZ string that contains the program title. 
  4202.  
  4203.     The string can be up to 61 bytes long, including the terminating byte of 0. 
  4204.     If the address specified is 0, or if the ASCIIZ string is null, then the 
  4205.     initial title is PgmName minus any leading drive and path information. 
  4206.  
  4207.  
  4208. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - PgmName ΓòÉΓòÉΓòÉ
  4209.  
  4210.  PgmName (PSZ) 
  4211.     The address of an ASCIIZ string that contains the file specification of the 
  4212.     program to be loaded. 
  4213.  
  4214.     If the address specified is 0, or if the ASCIIZ string is null, then the 
  4215.     program identified by the PgmHandle is started in the new session. 
  4216.  
  4217.     Refer to "PgmName and PgmInputs Considerations" in the Remarks section in 
  4218.     DosStartSession for additional information about a 0 PgmName address. 
  4219.  
  4220.  
  4221. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - PgmInputs ΓòÉΓòÉΓòÉ
  4222.  
  4223.  PgmInputs (PBYTE) 
  4224.     Either 0 or the address of an ASCIIZ string that contains the input 
  4225.     arguments to be passed to the program. 
  4226.  
  4227.  
  4228. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - TermQ ΓòÉΓòÉΓòÉ
  4229.  
  4230.  TermQ (PBYTE) 
  4231.     Either 0 or the address of an ASCIIZ string that contains the file 
  4232.     specification of a system queue. 
  4233.  
  4234.     This field is ignored when Related is set to SSF_RELATED_INDEPENDENT. 
  4235.  
  4236.     Refer to "Parent/Child Termination Considerations" in the Remarks section 
  4237.     in DosStartSession for additional information about the TermQ field. 
  4238.  
  4239.     For more information about system queues, refer to DosCreateQueue. 
  4240.  
  4241.  
  4242. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - Environment ΓòÉΓòÉΓòÉ
  4243.  
  4244.  Environment (PBYTE) 
  4245.     The address of an environment string to be passed to the program started in 
  4246.     the new session. 
  4247.  
  4248.     This parameter may be used for independent or related DosStartSession 
  4249.     functions. 
  4250.  
  4251.     When the Environment field is 0, the program in the new session inherits 
  4252.     the environment of the Shell if the InheritOpt field is equal to 
  4253.     SSF_INHERTOPT_SHELL, or the environment of the program issuing 
  4254.     DosStartSession if the InheritOpt field is equal to SSF_INHERTOPT_PARENT. 
  4255.  
  4256.     The DOS session always processes the AUTOEXEC.BAT file on the DOS startup 
  4257.     drive. You can define DOS environment variables in the AUTOEXEC.BAT file or 
  4258.     in this parameter. 
  4259.  
  4260.     See the pEnv parameter in DosExecPgm for additional information about 
  4261.     environment settings. 
  4262.  
  4263.  
  4264. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - InheritOpt ΓòÉΓòÉΓòÉ
  4265.  
  4266.  InheritOpt (USHORT) 
  4267.     Specifies whether the program started in the new session should inherit the 
  4268.     calling program's environment and open file handles. 
  4269.  
  4270.     The values of this field are described in the following list: 
  4271.  
  4272.     0        SSF_INHERTOPT_SHELL 
  4273.              Inherit the Shell's environment. 
  4274.  
  4275.     1        SSF_INHERTOPT_PARENT 
  4276.              Inherit the environment of the program issuing the DosStartSession 
  4277.              call. 
  4278.  
  4279.     The InheritOpt field may be used for independent or related DosStartSession 
  4280.     functions. Therefore, a DosStartSession function with the InheritOpt field 
  4281.     equal to SSF_INHERTOPT_PARENT is equivalent to DosExecPgm, except that the 
  4282.     new program does not inherit the priority of the parent process, or the 
  4283.     keyboard and video characteristics associated with the parent session. 
  4284.     Also, a parent process/child process relationship is not established. 
  4285.  
  4286.     Refer to "Parent/Child Relationship" in the Remarks section in 
  4287.     DosStartSession for additional information about related sessions. 
  4288.  
  4289.     The InheritOpt field for a DOS session is different than the InheritOpt 
  4290.     field for a non-DOS session. An InheritOpt value of SSF_INHERTOPT_PARENT 
  4291.     for a DOS session only inherits the parent's current drive and path. It 
  4292.     does not inherit the parent's environment. 
  4293.  
  4294.  
  4295. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - SessionType ΓòÉΓòÉΓòÉ
  4296.  
  4297.  SessionType (USHORT) 
  4298.     The type of session that should be created for this program. 
  4299.  
  4300.     The values of this field are shown in the list below: 
  4301.  
  4302.     0        SSF_TYPE_DEFAULT 
  4303.              Use the PgmHandle data, or allow the Shell to establish the 
  4304.              session type. 
  4305.  
  4306.     1        SSF_TYPE_FULLSCREEN 
  4307.              Start the program in a full-screen session. 
  4308.  
  4309.     2        SSF_TYPE_WINDOWABLEVIO 
  4310.              Start the program in a windowed session for programs using the 
  4311.              Base Video Subsystem. 
  4312.  
  4313.     3        SSF_TYPE_PM. 
  4314.              Start the program in a windowed session for programs using the 
  4315.              Presentation Manager services (including AVIO calls). 
  4316.  
  4317.     4        SSF_TYPE_VDM 
  4318.              Start the program in a full-screen DOS session. 
  4319.  
  4320.     7        SSF_TYPE_WINDOWEDVDM 
  4321.              Start the program in a windowed DOS session. 
  4322.  
  4323.  
  4324. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - IconFile ΓòÉΓòÉΓòÉ
  4325.  
  4326.  IconFile (PSZ) 
  4327.     Either 0 or the address of an ASCIIZ string that contains the file 
  4328.     specification of an icon definition. 
  4329.  
  4330.     If you do not provide an icon file name with DosStartSession, the system 
  4331.     looks for an associated icon file (with a file extension of .ICO, or an 
  4332.     extended attribute of .ICON). The system provides a default icon if an icon 
  4333.     file name is not provided with DosStartSession. 
  4334.  
  4335.  
  4336. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - PgmHandle ΓòÉΓòÉΓòÉ
  4337.  
  4338.  PgmHandle (ULONG) 
  4339.     Either 0 or the program handle. 
  4340.  
  4341.     The program handle identifies the program in the installation file to be 
  4342.     started, the program title, the session type, and the initial window size 
  4343.     and position. However, information may be specified with DosStartSession to 
  4344.     override the information in the installation file for this invocation of 
  4345.     the program. 
  4346.  
  4347.     DosStartSession does not support program groups. 
  4348.  
  4349.     Refer to "Program Handle Considerations" in the Remarks secion of 
  4350.     DosStartSession for additional information about program handles. 
  4351.  
  4352.  
  4353. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - PgmControl ΓòÉΓòÉΓòÉ
  4354.  
  4355.  PgmControl (USHORT) 
  4356.     An indicator which specifies the initial state for a windowed application. 
  4357.  
  4358.     This field is ignored for full-screen sessions. 
  4359.  
  4360.     The bits in this field have the following values: 
  4361.  
  4362.     Bit            Description 
  4363.  
  4364.     15             SSF_CONTROL_SETPOS (0x8000) 
  4365.                    Use specified size and position 
  4366.  
  4367.     4-14           Reserved 
  4368.  
  4369.     3              SSF_CONTROL_NOAUTOCLOSE (0x0008) 
  4370.                    No Auto Close 
  4371.  
  4372.     2              SSF_CONTROL_MINIMIZE (0x0004) 
  4373.                    Minimize 
  4374.  
  4375.     1              SSF_CONTROL_MAXIMIZE (0x0002) 
  4376.                    Maximize 
  4377.  
  4378.     0              SSF_CONTROL_INVISIBLE (0x0001) 
  4379.                    Invisible 
  4380.  
  4381.     0              SSF_CONTROL_VISIBLE (0x0000) 
  4382.                    Visible 
  4383.  
  4384.     Note:  The "No Auto Close" bit is used only for VIO Windowable 
  4385.            applications, and is ignored for all other types of applications. 
  4386.  
  4387.  
  4388. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - InitXPos ΓòÉΓòÉΓòÉ
  4389.  
  4390.  InitXPos (USHORT) 
  4391.     The initial x-coordinate, in pels, for the initial session window. 
  4392.  
  4393.     Coordinates (0,0) indicate the bottom left corner of the display. This 
  4394.     field is ignored for full-screen sessions. 
  4395.  
  4396.  
  4397. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - InitYPos ΓòÉΓòÉΓòÉ
  4398.  
  4399.  InitYPos (USHORT) 
  4400.     The initial y-coordinate, in pels, for the initial session window. 
  4401.  
  4402.     Coordinates (0,0) indicate the bottom left corner of the display. This 
  4403.     field is ignored for full-screen sessions. 
  4404.  
  4405.  
  4406. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - InitXSize ΓòÉΓòÉΓòÉ
  4407.  
  4408.  InitXSize (USHORT) 
  4409.     The initial x extent, in pels, for the initial session window. 
  4410.  
  4411.     This field is ignored for full-screen sessions. 
  4412.  
  4413.  
  4414. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - InitYSize ΓòÉΓòÉΓòÉ
  4415.  
  4416.  InitYSize (USHORT) 
  4417.     The initial y extent, in pels, for the initial session window. 
  4418.  
  4419.     This field is ignored for full-screen sessions. 
  4420.  
  4421.  
  4422. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - Reserved ΓòÉΓòÉΓòÉ
  4423.  
  4424.  Reserved (USHORT) 
  4425.     Reserved; must be zero. 
  4426.  
  4427.  
  4428. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - ObjectBuffer ΓòÉΓòÉΓòÉ
  4429.  
  4430.  ObjectBuffer (PSZ) 
  4431.     Buffer in which the name of the object that contributed to the failure of 
  4432.     DosExecPgm is returned. 
  4433.  
  4434.     The name of the object is usually the name of a dynamic link library that 
  4435.     could not be loaded. 
  4436.  
  4437.     DosStartSession calls DosExecPgm to start all full-screen, VIO windowed, 
  4438.     and Presentation Manager programs. 
  4439.  
  4440.  
  4441. ΓòÉΓòÉΓòÉ <hidden> STARTDATA Field - ObjectBuffLen ΓòÉΓòÉΓòÉ
  4442.  
  4443.  ObjectBuffLen (ULONG) 
  4444.     The length, in bytes, of the buffer pointed to by ObjectBuffer. 
  4445.  
  4446.  
  4447. ΓòÉΓòÉΓòÉ 1.97. STATUSDATA ΓòÉΓòÉΓòÉ
  4448.  
  4449. Status data structure. 
  4450.  
  4451. Type
  4452.   STATUSDATA = Record
  4453.     Length:    SmallWord;
  4454.     SelectInd: SmallWord;
  4455.     BondInd:   SmallWord;
  4456.   End;
  4457.  
  4458. Type
  4459.   PSTATUSDATA = ^STATUSDATA;
  4460.  
  4461.  
  4462. ΓòÉΓòÉΓòÉ <hidden> STATUSDATA Field - Length ΓòÉΓòÉΓòÉ
  4463.  
  4464.  Length (USHORT) 
  4465.     The length of the data structure, in bytes, including Length itself. 
  4466.  
  4467.  
  4468. ΓòÉΓòÉΓòÉ <hidden> STATUSDATA Field - SelectInd ΓòÉΓòÉΓòÉ
  4469.  
  4470.  SelectInd (USHORT) 
  4471.     An indicator that specifies whether the target session should be flagged as 
  4472.     selectable or non-selectable. 
  4473.  
  4474.     Possible values are shown in the following list: 
  4475.  
  4476.     0        SET_SESSION_UNCHANGED 
  4477.              Leaves the current setting unchanged. 
  4478.  
  4479.     1        SET_SESSION_SELECTABLE 
  4480.              Makes the target session selectable. 
  4481.  
  4482.     2        SET_SESSION_NON_SELECTABLE 
  4483.              Makes the target session non-selectable. A non-selectable session 
  4484.              is not selectable from the Shell switch list, nor can the user 
  4485.              jump to it via the system hot key. The operator may continue to 
  4486.              select a non-selectable windowed session by pressing a mouse 
  4487.              button within a visible part of the window. 
  4488.  
  4489.  
  4490. ΓòÉΓòÉΓòÉ <hidden> STATUSDATA Field - BondInd ΓòÉΓòÉΓòÉ
  4491.  
  4492.  BondInd (USHORT) 
  4493.     An indicator that specifies which session to bring to the foreground the 
  4494.     next time the parent session is selected. 
  4495.  
  4496.     Possible values are shown in the following list: 
  4497.  
  4498.     0        SET_SESSION_UNCHANGED 
  4499.              Leaves the current setting unchanged. 
  4500.  
  4501.     1        SET_SESSION_BOND 
  4502.              Establishes a bond between the parent session and the child 
  4503.              session. The child session is brought to the foreground the next 
  4504.              time the parent session is selected. If the child session is 
  4505.              selected, the child session is brought to the foreground. 
  4506.  
  4507.     2        SET_SESSION_NO_BOND 
  4508.              Specifies bringing the parent session to the foreground the next 
  4509.              time the parent session is selected, and bringing the child 
  4510.              session to the foreground if the child is selected. Any bond 
  4511.              previously established with the child session specified is broken. 
  4512.  
  4513.  
  4514. ΓòÉΓòÉΓòÉ 1.98. TRACKLAYOUT ΓòÉΓòÉΓòÉ
  4515.  
  4516. Track layout. 
  4517.  
  4518. Type
  4519.   TRACKLAYOUT = Record
  4520.     bCommand:      Byte;
  4521.     usHead:        SmallWord;
  4522.     usCylinder:    SmallWord;
  4523.     usFirstSector: SmallWord;
  4524.     cSectors:      SmallWord;
  4525.     TrackTable: array[0..0] of record
  4526.     usSectorNumber: SmallWord;
  4527.     usSectorSize:   SmallWord;
  4528.   End;
  4529.  
  4530. Type
  4531.   PTRACKLAYOUT = ^TRACKLAYOUT;
  4532.  
  4533.  
  4534. ΓòÉΓòÉΓòÉ <hidden> TRACKLAYOUT Field - bCommand ΓòÉΓòÉΓòÉ
  4535.  
  4536.  bCommand (BYTE) 
  4537.     Command information. 
  4538.  
  4539.     Bit 0       If clear (0), the track layout contains nonconsecutive sectors 
  4540.                 or does not start with Sector 1. If set (1), the track layout 
  4541.                 starts with Sector 1 and contains only consecutive sectors. 
  4542.  
  4543.     All other bits are reserved and must be set to 0. 
  4544.  
  4545.  
  4546. ΓòÉΓòÉΓòÉ <hidden> TRACKLAYOUT Field - usHead ΓòÉΓòÉΓòÉ
  4547.  
  4548.  usHead (USHORT) 
  4549.     Physical head on the device that performs the operation. 
  4550.  
  4551.  
  4552. ΓòÉΓòÉΓòÉ <hidden> TRACKLAYOUT Field - usCylinder ΓòÉΓòÉΓòÉ
  4553.  
  4554.  usCylinder (USHORT) 
  4555.     Cylinder to be written, read, or verified. 
  4556.  
  4557.  
  4558. ΓòÉΓòÉΓòÉ <hidden> TRACKLAYOUT Field - usFirstSector ΓòÉΓòÉΓòÉ
  4559.  
  4560.  usFirstSector (USHORT) 
  4561.     Logical sector number within the Track Layout Table that starts the I/O 
  4562.     operation. 
  4563.  
  4564.     Note that all the sector numbers start with 0. For example the third sector 
  4565.     is number 2. 
  4566.  
  4567.  
  4568. ΓòÉΓòÉΓòÉ <hidden> TRACKLAYOUT Field - cSectors ΓòÉΓòÉΓòÉ
  4569.  
  4570.  cSectors (USHORT) 
  4571.     Number of sectors to read, write, or verify. 
  4572.  
  4573.     This value must be less than or equal to the maximum number number of 
  4574.     sectors specified in the track table. 
  4575.  
  4576.     The IOCtl subfunctions do not step heads or tracks. 
  4577.  
  4578.  
  4579. ΓòÉΓòÉΓòÉ <hidden> TRACKLAYOUT Field - usSectorNumber ΓòÉΓòÉΓòÉ
  4580.  
  4581.  usSectorNumber (USHORT) 
  4582.     Sector number. 
  4583.  
  4584.     There must be one usSectorNumber and usSectorSize in the track layout table 
  4585.     for every sector, up to cSectors sectors. 
  4586.  
  4587.  
  4588. ΓòÉΓòÉΓòÉ <hidden> TRACKLAYOUT Field - usSectorSize ΓòÉΓòÉΓòÉ
  4589.  
  4590.  usSectorSize (USHORT) 
  4591.     Sector size. 
  4592.  
  4593.     There must be one usSectorNumber and usSectorSize in the track layout table 
  4594.     for every sector, up to cSectors sectors. 
  4595.  
  4596.  
  4597. ΓòÉΓòÉΓòÉ 1.99. TIB ΓòÉΓòÉΓòÉ
  4598.  
  4599. Thread Information Block structure. 
  4600.  
  4601. Type
  4602.   TIB = Record
  4603.     Tib_PExchain:         Pointer;      { Head of exception handler chain     }
  4604.     Tib_PStack:           Pointer;      { Pointer to base of stack            }
  4605.     Tib_PStackLimit:      Pointer;      { Pointer to end of stack             }
  4606.     Tib_PTib2:            PTib2;        { Pointer to system specific TIB      }
  4607.     Tib_Version:          ULong;        { Version number for this TIB structure}
  4608.     Tib_Ordinal:          ULong;        { Thread ordinal number               }
  4609.   End;
  4610.  
  4611. Type
  4612.   PTIB = ^TIB;
  4613.  
  4614. A thread is a dispatchable unit of executable code that consists of  set of 
  4615. instructions, related CPU register values, and a stack. Every process has at 
  4616. least one thread and can have many threads running at the same time. The 
  4617. application runs when the operating system gives control to a thread in a 
  4618. process. A thread is the basic unit of execution. 
  4619.  
  4620. Information about a thread is kept in a read/write area of the process address 
  4621. space, called the Thread Information Block (TIB). The operating system creates 
  4622. and maintains a TIB for every thread in the system. 
  4623.  
  4624. An application can access the TIB of a specific thread using DosGetInfoBlocks. 
  4625.  
  4626. Note:  The fields of this data structure should not be modified unless you are 
  4627.        switching stacks, in which case only the tib_pstack and tib_pstacklimit 
  4628.        should changed. 
  4629.  
  4630.  
  4631. ΓòÉΓòÉΓòÉ <hidden> TIB Field - tib_pexchain ΓòÉΓòÉΓòÉ
  4632.  
  4633.  tib_pexchain (PVOID) 
  4634.     Head of exception handler chain. 
  4635.  
  4636.  
  4637. ΓòÉΓòÉΓòÉ <hidden> TIB Field - tib_pstack ΓòÉΓòÉΓòÉ
  4638.  
  4639.  tib_pstack (PVOID) 
  4640.     Pointer to the base of the stack. 
  4641.  
  4642.  
  4643. ΓòÉΓòÉΓòÉ <hidden> TIB Field - tib_pstacklimit ΓòÉΓòÉΓòÉ
  4644.  
  4645.  tib_pstacklimit (PVOID) 
  4646.     Pointer to the end of the stack. 
  4647.  
  4648.  
  4649. ΓòÉΓòÉΓòÉ <hidden> TIB Field - tib_ptib2 ΓòÉΓòÉΓòÉ
  4650.  
  4651.  tib_ptib2 (PTIB2) 
  4652.     Pointer to a system-specific thread information block. 
  4653.  
  4654.  
  4655. ΓòÉΓòÉΓòÉ <hidden> TIB Field - tib_version ΓòÉΓòÉΓòÉ
  4656.  
  4657.  tib_version (ULONG) 
  4658.     Version number for this Thread Information Block. 
  4659.  
  4660.  
  4661. ΓòÉΓòÉΓòÉ <hidden> TIB Field - tib_ordinal ΓòÉΓòÉΓòÉ
  4662.  
  4663.  tib_ordinal (ULONG) 
  4664.     Thread ordinal number. 
  4665.  
  4666.  
  4667. ΓòÉΓòÉΓòÉ 1.100. TIB2 ΓòÉΓòÉΓòÉ
  4668.  
  4669. System-specific Thread Information Block structure. 
  4670.  
  4671. Type
  4672.   TIB2 = Record
  4673.     Tib2_ulTid:           ULong;        { Thread I.D.                         }
  4674.     Tib2_ulPri:           ULong;        { Thread priority                     }
  4675.     Tib2_Version:         ULong;        { Version number for this structure   }
  4676.     Tib2_usMCCount:       SmallWord;    { Must Complete count                 }
  4677.     Tib2_fMCForceFlag:    SmallWord;    { Must Complete force flag            }
  4678.   End;
  4679.  
  4680. Type
  4681.   PTIB2 = ^TIB2;                        { THREAD INFORMATION BLOCK (TIB)      }
  4682.  
  4683.  
  4684. ΓòÉΓòÉΓòÉ <hidden> TIB2 Field - tib2_ultid ΓòÉΓòÉΓòÉ
  4685.  
  4686.  tib2_ultid (ULONG) 
  4687.     Current thread identifier. 
  4688.  
  4689.  
  4690. ΓòÉΓòÉΓòÉ <hidden> TIB2 Field - tib2_ulpri ΓòÉΓòÉΓòÉ
  4691.  
  4692.  tib2_ulpri (ULONG) 
  4693.     Current thread priority. The low byte of the low word is a hexadecimal 
  4694.     value representing a rank (value 0 to 31) within a priority class.  Class 
  4695.     values, found in the high byte of the low word, are as follows: 
  4696.  
  4697.     0x01 
  4698.             Idle. 
  4699.     0x02 
  4700.             Regular. 
  4701.     0x03 
  4702.             Time critical. 
  4703.     0x04 
  4704.             Server. 
  4705.  
  4706.  
  4707. ΓòÉΓòÉΓòÉ <hidden> TIB2 Field - tib2_version ΓòÉΓòÉΓòÉ
  4708.  
  4709.  tib2_version (ULONG) 
  4710.     Version number for this system-specific Thread Information Block. 
  4711.  
  4712.  
  4713. ΓòÉΓòÉΓòÉ <hidden> TIB2 Field - tib2_usMCCount ΓòÉΓòÉΓòÉ
  4714.  
  4715.  tib2_usMCCount (USHORT) 
  4716.     Must-complete count. 
  4717.  
  4718.  
  4719. ΓòÉΓòÉΓòÉ <hidden> TIB2 Field - tib2_fMCForceFlag ΓòÉΓòÉΓòÉ
  4720.  
  4721.  tib2_fMCForceFlag (USHORT) 
  4722.     Must-complete force flag. 
  4723.  
  4724.  
  4725. ΓòÉΓòÉΓòÉ 1.101. TID ΓòÉΓòÉΓòÉ
  4726.  
  4727. Thread identity. 
  4728.  
  4729. Type
  4730.   TID     = LHANDLE;
  4731.  
  4732.  
  4733. ΓòÉΓòÉΓòÉ 1.102. UCHAR ΓòÉΓòÉΓòÉ
  4734.  
  4735. Single-byte unsigned character or unsigned integer in the range 0 through 255. 
  4736.  
  4737. Not defined
  4738.  
  4739.  
  4740. ΓòÉΓòÉΓòÉ 1.103. ULONG ΓòÉΓòÉΓòÉ
  4741.  
  4742. Unsigned integer in the range 0 through 4 294 967 295. 
  4743.  
  4744. Type
  4745.   ULONG   = LONGINT;
  4746.  
  4747.  
  4748. ΓòÉΓòÉΓòÉ 1.104. USHORT ΓòÉΓòÉΓòÉ
  4749.  
  4750. Unsigned integer in the range 0 through 65 535. 
  4751.  
  4752. Type
  4753.   USHORT  = WORD;
  4754.  
  4755.  
  4756. ΓòÉΓòÉΓòÉ 1.105. VOID ΓòÉΓòÉΓòÉ
  4757.  
  4758. A data area of undefined format. 
  4759.  
  4760.  
  4761. ΓòÉΓòÉΓòÉ 1.106. VOLUMELABEL ΓòÉΓòÉΓòÉ
  4762.  
  4763. Volume label structure. 
  4764.  
  4765. Type
  4766.   VOLUMELABEL = Record
  4767.  
  4768.     PFsInfo = ^FsInfo;
  4769.     FsInfo = record
  4770.     fdateCreation:  FDate;
  4771.     ftimeCreation:  FTime;
  4772.     vol:            VolumeLabel;
  4773.   End;
  4774.  
  4775. Type
  4776.   PVOLUMELABEL = ^VOLUMELABEL;
  4777.  
  4778.  
  4779. ΓòÉΓòÉΓòÉ <hidden> VOLUMELABEL Field - cch ΓòÉΓòÉΓòÉ
  4780.  
  4781.  cch (BYTE) 
  4782.     Length of the volume label, not including the null. 
  4783.  
  4784.  
  4785. ΓòÉΓòÉΓòÉ <hidden> VOLUMELABEL Field - szVolLabel[12] ΓòÉΓòÉΓòÉ
  4786.  
  4787.  szVolLabel[12] (CHAR) 
  4788.     Volume label. 
  4789.  
  4790.     This is an ASCIIZ string. 
  4791.  
  4792.  
  4793. ΓòÉΓòÉΓòÉ 2. Errors ΓòÉΓòÉΓòÉ
  4794.  
  4795. For errors 0 through 499, the following shows the numerical value of an error, 
  4796. its symbolic name, and a brief description of the error. For errors 500 and 
  4797. above, the following shows the numerical value of an error and its symbolic 
  4798. name. 
  4799.  
  4800. Select a range of Control Program error return codes: 
  4801.  
  4802.       0 to 99 
  4803.  
  4804.       100 to 199 
  4805.  
  4806.       200 to 299 
  4807.  
  4808.       300 to 399 
  4809.  
  4810.       400 to 499 
  4811.  
  4812.       500 to 599 
  4813.  
  4814.       600 to 1999 
  4815.  
  4816.       2000 to 59999 
  4817.  
  4818.       60000 to 65079 
  4819.  
  4820.  
  4821. ΓòÉΓòÉΓòÉ <hidden> Errors 0 to 99 ΓòÉΓòÉΓòÉ
  4822.  
  4823. The following shows the numerical value of an error, its symbolic name, and a 
  4824. brief description of the error. 
  4825.  
  4826.  0  NO_ERROR 
  4827.          No error occurred. 
  4828.  
  4829.  1  ERROR_INVALID_FUNCTION 
  4830.          Invalid function number. 
  4831.  
  4832.  2  ERROR_FILE_NOT_FOUND 
  4833.          File not found. 
  4834.  
  4835.  3  ERROR_PATH_NOT_FOUND 
  4836.          Path not found. 
  4837.  
  4838.  4  ERROR_TOO_MANY_OPEN_FILES 
  4839.          Too many open files (no handles left). 
  4840.  
  4841.  5  ERROR_ACCESS_DENIED 
  4842.          Access denied. 
  4843.  
  4844.  6  ERROR_INVALID_HANDLE 
  4845.          Invalid handle. 
  4846.  
  4847.  7  ERROR_ARENA_TRASHED 
  4848.          Memory control blocks destroyed. 
  4849.  
  4850.  8  ERROR_NOT_ENOUGH_MEMORY 
  4851.          Insufficient memory. 
  4852.  
  4853.  9  ERROR_INVALID_BLOCK 
  4854.          Invalid memory-block address. 
  4855.  
  4856.  10  ERROR_BAD_ENVIRONMENT 
  4857.          Invalid environment. 
  4858.  
  4859.  11  ERROR_BAD_FORMAT 
  4860.          Invalid format. 
  4861.  
  4862.  12  ERROR_INVALID_ACCESS 
  4863.          Invalid access code. 
  4864.  
  4865.  13  ERROR_INVALID_DATA 
  4866.          Invalid data. 
  4867.  
  4868.  14  Reserved. 
  4869.  
  4870.  15  ERROR_INVALID_DRIVE 
  4871.          Invalid drive specified. 
  4872.  
  4873.  16  ERROR_CURRENT_DIRECTORY 
  4874.          Attempting to remove current directory. 
  4875.  
  4876.  17  ERROR_NOT_SAME_DEVICE 
  4877.          Not same device. 
  4878.  
  4879.  18  ERROR_NO_MORE_FILES 
  4880.          No more files. 
  4881.  
  4882.  19  ERROR_WRITE_PROTECT 
  4883.          Attempt to write on write-protected diskette. 
  4884.  
  4885.  20  ERROR_BAD_UNIT 
  4886.          Unknown unit. 
  4887.  
  4888.  21  ERROR_NOT_READY 
  4889.          Drive not ready. 
  4890.  
  4891.  22  ERROR_BAD_COMMAND 
  4892.          Unknown command. 
  4893.  
  4894.  23  ERROR_CRC 
  4895.          Data error - cyclic redundancy check. 
  4896.  
  4897.  24  ERROR_BAD_LENGTH 
  4898.          Invalid request structure length. 
  4899.  
  4900.  25  ERROR_SEEK 
  4901.          Seek error. 
  4902.  
  4903.  26  ERROR_NOT_DOS_DISK 
  4904.          Unknown media type. 
  4905.  
  4906.  27  ERROR_SECTOR_NOT_FOUND 
  4907.          Sector not found. 
  4908.  
  4909.  28  ERROR_OUT_OF_PAPER 
  4910.          Printer is out of paper. 
  4911.  
  4912.  29  ERROR_WRITE FAULT 
  4913.          Write fault. 
  4914.  
  4915.  30  ERROR_READ_FAULT 
  4916.          Read fault. 
  4917.  
  4918.  31  ERROR_GEN_FAILURE 
  4919.          General failure. For DosGetShrSeg and DosGetNamedSharedMem, indicates 
  4920.          that a segment's maximum reference count of 65535 has been exceeded. 
  4921.  
  4922.  32  ERROR_SHARING_VIOLATION 
  4923.          Sharing violation. 
  4924.  
  4925.  33  ERROR_LOCK_VIOLATION 
  4926.          Lock violation. 
  4927.  
  4928.  34  ERROR_WRONG_DISK 
  4929.          Invalid disk change. 
  4930.  
  4931.  35  ERROR_FCB_UNAVAILABLE 
  4932.          FCB unavailable. 
  4933.  
  4934.  36  ERROR_SHARING_BUFFER_EXCEEDED 
  4935.          Sharing buffer overflow. 
  4936.  
  4937.  37  ERROR_CODE_PAGE_MISMATCHED 
  4938.          Code page does not match. 
  4939.  
  4940.  38  ERROR_HANDLE_EOF 
  4941.          End of file reached. 
  4942.  
  4943.  39  ERROR_HANDLE_DISK_FULL 
  4944.          Disk is full. 
  4945.  
  4946.  40-49  Reserved. 
  4947.  
  4948.  50  ERROR_NOT_SUPPORTED 
  4949.          Network request not supported. 
  4950.  
  4951.  51  ERROR_REM_NOT_LIST 
  4952.          Remote network node is not online. 
  4953.  
  4954.  52  ERROR_DUP_NAME 
  4955.          Duplicate file name in network. 
  4956.  
  4957.  53  ERROR_BAD_NETPATH 
  4958.          Network path not found. 
  4959.  
  4960.  54  ERROR_NETWORK_BUSY 
  4961.          Network is busy. 
  4962.  
  4963.  55  ERROR_DEV_NOT_EXIST 
  4964.          Device is not installed in network. 
  4965.  
  4966.  56  ERROR_TOO_MANY_CMDS 
  4967.          Network command limit reached. 
  4968.  
  4969.  57  ERROR_ADAP_HDW_ERR 
  4970.          Network adapter hardware error. 
  4971.  
  4972.  58  ERROR_BAD_NET_RESP 
  4973.          Incorrect response in network. 
  4974.  
  4975.  59  ERROR_UNEXP_NET_ERR 
  4976.          Unexpected error in network. 
  4977.  
  4978.  60  ERROR_BAD_REM_ADAP 
  4979.          Remote network adapter error. 
  4980.  
  4981.  61  ERROR_PRINTQ_FULL 
  4982.          Network printer queue is full. 
  4983.  
  4984.  62  ERROR_NO_SPOOL_SPACE 
  4985.          No space in print spool file. 
  4986.  
  4987.  63  ERROR_PRINT_CANCELLED 
  4988.          Print spool file deleted. 
  4989.  
  4990.  64  ERROR_NETNAME_DELETED 
  4991.          Network name deleted. 
  4992.  
  4993.  65  ERROR_NETWORK_ACCESS_DENIED 
  4994.          Access to network denied. 
  4995.  
  4996.  66  ERROR_BAD_DEV_TYPE 
  4997.          Device type invalid for network. 
  4998.  
  4999.  67  ERROR_BAD_NET_NAME 
  5000.          Network name not found. 
  5001.  
  5002.  68  ERROR_TOO_MANY_NAMES 
  5003.          Network name limit exceeded. 
  5004.  
  5005.  69  ERROR_TOO_MANY_SESS 
  5006.          Network session limit exceeded. 
  5007.  
  5008.  70  ERROR_SHARING_PAUSED 
  5009.          Temporary pause in network. 
  5010.  
  5011.  71  ERROR_REQ_NOT_ACCEP 
  5012.          Network request denied. 
  5013.  
  5014.  72  ERROR_REDIR_PAUSED 
  5015.          Pause in network print disk redirection. 
  5016.  
  5017.  73  ERROR_SBCS_ATT_WRITE_PROT 
  5018.          Attempted write on protected disk. 
  5019.  
  5020.  74  ERROR_SBCS_GENERAL_FAILURE 
  5021.          General failure, single-byte character set. 
  5022.  
  5023.  75  ERROR_XGA_OUT_MEMORY 
  5024.          XGA is out of memory. 
  5025.  
  5026.  76-79  Reserved. 
  5027.  
  5028.  80  ERROR_FILE_EXISTS 
  5029.          File exists. 
  5030.  
  5031.  81  ERROR_DUP_FCB 
  5032.          Reserved. 
  5033.  
  5034.  82  ERROR_CANNOT_MAKE 
  5035.          Cannot make directory entry. 
  5036.  
  5037.  83  ERROR_FAIL_I24 
  5038.          Failure on INT 24. 
  5039.  
  5040.  84  ERROR_OUT_OF_STRUCTURES 
  5041.          Too many redirections. 
  5042.  
  5043.  85  ERROR_ALREADY_ASSIGNED 
  5044.          Duplicate redirection. 
  5045.  
  5046.  86  ERROR_INVALID_PASSWORD 
  5047.          Invalid password. 
  5048.  
  5049.  87  ERROR_INVALID_PARAMETER 
  5050.          Invalid parameter. 
  5051.  
  5052.  88  ERROR_NET_WRITE_FAULT 
  5053.          Network device fault. 
  5054.  
  5055.  89  ERROR_NO_PROC_SLOTS 
  5056.          No process slots available. 
  5057.  
  5058.  90  ERROR_NOT_FROZEN 
  5059.          System error. 
  5060.  
  5061.  90  ERROR_SYS_COMP_NOT_LOADED 
  5062.          System error. 
  5063.  
  5064.  91  ERR_TSTOVFL 
  5065.          Timer service table overflow. 
  5066.  
  5067.  92  ERR_TSTDUP 
  5068.          Timer service table duplicate. 
  5069.  
  5070.  93  ERROR_NO_ITEMS 
  5071.          No items to work on. 
  5072.  
  5073.  95  ERROR_INTERRUPT 
  5074.          Interrupted system call. 
  5075.  
  5076.  99  ERROR_DEVICE_IN_USE 
  5077.          Device in use. 
  5078.  
  5079.  
  5080. ΓòÉΓòÉΓòÉ <hidden> Errors 100 to 199 ΓòÉΓòÉΓòÉ
  5081.  
  5082. The following shows the numerical value of an error, its symbolic name, and a 
  5083. brief description of the error. 
  5084.  
  5085.  100  ERROR_TOO_MANY_SEMAPHORES 
  5086.          User/system open semaphore limit reached. 
  5087.  
  5088.  101  ERROR_EXCL_SEM_ALREADY_OWNED 
  5089.          Exclusive semaphore already owned. 
  5090.  
  5091.  102  ERROR_SEM_IS_SET 
  5092.          DosCloseSem found semaphore set. 
  5093.  
  5094.  103  ERROR_TOO_MANY_SEM_REQUESTS 
  5095.          Too many exclusive semaphore requests. 
  5096.  
  5097.  104  ERROR_INVALID_AT_INTERRUPT_TIME 
  5098.          Operation invalid at interrupt time. 
  5099.  
  5100.  105  ERROR_SEM_OWNER_DIED 
  5101.          Previous semaphore owner terminated without freeing semaphore. 
  5102.  
  5103.  106  ERROR_SEM_USER_LIMIT 
  5104.          Semaphore limit exceeded. 
  5105.  
  5106.  107  ERROR_DISK_CHANGE 
  5107.          Insert drive B disk into drive A. 
  5108.  
  5109.  108  ERROR_DRIVE_LOCKED 
  5110.          Drive locked by another process. 
  5111.  
  5112.  109  ERROR_BROKEN_PIPE 
  5113.          Write on pipe with no reader. 
  5114.  
  5115.  110  ERROR_OPEN_FAILED 
  5116.          Open/create failed due to explicit fail command. 
  5117.  
  5118.  111  ERROR_BUFFER_OVERFLOW 
  5119.          Buffer passed to system call too small to hold return data. 
  5120.  
  5121.  112  ERROR_DISK_FULL 
  5122.          Not enough space on the disk. 
  5123.  
  5124.  113  ERROR_NO_MORE_SEARCH_HANDLES 
  5125.          Cannot allocate another search structure and handle. 
  5126.  
  5127.  114  ERROR_INVALID_TARGET_HANDLE 
  5128.          Target handle in DosDupHandle invalid. 
  5129.  
  5130.  115  ERROR_PROTECTION_VIOLATION 
  5131.          Invalid user virtual address. 
  5132.  
  5133.  116  ERROR_VIOKBD_REQUEST 
  5134.          Error on display write or keyboard read. 
  5135.  
  5136.  117  ERROR_INVALID_CATEGORY 
  5137.          Category for DevIOCtl not defined. 
  5138.  
  5139.  118  ERROR_INVALID_VERIFY_SWITCH 
  5140.          Invalid value passed for verify flag. 
  5141.  
  5142.  119  ERROR_BAD_DRIVER_LEVEL 
  5143.          Level four driver not found. 
  5144.  
  5145.  120  ERROR_CALL_NOT_IMPLEMENTED 
  5146.          Invalid function called. 
  5147.  
  5148.  121  ERROR_SEM_TIMEOUT 
  5149.          Time-out occurred from semaphore API function. 
  5150.  
  5151.  122  ERROR_INSUFFICIENT_BUFFER 
  5152.          Data buffer too small. 
  5153.  
  5154.  123  ERROR_INVALID_NAME 
  5155.          Illegal character or invalid file-system name. 
  5156.  
  5157.  124  ERROR_INVALID_LEVEL 
  5158.          Non-implemented level for information retrieval or setting. 
  5159.  
  5160.  125  ERROR_NO_VOLUME_LABEL 
  5161.          No volume label found with DosQueryFSInfo function. 
  5162.  
  5163.  126  ERROR_MOD_NOT_FOUND 
  5164.          Module handle not found with DosQueryProcAddr(), DosQueryModAddr(). 
  5165.  
  5166.  127  ERROR_PROC_NOT_FOUND 
  5167.          Procedure address not found with DosQueryProcAddr(). 
  5168.  
  5169.  128  ERROR_WAIT_NO_CHILDREN 
  5170.          DosWaitChild finds no children. 
  5171.  
  5172.  129  ERROR_CHILD_NOT_COMPLETE 
  5173.          DosWaitChild children not terminated. 
  5174.  
  5175.  130  ERROR_DIRECT_ACCESS_HANDLE 
  5176.          Handle operation invalid for direct disk-access handles. 
  5177.  
  5178.  131  ERROR_NEGATIVE_SEEK 
  5179.          Attempting seek to negative offset. 
  5180.  
  5181.  132  ERROR_SEEK_ON_DEVICE 
  5182.          Application trying to seek on device or pipe. 
  5183.  
  5184.  133  ERROR_IS_JOIN_TARGET 
  5185.          Drive has previously joined drives. 
  5186.  
  5187.  134  ERROR_IS_JOINED 
  5188.          Drive is already joined. 
  5189.  
  5190.  135  ERROR_IS_SUBSTED 
  5191.          Drive is already substituted. 
  5192.  
  5193.  136  ERROR_NOT_JOINED 
  5194.          Cannot delete drive that is not joined. 
  5195.  
  5196.  137  ERROR_NOT_SUBSTED 
  5197.          Cannot delete drive that is not substituted. 
  5198.  
  5199.  138  ERROR_JOIN_TO_JOIN 
  5200.          Cannot join to a joined drive. 
  5201.  
  5202.  139  ERROR_SUBST_TO_SUBST 
  5203.          Cannot substitute to a substituted drive. 
  5204.  
  5205.  140  ERROR_JOIN_TO_SUBST 
  5206.          Cannot join to a substituted drive. 
  5207.  
  5208.  141  ERROR_SUBST_TO_JOIN 
  5209.          Cannot substitute to a joined drive. 
  5210.  
  5211.  142  ERROR_BUSY_DRIVE 
  5212.          Specified drive is busy. 
  5213.  
  5214.  143  ERROR_SAME_DRIVE 
  5215.          Cannot join or substitute a drive to a directory on the same drive. 
  5216.  
  5217.  144  ERROR_DIR_NOT_ROOT 
  5218.          Directory must be a subdirectory of the root. 
  5219.  
  5220.  145  ERROR_DIR_NOT_EMPTY 
  5221.          Directory must be empty to use join command. 
  5222.  
  5223.  146  ERROR_IS_SUBST_PATH 
  5224.          Path specified is being used in a substitute. 
  5225.  
  5226.  147  ERROR_IS_JOIN_PATH 
  5227.          Path specified is being used in a join. 
  5228.  
  5229.  148  ERROR_PATH_BUSY 
  5230.          Path specified is being used by another process. 
  5231.  
  5232.  149  ERROR_IS_SUBST_TARGET 
  5233.          Cannot join or substitute a drive that has a directory that is the 
  5234.          target of a previous substitute. 
  5235.  
  5236.  150  ERROR_SYSTEM_TRACE 
  5237.          System trace error. 
  5238.  
  5239.  151  ERROR_INVALID_EVENT_COUNT 
  5240.          DosWaitMuxWaitSem errors. 
  5241.  
  5242.  152  ERROR_TOO_MANY_MUXWAITERS 
  5243.          System limit of 100 entries reached. 
  5244.  
  5245.  153  ERROR_INVALID_LIST_FORMAT 
  5246.          Invalid list format. 
  5247.  
  5248.  154  ERROR_LABEL_TOO_LONG 
  5249.          Volume label too big. 
  5250.  
  5251.  155  ERROR_TOO_MANY_TCBS 
  5252.          Cannot create another TCB. 
  5253.  
  5254.  156  ERROR_SIGNAL_REFUSED 
  5255.          Signal refused. 
  5256.  
  5257.  157  ERROR_DISCARDED 
  5258.          Segment is discarded. 
  5259.  
  5260.  158  ERROR_NOT_LOCKED 
  5261.          Segment is not locked. 
  5262.  
  5263.  159  ERROR_BAD_THREADID_ADDR 
  5264.          Invalid thread-identity address. 
  5265.  
  5266.  160  ERROR_BAD_ARGUMENTS 
  5267.          Invalid environment pointer. 
  5268.  
  5269.  161  ERROR_BAD_PATHNAME 
  5270.          Invalid path name passed to exec. 
  5271.  
  5272.  162  ERROR_SIGNAL_PENDING 
  5273.          Signal already pending. 
  5274.  
  5275.  163  ERROR_UNCERTAIN_MEDIA 
  5276.          Error with INT 24 mapping. 
  5277.  
  5278.  164  ERROR_MAX_THRDS_REACHED 
  5279.          No more process slots. 
  5280.  
  5281.  165  ERROR_MONITORS_NOT_SUPPORTED 
  5282.          Error with INT 24 mapping. 
  5283.  
  5284.  166  ERROR_UNC_DRIVER_NOT_INSTALLED 
  5285.          Default redirection return code. 
  5286.  
  5287.  167  ERROR_LOCK_FAILED 
  5288.          Locking failed. 
  5289.  
  5290.  168  ERROR_SWAPIO_FAILED 
  5291.          Swap I/O failed. 
  5292.  
  5293.  169  ERROR_SWAPIN_FAILED 
  5294.          Swap in failed. 
  5295.  
  5296.  170  ERROR_BUSY 
  5297.          Segment is busy. 
  5298.  
  5299.  171-172  Reserved. 
  5300.  
  5301.  173  ERROR_CANCEL_VIOLATION 
  5302.          A lock request is not outstanding for the specified file range, or the 
  5303.          range length is zero. 
  5304.  
  5305.  174  ERROR_ATOMIC_LOCK_NOT_SUPPORTED 
  5306.          The file-system driver (FSD) does not support atomic lock operations. 
  5307.          Versions of OS/2 prior to version 2.00 do not support atomic lock 
  5308.          operations. 
  5309.  
  5310.  175  ERROR_READ_LOCKS_NOT_SUPPORTED 
  5311.          The file system driver (FSD) does not support shared read locks. 
  5312.  
  5313.  176-179  Reserved. 
  5314.  
  5315.  180  ERROR_INVALID_SEGMENT_NUMBER 
  5316.          Invalid segment number. 
  5317.  
  5318.  181  ERROR_INVALID_CALLGATE 
  5319.          Invalid call gate. 
  5320.  
  5321.  182  ERROR_INVALID_ORDINAL 
  5322.          Invalid ordinal. 
  5323.  
  5324.  183  ERROR_ALREADY_EXISTS 
  5325.          Shared segment already exists. 
  5326.  
  5327.  184  ERROR_NO_CHILD_PROCESS 
  5328.          No child process to wait for. 
  5329.  
  5330.  185  ERROR_CHILD_ALIVE_NOWAIT 
  5331.          NoWait specified and child alive. 
  5332.  
  5333.  186  ERROR_INVALID_FLAG_NUMBER 
  5334.          Invalid flag number. 
  5335.  
  5336.  187  ERROR_SEM_NOT_FOUND 
  5337.          Semaphore does not exist. 
  5338.  
  5339.  188  ERROR_INVALID_STARTING_CODESEG 
  5340.          Invalid starting code segment, incorrect END (label) directive. 
  5341.  
  5342.  189  ERROR_INVALID_STACKSEG 
  5343.          Invalid stack segment. 
  5344.  
  5345.  190  ERROR_INVALID_MODULETYPE 
  5346.          Invalid module type - dynamic-link library file cannot be used as an 
  5347.          application. Application cannot be used as a dynamic-link library. 
  5348.  
  5349.  191  ERROR_INVALID_EXE_SIGNATURE 
  5350.          Invalid EXE signature - file is a DOS mode program or an improper 
  5351.          program. 
  5352.  
  5353.  192  ERROR_EXE_MARKED_INVALID 
  5354.          EXE marked invalid - link detected errors when the application was 
  5355.          created. 
  5356.  
  5357.  193  ERROR_BAD_EXE_FORMAT 
  5358.          Invalid EXE format - file is a DOS mode program or an improper 
  5359.          program. 
  5360.  
  5361.  194  ERROR_ITERATED_DATA_EXCEEDS_64k 
  5362.          Iterated data exceeds 64KB - there is more than 64KB of data in one of 
  5363.          the segments of the file. 
  5364.  
  5365.  195  ERROR_INVALID_MINALLOCSIZE 
  5366.          Invalid minimum allocation size - the size is specified to be less 
  5367.          than the size of the segment data in the file. 
  5368.  
  5369.  196  ERROR_DYNLINK_FROM_INVALID_RING 
  5370.          Dynamic link from invalid privilege level - privilege level 2 routine 
  5371.          cannot link to dynamic-link libraries. 
  5372.  
  5373.  197  ERROR_IOPL_NOT_ENABLED 
  5374.          IOPL not enabled - IOPL set to NO in CONFIG.SYS. 
  5375.  
  5376.  198  ERROR_INVALID_SEGDPL 
  5377.          Invalid segment descriptor privilege level - can only have privilege 
  5378.          levels of 2 and 3. 
  5379.  
  5380.  199  ERROR_AUTODATASEG_EXCEEDS_64k 
  5381.          Automatic data segment exceeds 64KB. 
  5382.  
  5383.  
  5384. ΓòÉΓòÉΓòÉ <hidden> Errors 200 to 299 ΓòÉΓòÉΓòÉ
  5385.  
  5386. The following shows the numerical value of an error, its symbolic name, and a 
  5387. brief description of the error. 
  5388.  
  5389.  200  ERROR_RING2SEG_MUST_BE_MOVABLE 
  5390.          Privilege level 2 segment must be movable. 
  5391.  
  5392.  201  ERROR_RELOC_CHAIN_XEEDS_SEGLIM 
  5393.          Relocation chain exceeds segment limit. 
  5394.  
  5395.  202  ERROR_INFLOOP_IN_RELOC_CHAIN 
  5396.          Infinite loop in relocation chain segment. 
  5397.  
  5398.  203  ERROR_ENVVAR_NOT_FOUND 
  5399.          Environment variable not found. 
  5400.  
  5401.  204  ERROR_NOT_CURRENT_CTRY 
  5402.          Not current country. 
  5403.  
  5404.  205  ERROR_NO_SIGNAL_SENT 
  5405.          No signal sent - no process in the command subtree has a signal 
  5406.          handler. 
  5407.  
  5408.  206  ERROR_FILENAME_EXCED_RANGE 
  5409.          File name or extension is greater than 8.3 characters. 
  5410.  
  5411.  207  ERROR_RING2_STACK_IN_USE 
  5412.          Privilege level 2 stack is in use. 
  5413.  
  5414.  208  ERROR_META_EXPANSION_TOO_LONG 
  5415.          Meta (global) expansion is too long. 
  5416.  
  5417.  209  ERROR_INVALID_SIGNAL_NUMBER 
  5418.          Invalid signal number. 
  5419.  
  5420.  210  ERROR_THREAD_1_INACTIVE 
  5421.          Inactive thread. 
  5422.  
  5423.  211  ERROR_INFO_NOT_AVAIL 
  5424.          File system information is not available for this file. 
  5425.  
  5426.  212  ERROR_LOCKED 
  5427.          Locked error. 
  5428.  
  5429.  213  ERROR_BAD_DYNALINK 
  5430.          Attempted to execute a non-family API in DOS mode. 
  5431.  
  5432.  214  ERROR_TOO_MANY_MODULES 
  5433.          Too many modules. 
  5434.  
  5435.  215  ERROR_NESTING_NOT_ALLOWED 
  5436.          Nesting is not allowed. 
  5437.  
  5438.  216  ERROR_CANNOT_SHRINK 
  5439.          System error. 
  5440.  
  5441.  217  ERROR_ZOMBIE_PROCESS 
  5442.          Zombie process. 
  5443.  
  5444.  218  ERROR_STACK_IN_HIGH_MEMORY 
  5445.          Stack is in high memory. 
  5446.  
  5447.  219  ERROR_INVALID_EXITROUTINE_RING 
  5448.          Invalid exit routine ring. 
  5449.  
  5450.  220  ERROR_GETBUF_FAILED 
  5451.          Get buffer failed. 
  5452.  
  5453.  221  ERROR_FLUSHBUF_FAILED 
  5454.          Flush buffer failed. 
  5455.  
  5456.  222  ERROR_TRANSFER_TOO_LONG 
  5457.          Transfer is too long. 
  5458.  
  5459.  223  ERROR_FORCENOSWAP_FAILED 
  5460.          System error. 
  5461.  
  5462.  224  ERROR_SMG_NO_TARGET_WINDOW 
  5463.          The application window was created without the FCF_TASKLIST style, or 
  5464.          the application window not yet been created or has already been 
  5465.          destroyed. 
  5466.  
  5467.  228  ERROR_NO_CHILDREN 
  5468.          No child process. 
  5469.  
  5470.  229  ERROR_INVALID_SCREEN_GROUP 
  5471.          Invalid session. 
  5472.  
  5473.  230  ERROR_BAD_PIPE 
  5474.          Non-existent pipe or invalid operation. 
  5475.  
  5476.  231  ERROR_PIPE_BUSY 
  5477.          Pipe is busy. 
  5478.  
  5479.  232  ERROR_NO_DATA 
  5480.          No data available on non-blocking read. 
  5481.  
  5482.  233  ERROR_PIPE_NOT_CONNECTED 
  5483.          Pipe was disconnected by server. 
  5484.  
  5485.  234  ERROR_MORE_DATA 
  5486.          More data is available. 
  5487.  
  5488.  240  ERROR_VC_DISCONNECTED 
  5489.          Session was dropped due to errors. 
  5490.  
  5491.  250  ERROR_CIRCULARITY_REQUESTED 
  5492.          Renaming a directory that would cause a circularity problem. 
  5493.  
  5494.  251  ERROR_DIRECTORY_IN_CDS 
  5495.          Renaming a directory that is in use. 
  5496.  
  5497.  252  ERROR_INVALID_FSD_NAME 
  5498.          Trying to access nonexistent FSD. 
  5499.  
  5500.  253  ERROR_INVALID_PATH 
  5501.          Invalid pseudo device. 
  5502.  
  5503.  254  ERROR_INVALID_EA_NAME 
  5504.          Invalid character in name, or invalid cbName. 
  5505.  
  5506.  255  ERROR_EA_LIST_INCONSISTENT 
  5507.          List does not match its size, or there are invalid EAs in the list. 
  5508.  
  5509.  256  ERROR_EA_LIST_TOO_LONG 
  5510.          FEAList is longer than 64K-1 bytes. 
  5511.  
  5512.  257  ERROR_NO_META_MATCH 
  5513.          String does not match expression. 
  5514.  
  5515.  258  ERROR_FINDNOTIFY_TIMEOUT 
  5516.          System error. 
  5517.  
  5518.  259  ERROR_NO_MORE_ITEMS 
  5519.          DosQueryFSAttach ordinal query. 
  5520.  
  5521.  260  ERROR_SEARCH_STRUC_REUSED 
  5522.          DOS mode findfirst/next search structure reused. 
  5523.  
  5524.  261  ERROR_CHAR_NOT_FOUND 
  5525.          Character not found. 
  5526.  
  5527.  262  ERROR_TOO_MUCH_STACK 
  5528.          Stack request exceeds system limit. 
  5529.  
  5530.  263  ERROR_INVALID_ATTR 
  5531.          Invalid attribute. 
  5532.  
  5533.  264  ERROR_INVALID_STARTING_RING 
  5534.          Invalid starting ring. 
  5535.  
  5536.  265  ERROR_INVALID_DLL_INIT_RING 
  5537.          Invalid DLL INIT ring. 
  5538.  
  5539.  266  ERROR_CANNOT_COPY 
  5540.          Cannot copy. 
  5541.  
  5542.  267  ERROR_DIRECTORY 
  5543.          Used by DOSCOPY in doscall1. 
  5544.  
  5545.  268  ERROR_OPLOCKED_FILE 
  5546.          Oplocked file. 
  5547.  
  5548.  269  ERROR_OPLOCK_THREAD_EXISTS 
  5549.          Oplock thread exists. 
  5550.  
  5551.  270  ERROR_VOLUME_CHANGED 
  5552.          Volume changed. 
  5553.  
  5554.  271  ERROR_FINDNOTIFY_HANDLE_IN_USE 
  5555.          Handle in use. 
  5556.  
  5557.  272  ERROR_FINDNOTIFY_HANDLE_CLOSED 
  5558.          Handle closed. 
  5559.  
  5560.  273  ERROR_NOTIFY_OBJECT_REMOVED 
  5561.          Object removed. 
  5562.  
  5563.  274  ERROR_ALREADY_SHUTDOWN 
  5564.          System is already shut down. 
  5565.  
  5566.  275  ERROR_EAS_DIDNT_FIT 
  5567.          Buffer is not big enough to hold the EAs. 
  5568.  
  5569.  276  ERROR_EA_FILE_CORRUPT 
  5570.          EA file has been damaged. 
  5571.  
  5572.  277  ERROR_EA_TABLE_FULL 
  5573.          EA table is full. 
  5574.  
  5575.  278  ERROR_INVALID_EA_HANDLE 
  5576.          EA handle is invalid. 
  5577.  
  5578.  279  ERROR_NO_CLUSTER 
  5579.          No cluster. 
  5580.  
  5581.  280  ERROR_CREATE_EA_FILE 
  5582.          Cannot create the EA file. 
  5583.  
  5584.  281  ERROR_CANNOT_OPEN_EA_FILE 
  5585.          Cannot open the EA file. 
  5586.  
  5587.  282  ERROR_EAS_NOT_SUPPORTED 
  5588.          Destination file system does not support EAs. 
  5589.  
  5590.  283  ERROR_NEED_EAS_FOUND 
  5591.          Destination file system does not support EAs, and the source file's 
  5592.          EAs contain a need EA. 
  5593.  
  5594.  284  ERROR_DUPLICATE_HANDLE 
  5595.          The handle already exists. 
  5596.  
  5597.  285  ERROR_DUPLICATE_NAME 
  5598.          The name already exists. 
  5599.  
  5600.  286  ERROR_EMPTY_MUXWAIT 
  5601.          The list of semaphores in a muxwait semaphore is empty. 
  5602.  
  5603.  287  ERROR_MUTEX_OWNED 
  5604.          The calling thread owns one or more of the mutex semaphores in the 
  5605.          list. 
  5606.  
  5607.  288  ERROR_NOT_OWNER 
  5608.          Caller does not own the semaphore. 
  5609.  
  5610.  289  ERROR_PARAM_TOO_SMALL 
  5611.          Parameter is not large enough to contain all of the semaphore records 
  5612.          in the muxwait semaphore. 
  5613.  
  5614.  290  ERROR_TOO_MANY_HANDLES 
  5615.          Limit reached for number of handles. 
  5616.  
  5617.  291  ERROR_TOO_MANY_OPENS 
  5618.          There are too many files or semaphores open. 
  5619.  
  5620.  292  ERROR_WRONG_TYPE 
  5621.          Attempted to create wrong type of semaphore. 
  5622.  
  5623.  293  ERROR_UNUSED_CODE 
  5624.          Code is not used. 
  5625.  
  5626.  294  ERROR_THREAD_NOT_TERMINATED 
  5627.          Thread has not terminated. 
  5628.  
  5629.  295  ERROR_INIT_ROUTINE_FAILED 
  5630.          Initialization routine failed. 
  5631.  
  5632.  296  ERROR_MODULE_IN_USE 
  5633.          Module is in use. 
  5634.  
  5635.  297  ERROR_NOT_ENOUGH_WATCHPOINTS 
  5636.          There are not enough watchpoints. 
  5637.  
  5638.  298  ERROR_TOO_MANY_POSTS 
  5639.          Post count limit was reached for an event semaphore. 
  5640.  
  5641.  299  ERROR_ALREADY_POSTED 
  5642.          Event semaphore is already posted. 
  5643.  
  5644.  
  5645. ΓòÉΓòÉΓòÉ <hidden> Errors 300 to 399 ΓòÉΓòÉΓòÉ
  5646.  
  5647. The following shows the numerical value of an error, its symbolic name, and a 
  5648. brief description of the error. 
  5649.  
  5650.  300  ERROR_ALREADY_RESET 
  5651.          Event semaphore is already reset. 
  5652.  
  5653.  301  ERROR_SEM_BUSY 
  5654.          Semaphore is busy. 
  5655.  
  5656.  302  Reserved 
  5657.  
  5658.  303  ERROR_INVALID_PROCID 
  5659.          Invalid process identity. 
  5660.  
  5661.  304  ERROR_INVALID_PDELTA 
  5662.          Invalid priority delta. 
  5663.  
  5664.  305  ERROR_NOT_DESCENDANT 
  5665.          Not descendant. 
  5666.  
  5667.  306  ERROR_NOT_SESSION_MANAGER 
  5668.          Requestor not session manager. 
  5669.  
  5670.  307  ERROR_INVALID_PCLASS 
  5671.          Invalid P class. 
  5672.  
  5673.  308  ERROR_INVALID_SCOPE 
  5674.          Invalid scope. 
  5675.  
  5676.  309  ERROR_INVALID_THREADID 
  5677.          Invalid thread identity. 
  5678.  
  5679.  310  ERROR_DOSSUB_SHRINK 
  5680.          Cannot shrink segment - DosSubSetMem. 
  5681.  
  5682.  311  ERROR_DOSSUB_NOMEM 
  5683.          No memory to satisfy request - DosSubAllocMem. 
  5684.  
  5685.  312  ERROR_DOSSUB_OVERLAP 
  5686.          Overlap of the specified block with a block of allocated memory - 
  5687.          DosSubFreeMem. 
  5688.  
  5689.  313  ERROR_DOSSUB_BADSIZE 
  5690.          Invalid size parameter - DosSubAllocMem or DosSubFreeMem. 
  5691.  
  5692.  314  ERROR_DOSSUB_BADFLAG 
  5693.          Invalid flag parameter - DosSubSetMem. 
  5694.  
  5695.  315  ERROR_DOSSUB_BADSELECTOR 
  5696.          Invalid segment selector. 
  5697.  
  5698.  316  ERROR_MR_MSG_TOO_LONG 
  5699.          Message too long for buffer. 
  5700.  
  5701.  317  ERROR_MR_MID_NOT_FOUND 
  5702.          Message identity number not found. 
  5703.  
  5704.  318  ERROR_MR_UN_ACC_MSGF 
  5705.          Unable to access message file. 
  5706.  
  5707.  319  ERROR_MR_INV_MSGF_FORMAT 
  5708.          Invalid message file format. 
  5709.  
  5710.  320  ERROR_MR_INV_IVCOUNT 
  5711.          Invalid insertion variable count. 
  5712.  
  5713.  321  ERROR_MR_UN_PERFORM 
  5714.          Unable to perform function. 
  5715.  
  5716.  322  ERROR_TS_WAKEUP 
  5717.          Unable to wake up. 
  5718.  
  5719.  323  ERROR_TS_SEMHANDLE 
  5720.          Invalid system semaphore. 
  5721.  
  5722.  324  ERROR_TS_NOTIMER 
  5723.          No timers available. 
  5724.  
  5725.  326  ERROR_TS_HANDLE 
  5726.          Invalid timer handle. 
  5727.  
  5728.  327  ERROR_TS_DATETIME 
  5729.          Date or time invalid. 
  5730.  
  5731.  328  ERROR_SYS_INTERNAL 
  5732.          Internal system error. 
  5733.  
  5734.  329  ERROR_QUE_CURRENT_NAME 
  5735.          Current queue name does not exist. 
  5736.  
  5737.  330  ERROR_QUE_PROC_NOT_OWNED 
  5738.          Current process does not own queue. 
  5739.  
  5740.  331  ERROR_QUE_PROC_OWNED 
  5741.          Current process owns queue. 
  5742.  
  5743.  332  ERROR_QUE_DUPLICATE 
  5744.          Duplicate queue name. 
  5745.  
  5746.  333  ERROR_QUE_ELEMENT_NOT_EXIST 
  5747.          Queue element does not exist. 
  5748.  
  5749.  334  ERROR_QUE_NO_MEMORY 
  5750.          Inadequate queue memory. 
  5751.  
  5752.          For DosOpenQueue, DosCreateQueue, and DosWriteQueue, the following 
  5753.          applies: These calls use a system-wide pool of memory. Every 
  5754.          DosOpenQueue and DosCreateQueue uses up 34 bytes of memory, which is 
  5755.          freed on close. Every DosWriteQueue uses 24 bytes of memory, which is 
  5756.          freed on read. If too many elements are written to queues, further 
  5757.          opens, creates, reads, or writes fail with this error code. 
  5758.  
  5759.  335  ERROR_QUE_INVALID_NAME 
  5760.          Invalid queue name. 
  5761.  
  5762.  336  ERROR_QUE_INVALID_PRIORITY 
  5763.          Invalid queue priority parameter. 
  5764.  
  5765.  337  ERROR_QUE_INVALID_HANDLE 
  5766.          Invalid queue handle. 
  5767.  
  5768.  338  ERROR_QUE_LINK_NOT_FOUND 
  5769.          Queue link not found. 
  5770.  
  5771.  339  ERROR_QUE_MEMORY_ERROR 
  5772.          Queue memory error. 
  5773.  
  5774.  340  ERROR_QUE_PREV_AT_END 
  5775.          Previous queue element was at end of queue. 
  5776.  
  5777.  341  ERROR_QUE_PROC_NO_ACCESS 
  5778.          Process does not have access to queues. 
  5779.  
  5780.  342  ERROR_QUE_EMPTY 
  5781.          Queue is empty. 
  5782.  
  5783.  343  ERROR_QUE_NAME_NOT_EXIST 
  5784.          Queue name does not exist. 
  5785.  
  5786.  344  ERROR_QUE_NOT_INITIALIZED 
  5787.          Queues not initialized. 
  5788.  
  5789.  345  ERROR_QUE_UNABLE_TO_ACCESS 
  5790.          Unable to access queues. 
  5791.  
  5792.  346  ERROR_QUE_UNABLE_TO_ADD 
  5793.          Unable to add new queue. 
  5794.  
  5795.  347  ERROR_QUE_UNABLE_TO_INIT 
  5796.          Unable to initialize queues. 
  5797.  
  5798.  349  ERROR_VIO_INVALID_MASK 
  5799.          Invalid function replaced. 
  5800.  
  5801.  350  ERROR_VIO_PTR 
  5802.          Invalid pointer to parameter. 
  5803.  
  5804.  351  ERROR_VIO_APTR 
  5805.          Invalid pointer to attribute. 
  5806.  
  5807.  352  ERROR_VIO_RPTR 
  5808.          Invalid pointer to row. 
  5809.  
  5810.  353  ERROR_VIO_CPTR 
  5811.          Invalid pointer to column. 
  5812.  
  5813.  354  ERROR_VIO_LPTR 
  5814.          Invalid pointer to length. 
  5815.  
  5816.  355  ERROR_VIO_MODE 
  5817.          Unsupported screen mode. 
  5818.  
  5819.  356  ERROR_VIO_WIDTH 
  5820.          Invalid cursor width value. 
  5821.  
  5822.  357  ERROR_VIO_ATTR 
  5823.          Invalid cursor attribute value. 
  5824.  
  5825.  358  ERROR_VIO_ROW 
  5826.          Invalid row value. 
  5827.  
  5828.  359  ERROR_VIO_COL 
  5829.          Invalid column value. 
  5830.  
  5831.  360  ERROR_VIO_TOPROW 
  5832.          Invalid TopRow value. 
  5833.  
  5834.  361  ERROR_VIO_BOTROW 
  5835.          Invalid BotRow value. 
  5836.  
  5837.  362  ERROR_VIO_RIGHTCOL 
  5838.          Invalid right column value. 
  5839.  
  5840.  363  ERROR_VIO_LEFTCOL 
  5841.          Invalid left column value. 
  5842.  
  5843.  364  ERROR_SCS_CALL 
  5844.          Call issued by other than session manager. 
  5845.  
  5846.  365  ERROR_SCS_VALUE 
  5847.          Value is not for save or restore. 
  5848.  
  5849.  366  ERROR_VIO_WAIT_FLAG 
  5850.          Invalid wait flag setting. 
  5851.  
  5852.  367  ERROR_VIO_UNLOCK 
  5853.          Screen not previously locked. 
  5854.  
  5855.  368  ERROR_SGS_NOT_SESSION_MGR 
  5856.          Caller not session manager. 
  5857.  
  5858.  369  ERROR_SMG_INVALID_SGID 
  5859.          Invalid session identity. 
  5860.  
  5861.  369  ERROR_SMG_INVALID_SESSION_ID 
  5862.          Invalid session ID. 
  5863.  
  5864.  370  ERROR_SMG_NOSG 
  5865.          No sessions available. 
  5866.  
  5867.  370  ERROR_SMG_NO_SESSIONS 
  5868.          No sessions available. 
  5869.  
  5870.  371  ERROR_SMG_GRP_NOT_FOUND 
  5871.          Session not found. 
  5872.  
  5873.  371  ERROR_SMG_SESSION_NOT_FOUND 
  5874.          Session not found. 
  5875.  
  5876.  372  ERROR_SMG_SET_TITLE 
  5877.          Title sent by shell or parent cannot be changed. 
  5878.  
  5879.  373  ERROR_KBD_PARAMETER 
  5880.          Invalid parameter to keyboard. 
  5881.  
  5882.  374  ERROR_KBD_NO_DEVICE 
  5883.          No device. 
  5884.  
  5885.  375  ERROR_KBD_INVALID_IOWAIT 
  5886.          Invalid I/O wait specified. 
  5887.  
  5888.  376  ERROR_KBD_INVALID_LENGTH 
  5889.          Invalid length for keyboard. 
  5890.  
  5891.  377  ERROR_KBD_INVALID_ECHO_MASK 
  5892.          Invalid echo mode mask. 
  5893.  
  5894.  378  ERROR_KBD_INVALID_INPUT_MASK 
  5895.          Invalid input mode mask. 
  5896.  
  5897.  379  ERROR_MON_INVALID_PARMS 
  5898.          Invalid parameters to DosMon. 
  5899.  
  5900.  380  ERROR_MON_INVALID_DEVNAME 
  5901.          Invalid device name string. 
  5902.  
  5903.  381  ERROR_MON_INVALID_HANDLE 
  5904.          Invalid device handle. 
  5905.  
  5906.  382  ERROR_MON_BUFFER_TOO_SMALL 
  5907.          Buffer too small. 
  5908.  
  5909.  383  ERROR_MON_BUFFER_EMPTY 
  5910.          Buffer is empty. 
  5911.  
  5912.  384  ERROR_MON_DATA_TOO_LARGE 
  5913.          Data record is too large. 
  5914.  
  5915.  385  ERROR_MOUSE_NO_DEVICE 
  5916.          Mouse device closed (invalid device handle). 
  5917.  
  5918.  386  ERROR_MOUSE_INV_HANDLE 
  5919.          Mouse device closed (invalid device handle). 
  5920.  
  5921.  387  ERROR_MOUSE_INV_PARMS 
  5922.          Parameters invalid for display mode. 
  5923.  
  5924.  388  ERROR_MOUSE_CANT_RESET 
  5925.          Function assigned and cannot be reset. 
  5926.  
  5927.  389  ERROR_MOUSE_DISPLAY_PARMS 
  5928.          Parameters invalid for display mode. 
  5929.  
  5930.  390  ERROR_MOUSE_INV_MODULE 
  5931.          Module not valid. 
  5932.  
  5933.  391  ERROR_MOUSE_INV_ENTRY_PT 
  5934.          Entry point not valid. 
  5935.  
  5936.  392  ERROR_MOUSE_INV_MASK 
  5937.          Function mask invalid. 
  5938.  
  5939.  393  NO_ERROR_MOUSE_NO_DATA 
  5940.          No valid data. 
  5941.  
  5942.  394  NO_ERROR_MOUSE_PTR_DRAWN 
  5943.          Pointer drawn. 
  5944.  
  5945.  395  ERROR_INVALID_FREQUENCY 
  5946.          Invalid frequency for beep. 
  5947.  
  5948.  396  ERROR_NLS_NO_COUNTRY_FILE 
  5949.          Cannot find COUNTRY.SYS file. 
  5950.  
  5951.  397  ERROR_NLS_OPEN_FAILED 
  5952.          Cannot open COUNTRY.SYS file. 
  5953.  
  5954.  398  ERROR_NLS_NO_CTRY_CODE 
  5955.          Country code not found. 
  5956.  
  5957.  398  ERROR_NO_COUNTRY_OR_CODEPAGE 
  5958.          Country code not found. 
  5959.  
  5960.  399  ERROR_NLS_TABLE_TRUNCATED 
  5961.          Table returned information truncated, buffer is too small. 
  5962.  
  5963.  
  5964. ΓòÉΓòÉΓòÉ <hidden> Errors 400 to 499 ΓòÉΓòÉΓòÉ
  5965.  
  5966. The following shows the numerical value of an error, its symbolic name, and a 
  5967. brief description of the error. 
  5968.  
  5969.  400  ERROR_NLS_BAD_TYPE 
  5970.          Selected type does not exist. 
  5971.  
  5972.  401  ERROR_NLS_TYPE_NOT_FOUND 
  5973.          Selected type is not in file. 
  5974.  
  5975.  402  ERROR_VIO_SMG_ONLY 
  5976.          Valid from session manager only. 
  5977.  
  5978.  403  ERROR_VIO_INVALID_ASCIIZ 
  5979.          Invalid ASCIIZ length. 
  5980.  
  5981.  404  ERROR_VIO_DEREGISTER 
  5982.          VioDeRegister not allowed. 
  5983.  
  5984.  405  ERROR_VIO_NO_POPUP 
  5985.          Pop-up window not allocated. 
  5986.  
  5987.  406  ERROR_VIO_EXISTING_POPUP 
  5988.          Pop-up window on screen (NoWait). 
  5989.  
  5990.  407  ERROR_KBD_SMG_ONLY 
  5991.          Valid from session manager only. 
  5992.  
  5993.  408  ERROR_KBD_INVALID_ASCIIZ 
  5994.          Invalid ASCIIZ length. 
  5995.  
  5996.  409  ERROR_KBD_INVALID_MASK 
  5997.          Invalid replacement mask. 
  5998.  
  5999.  410  ERROR_KBD_REGISTER 
  6000.          KbdRegister not allowed. 
  6001.  
  6002.  411  ERROR_KBD_DEREGISTER 
  6003.          KbdDeRegister not allowed. 
  6004.  
  6005.  412  ERROR_MOUSE_SMG_ONLY 
  6006.          Valid from session manager only. 
  6007.  
  6008.  413  ERROR_MOUSE_INVALID_ASCIIZ 
  6009.          Invalid ASCIIZ length. 
  6010.  
  6011.  414  ERROR_MOUSE_INVALID_MASK 
  6012.          Invalid replacement mask. 
  6013.  
  6014.  415  ERROR_MOUSE_REGISTER 
  6015.          Mouse register not allowed. 
  6016.  
  6017.  416  ERROR_MOUSE_DEREGISTER 
  6018.          Mouse deregister not allowed. 
  6019.  
  6020.  417  ERROR_SMG_BAD_ACTION 
  6021.          Invalid action specified. 
  6022.  
  6023.  418  ERROR_SMG_INVALID_CALL 
  6024.          INIT called more than once, or invalid session identity. 
  6025.  
  6026.  419  ERROR_SCS_SG_NOTFOUND 
  6027.          New session number. 
  6028.  
  6029.  420  ERROR_SCS_NOT_SHELL 
  6030.          Caller is not shell. 
  6031.  
  6032.  421  ERROR_VIO_INVALID_PARMS 
  6033.          Invalid parameters passed. 
  6034.  
  6035.  422  ERROR_VIO_FUNCTION_OWNED 
  6036.          Save/restore already owned. 
  6037.  
  6038.  423  ERROR_VIO_RETURN 
  6039.          Non-destruct return (undo). 
  6040.  
  6041.  424  ERROR_SCS_INVALID_FUNCTION 
  6042.          Caller invalid function. 
  6043.  
  6044.  425  ERROR_SCS_NOT_SESSION_MGR 
  6045.          Caller not session manager. 
  6046.  
  6047.  426  ERROR_VIO_REGISTER 
  6048.          Vio register not allowed. 
  6049.  
  6050.  427  ERROR_VIO_NO_MODE_THREAD 
  6051.          No mode restore thread in SG. 
  6052.  
  6053.  428  ERROR_VIO_NO_SAVE_RESTORE_THD 
  6054.          No save/restore thread in SG. 
  6055.  
  6056.  429  ERROR_VIO_IN_BG 
  6057.          Function invalid in background. 
  6058.  
  6059.  430  ERROR_VIO_ILLEGAL_DURING_POPUP 
  6060.          Function not allowed during pop-up window. 
  6061.  
  6062.  431  ERROR_SMG_NOT_BASESHELL 
  6063.          Caller is not the base shell. 
  6064.  
  6065.  432  ERROR_SMG_BAD_STATUSREQ 
  6066.          Invalid status requested. 
  6067.  
  6068.  433  ERROR_QUE_INVALID_WAIT 
  6069.          NoWait parameter out of bounds. 
  6070.  
  6071.  434  ERROR_VIO_LOCK 
  6072.          Error returned from Scroll Lock. 
  6073.  
  6074.  435  ERROR_MOUSE_INVALID_IOWAIT 
  6075.          Invalid parameters for IOWait. 
  6076.  
  6077.  436  ERROR_VIO_INVALID_HANDLE 
  6078.          Invalid VIO handle. 
  6079.  
  6080.  437  ERROR_VIO_ILLEGAL_DURING_LOCK 
  6081.          Function not allowed during screen lock. 
  6082.  
  6083.  438  ERROR_VIO_INVALID_LENGTH 
  6084.          Invalid VIO length. 
  6085.  
  6086.  439  ERROR_KBD_INVALID_HANDLE 
  6087.          Invalid KBD handle. 
  6088.  
  6089.  440  ERROR_KBD_NO_MORE_HANDLE 
  6090.          Ran out of handles. 
  6091.  
  6092.  441  ERROR_KBD_CANNOT_CREATE_KCB 
  6093.          Unable to create kcb. 
  6094.  
  6095.  442  ERROR_KBD_CODEPAGE_LOAD_INCOMPL 
  6096.          Unsuccessful code-page load. 
  6097.  
  6098.  443  ERROR_KBD_INVALID_CODEPAGE_ID 
  6099.          Invalid code-page identity. 
  6100.  
  6101.  444  ERROR_KBD_NO_CODEPAGE_SUPPORT 
  6102.          No code page support. 
  6103.  
  6104.  445  ERROR_KBD_FOCUS_REQUIRED 
  6105.          Keyboard focus required. 
  6106.  
  6107.  446  ERROR_KBD_FOCUS_ALREADY_ACTIVE 
  6108.          Calling thread has an outstanding focus. 
  6109.  
  6110.  447  ERROR_KBD_KEYBOARD_BUSY 
  6111.          Keyboard is busy. 
  6112.  
  6113.  448  ERROR_KBD_INVALID_CODEPAGE 
  6114.          Invalid code page. 
  6115.  
  6116.  449  ERROR_KBD_UNABLE_TO_FOCUS 
  6117.          Focus attempt failed. 
  6118.  
  6119.  450  ERROR_SMG_SESSION_NON_SELECT 
  6120.          Session is not selectable. 
  6121.  
  6122.  451  ERROR_SMG_SESSION_NOT_FOREGRND 
  6123.          Parent/child session is not foreground. 
  6124.  
  6125.  452  ERROR_SMG_SESSION_NOT_PARENT 
  6126.          Not parent of requested child. 
  6127.  
  6128.  453  ERROR_SMG_INVALID_START_MODE 
  6129.          Invalid session start mode. 
  6130.  
  6131.  454  ERROR_SMG_INVALID_RELATED_OPT 
  6132.          Invalid session start related option. 
  6133.  
  6134.  455  ERROR_SMG_INVALID_BOND_OPTION 
  6135.          Invalid session bond option. 
  6136.  
  6137.  456  ERROR_SMG_INVALID_SELECT_OPT 
  6138.          Invalid session select option. 
  6139.  
  6140.  457  ERROR_SMG_START_IN_BACKGROUND 
  6141.          Session started in background. 
  6142.  
  6143.  458  ERROR_SMG_INVALID_STOP_OPTION 
  6144.          Invalid session stop option. 
  6145.  
  6146.  459  ERROR_SMG_BAD_RESERVE 
  6147.          Reserved parameters are not zero. 
  6148.  
  6149.  460  ERROR_SMG_PROCESS_NOT_PARENT 
  6150.          Session parent process already exists. 
  6151.  
  6152.  461  ERROR_SMG_INVALID_DATA_LENGTH 
  6153.          Invalid data length. 
  6154.  
  6155.  462  ERROR_SMG_NOT_BOUND 
  6156.          Parent is not bound. 
  6157.  
  6158.  463  ERROR_SMG_RETRY_SUB_ALLOC 
  6159.          Retry request block allocation. 
  6160.  
  6161.  464  ERROR_KBD_DETACHED 
  6162.          This call is not allowed for a detached PID. 
  6163.  
  6164.  465  ERROR_VIO_DETACHED 
  6165.          This call is not allowed for a detached PID. 
  6166.  
  6167.  466  ERROR_MOU_DETACHED 
  6168.          This call is not allowed for a detached PID. 
  6169.  
  6170.  467  ERROR_VIO_FONT 
  6171.          No font is available to support the mode. 
  6172.  
  6173.  468  ERROR_VIO_USER_FONT 
  6174.          User font is active. 
  6175.  
  6176.  469  ERROR_VIO_BAD_CP 
  6177.          Invalid code page specified. 
  6178.  
  6179.  470  ERROR_VIO_NO_CP 
  6180.          System displays do not support code page. 
  6181.  
  6182.  471  ERROR_VIO_NA_CP 
  6183.          Current display does not support code page. 
  6184.  
  6185.  472  ERROR_INVALID_CODE_PAGE 
  6186.          Invalid code page. 
  6187.  
  6188.  473  ERROR_CPLIST_TOO_SMALL 
  6189.          Code page list is too small. 
  6190.  
  6191.  474  ERROR_CP_NOT_MOVED 
  6192.          Code page was not moved. 
  6193.  
  6194.  475  ERROR_MODE_SWITCH_INIT 
  6195.          Mode switch initialization error. 
  6196.  
  6197.  476  ERROR_CODE_PAGE_NOT_FOUND 
  6198.          Code page was not found. 
  6199.  
  6200.  477  ERROR_UNEXPECTED_SLOT_RETURNED 
  6201.          Internal error. 
  6202.  
  6203.  478  ERROR_SMG_INVALID_TRACE_OPTION 
  6204.          Invalid start session trace indicator. 
  6205.  
  6206.  479  ERROR_VIO_INTERNAL_RESOURCE 
  6207.          VIO internal resource error. 
  6208.  
  6209.  480  ERROR_VIO_SHELL_INIT 
  6210.          VIO shell initialization error. 
  6211.  
  6212.  481  ERROR_SMG_NO_HARD_ERRORS 
  6213.          No session manager hard errors. 
  6214.  
  6215.  482  ERROR_CP_SWITCH_INCOMPLETE 
  6216.          DosSetProcessCp is unable to set a KBD or VIO code page. 
  6217.  
  6218.  483  ERROR_VIO_TRANSPARENT_POPUP 
  6219.          Error during VIO pop-up window. 
  6220.  
  6221.  484  ERROR_CRITSEC_OVERFLOW 
  6222.          Critical section overflow. 
  6223.  
  6224.  485  ERROR_CRITSEC_UNDERFLOW 
  6225.          Critical section underflow. 
  6226.  
  6227.  486  ERROR_VIO_BAD_RESERVE 
  6228.          Reserved parameter is not zero. 
  6229.  
  6230.  487  ERROR_INVALID_ADDRESS 
  6231.          Invalid physical address. 
  6232.  
  6233.  488  ERROR_ZERO_SELECTORS_REQUESTED 
  6234.          At least one selector must be requested. 
  6235.  
  6236.  489  ERROR_NOT_ENOUGH_SELECTORS_AVA 
  6237.          Not enough GDT selectors to satisfy request. 
  6238.  
  6239.  490  ERROR_INVALID_SELECTOR 
  6240.          Not a GDT selector. 
  6241.  
  6242.  491  ERROR_SMG_INVALID_PROGRAM_TYPE 
  6243.          Invalid program type. 
  6244.  
  6245.  492  ERROR_SMG_INVALID_PGM_CONTROL 
  6246.          Invalid program control. 
  6247.  
  6248.  493  ERROR_SMG_INVALID_INHERIT_OPT 
  6249.          Invalid inherit option. 
  6250.  
  6251.  494  ERROR_VIO_EXTENDED_SG 
  6252.  
  6253.  495  ERROR_VIO_NOT_PRES_MGR_SG 
  6254.  
  6255.  496  ERROR_VIO_SHIELD_OWNED 
  6256.  
  6257.  497  ERROR_VIO_NO_MORE_HANDLES 
  6258.  
  6259.  498  ERROR_VIO_SEE_ERROR_LOG 
  6260.  
  6261.  499  ERROR_VIO_ASSOCIATED_DC 
  6262.  
  6263.  
  6264. ΓòÉΓòÉΓòÉ <hidden> Errors 500 to 599 ΓòÉΓòÉΓòÉ
  6265.  
  6266. The following shows the numerical value of an error, and its symbolic name. 
  6267.  
  6268.  500  ERROR_KBD_NO_CONSOLE 
  6269.  
  6270.  501  ERROR_MOUSE_NO_CONSOLE 
  6271.  
  6272.  502  ERROR_MOUSE_INVALID_HANDLE 
  6273.  
  6274.  503  ERROR_SMG_INVALID_DEBUG_PARMS 
  6275.  
  6276.  504  ERROR_KBD_EXTENDED_SG 
  6277.  
  6278.  505  ERROR_MOU_EXTENDED_SG 
  6279.  
  6280.  506  ERROR_SMG_INVALID_ICON_FILE 
  6281.  
  6282.  507  ERROR_TRC_PID_NON_EXISTENT 
  6283.  
  6284.  508  ERROR_TRC_COUNT_ACTIVE 
  6285.  
  6286.  509  ERROR_TRC_SUSPENDED_BY_COUNT 
  6287.  
  6288.  510  ERROR_TRC_COUNT_INACTIVE 
  6289.  
  6290.  511  ERROR_TRC_COUNT_REACHED 
  6291.  
  6292.  512  ERROR_NO_MC_TRACE 
  6293.  
  6294.  513  ERROR_MC_TRACE 
  6295.  
  6296.  514  ERROR_TRC_COUNT_ZERO 
  6297.  
  6298.  515  ERROR_SMG_TOO_MANY_DDS 
  6299.  
  6300.  516  ERROR_SMG_INVALID_NOTIFICATION 
  6301.  
  6302.  517  ERROR_LF_INVALID_FUNCTION 
  6303.  
  6304.  518  ERROR_LF_NOT_AVAIL 
  6305.  
  6306.  519  ERROR_LF_SUSPENDED 
  6307.  
  6308.  520  ERROR_LF_BUF_TOO_SMALL 
  6309.  
  6310.  521  ERROR_LF_BUFFER_CORRUPTED 
  6311.  
  6312.  521  ERROR_LF_BUFFER_FULL 
  6313.  
  6314.  522  ERROR_LF_INVALID_DAEMON 
  6315.  
  6316.  522  ERROR_LF_INVALID_RECORD 
  6317.  
  6318.  523  ERROR_LF_INVALID_TEMPL 
  6319.  
  6320.  523  ERROR_LF_INVALID_SERVICE 
  6321.  
  6322.  524  ERROR_LF_GENERAL_FAILURE 
  6323.  
  6324.  525  ERROR_LF_INVALID_ID 
  6325.  
  6326.  526  ERROR_LF_INVALID_HANDLE 
  6327.  
  6328.  527  ERROR_LF_NO_ID_AVAIL 
  6329.  
  6330.  528  ERROR_LF_TEMPLATE_AREA_FULL 
  6331.  
  6332.  529  ERROR_LF_ID_IN_USE 
  6333.  
  6334.  530  ERROR_MOU_NOT_INITIALIZED 
  6335.  
  6336.  531  ERROR_MOUINITREAL_DONE 
  6337.  
  6338.  532  ERROR_DOSSUB_CORRUPTED 
  6339.  
  6340.  533  ERROR_MOUSE_CALLER_NOT_SUBSYS 
  6341.  
  6342.  534  ERROR_ARITHMETIC_OVERFLOW 
  6343.  
  6344.  535  ERROR_TMR_NO_DEVICE 
  6345.  
  6346.  536  ERROR_TMR_INVALID_TIME 
  6347.  
  6348.  537  ERROR_PVW_INVALID_ENTITY 
  6349.  
  6350.  538  ERROR_PVW_INVALID_ENTITY_TYPE 
  6351.  
  6352.  539  ERROR_PVW_INVALID_SPEC 
  6353.  
  6354.  540  ERROR_PVW_INVALID_RANGE_TYPE 
  6355.  
  6356.  541  ERROR_PVW_INVALID_COUNTER_BLK 
  6357.  
  6358.  542  ERROR_PVW_INVALID_TEXT_BLK 
  6359.  
  6360.  543  ERROR_PRF_NOT_INITIALIZED 
  6361.  
  6362.  544  ERROR_PRF_ALREADY_INITIALIZED 
  6363.  
  6364.  545  ERROR_PRF_NOT_STARTED 
  6365.  
  6366.  546  ERROR_PRF_ALREADY_STARTED 
  6367.  
  6368.  547  ERROR_PRF_TIMER_OUT_OF_RANGE 
  6369.  
  6370.  548  ERROR_PRF_TIMER_RESET 
  6371.  
  6372.  549-599 Reserved. 
  6373.  
  6374.  
  6375. ΓòÉΓòÉΓòÉ <hidden> Errors 600 to 1999 ΓòÉΓòÉΓòÉ
  6376.  
  6377. The following shows the numerical value of an error, and its symbolic name. 
  6378.  
  6379.  600-638 Reserved. 
  6380.  
  6381.  639  ERROR_VDD_LOCK_USEAGE_DENIED 
  6382.  
  6383.  640  ERROR_TIMEOUT 
  6384.  
  6385.  641  ERROR_VDM_DOWN 
  6386.  
  6387.  642  ERROR_VDM_LIMIT 
  6388.  
  6389.  643  ERROR_VDD_NOT_FOUND 
  6390.  
  6391.  644  ERROR_INVALID_CALLER 
  6392.  
  6393.  645  ERROR_PID_MISMATCH 
  6394.  
  6395.  646  ERROR_INVALID_VDD_HANDLE 
  6396.  
  6397.  647  ERROR_VLPT_NO_SPOOLER 
  6398.  
  6399.  648  ERROR_VCOM_DEVICE_BUSY 
  6400.  
  6401.  649  ERROR_VLPT_DEVICE_BUSY 
  6402.  
  6403.  650  ERROR_NESTING_TOO_DEEP 
  6404.  
  6405.  651  ERROR_VDD_MISSING 
  6406.  
  6407.  691  ERROR_IMP_INVALID_PARM 
  6408.  
  6409.  692  ERROR_IMP_INVALID_LENGTH 
  6410.  
  6411.  693  MSG_HPFS_DISK_ERROR_WARN 
  6412.  
  6413.  730  ERROR_MON_BAD_BUFFER 
  6414.  
  6415.  731  ERROR_MODULE_CORRUPTED 
  6416.  
  6417.  732-1476 Reserved. 
  6418.  
  6419.  1477  ERROR_SM_OUTOF_SWAPFILE 
  6420.  
  6421.  1478-1999 Reserved. 
  6422.  
  6423.  
  6424. ΓòÉΓòÉΓòÉ <hidden> Errors 2000 to 59999 ΓòÉΓòÉΓòÉ
  6425.  
  6426. The following shows the numerical value of an error, and its symbolic name. 
  6427.  
  6428.  2000-2054 Reserved. 
  6429.  
  6430.  2055  ERROR_LF_TIMEOUT 
  6431.  
  6432.  2057  ERROR_LF_SUSPEND_SUCCESS 
  6433.  
  6434.  2058  ERROR_LF_RESUME_SUCCESS 
  6435.  
  6436.  2059  ERROR_LF_REDIRECT_SUCCESS 
  6437.  
  6438.  2060  ERROR_LF_REDIRECT_FAILURE 
  6439.  
  6440.  32768  ERROR_SWAPPER_NOT_ACTIVE 
  6441.  
  6442.  32769  ERROR_INVALID_SWAPID 
  6443.  
  6444.  32770  ERROR_IOERR_SWAP_FILE 
  6445.  
  6446.  32771  ERROR_SWAP_TABLE_FULL 
  6447.  
  6448.  32772  ERROR_SWAP_FILE_FULL 
  6449.  
  6450.  32773  ERROR_CANT_INIT_SWAPPER 
  6451.  
  6452.  32774  ERROR_SWAPPER_ALREADY_INIT 
  6453.  
  6454.  32775  ERROR_PMM_INSUFFICIENT_MEMORY 
  6455.  
  6456.  32776  ERROR_PMM_INVALID_FLAGS 
  6457.  
  6458.  32777  ERROR_PMM_INVALID_ADDRESS 
  6459.  
  6460.  32778  ERROR_PMM_LOCK_FAILED 
  6461.  
  6462.  32779  ERROR_PMM_UNLOCK_FAILED 
  6463.  
  6464.  32780  ERROR_PMM_MOVE_INCOMPLETE 
  6465.  
  6466.  32781  ERROR_UCOM_DRIVE_RENAMED 
  6467.  
  6468.  32782  ERROR_UCOM_FILENAME_TRUNCATED 
  6469.  
  6470.  32783  ERROR_UCOM_BUFFER_LENGTH 
  6471.  
  6472.  32784  ERROR_MON_CHAIN_HANDLE 
  6473.  
  6474.  32785  ERROR_MON_NOT_REGISTERED 
  6475.  
  6476.  32786  ERROR_SMG_ALREADY_TOP 
  6477.  
  6478.  32787  ERROR_PMM_ARENA_MODIFIED 
  6479.  
  6480.  32788  ERROR_SMG_PRINTER_OPEN 
  6481.  
  6482.  32789  ERROR_PMM_SET_FLAGS_FAILED 
  6483.  
  6484.  32790  ERROR_INVALID_DOS_DD 
  6485.  
  6486.  32791  ERROR_BLOCKED 
  6487.  
  6488.  32792  ERROR_NOBLOCK 
  6489.  
  6490.  32793  ERROR_INSTANCE_SHARED 
  6491.  
  6492.  32794  ERROR_NO_OBJECT 
  6493.  
  6494.  32795  ERROR_PARTIAL_ATTACH 
  6495.  
  6496.  32796  ERROR_INCACHE 
  6497.  
  6498.  32797  ERROR_SWAP_IO_PROBLEMS 
  6499.  
  6500.  32798  ERROR_CROSSES_OBJECT_BOUNDARY 
  6501.  
  6502.  32799  ERROR_LONGLOCK 
  6503.  
  6504.  32800  ERROR_SHORTLOCK 
  6505.  
  6506.  32801  ERROR_UVIRTLOCK 
  6507.  
  6508.  32802  ERROR_ALIASLOCK 
  6509.  
  6510.  32803  ERROR_ALIAS 
  6511.  
  6512.  32804  ERROR_NO_MORE_HANDLES 
  6513.  
  6514.  32805  ERROR_SCAN_TERMINATED 
  6515.  
  6516.  32806  ERROR_TERMINATOR_NOT_FOUND 
  6517.  
  6518.  32807  ERROR_NOT_DIRECT_CHILD 
  6519.  
  6520.  32808  ERROR_DELAY_FREE 
  6521.  
  6522.  32809  ERROR_GUARDPAGE 
  6523.  
  6524.  32900  ERROR_SWAPERROR 
  6525.  
  6526.  32901  ERROR_LDRERROR 
  6527.  
  6528.  32902  ERROR_NOMEMORY 
  6529.  
  6530.  32903  ERROR_NOACCESS 
  6531.  
  6532.  32904  ERROR_NO_DLL_TERM 
  6533.  
  6534.  32905-59999 Reserved. 
  6535.  
  6536.  
  6537. ΓòÉΓòÉΓòÉ <hidden> Errors 60000 to 65079 ΓòÉΓòÉΓòÉ
  6538.  
  6539. The following shows the numerical value of an error, and its symbolic name. 
  6540.  
  6541.  6000-65025 Reserved. 
  6542.  
  6543.  65026  ERROR_CPSIO_CODE_PAGE_INVALID 
  6544.  
  6545.  65027  ERROR_CPSIO_NO_SPOOLER 
  6546.  
  6547.  65028  ERROR_CPSIO_FONT_ID_INVALID 
  6548.  
  6549.  65029-65032 Reserved. 
  6550.  
  6551.  65033  ERROR_CPSIO_INTERNAL_ERROR 
  6552.  
  6553.  65034  ERROR_CPSIO_INVALID_PTR_NAME 
  6554.  
  6555.  65035-65036 Reserved. 
  6556.  
  6557.  65037  ERROR_CPSIO_NOT_ACTIVE 
  6558.  
  6559.  65038  Reserved. 
  6560.  
  6561.  65039  ERROR_CPSIO_PID_FULL 
  6562.  
  6563.  65040  ERROR_CPSIO_PID_NOT_FOUND 
  6564.  
  6565.  65041-65042 Reserved. 
  6566.  
  6567.  65043  ERROR_CPSIO_READ_CTL_SEQ 
  6568.  
  6569.  65044  Reserved. 
  6570.  
  6571.  65045  ERROR_CPSIO_READ_FNT_DEF 
  6572.  
  6573.  65046  Reserved. 
  6574.  
  6575.  65047  ERROR_CPSIO_WRITE_ERROR 
  6576.  
  6577.  65048  ERROR_CPSIO_WRITE_FULL_ERROR 
  6578.  
  6579.  65049  ERROR_CPSIO_WRITE_HANDLE_BAD 
  6580.  
  6581.  65050-65073 Reserved. 
  6582.  
  6583.  65074  ERROR_CPSIO_SWIT_LOAD 
  6584.  
  6585.  65075-65076 Reserved. 
  6586.  
  6587.  65077  ERROR_CPSIO_INV_COMMAND 
  6588.  
  6589.  65078  ERROR_CPSIO_NO_FONT_SWIT 
  6590.  
  6591.  65079  ERROR_ENTRY_IS_CALLGATE 
  6592.  
  6593.  
  6594. ΓòÉΓòÉΓòÉ 3. Debugging ΓòÉΓòÉΓòÉ
  6595.  
  6596. Debugging is the process of detecting, diagnosing, and eliminating errors in 
  6597. programs. A debugger application is designed to interact with and control the 
  6598. application that it is debugging. Because of the protected mode architecture of 
  6599. OS/2, special steps must be taken to enable a debugger application to perform 
  6600. its functions in the application being debugged (for example, to examine and 
  6601. manipulate memory locations in the address space of another process). 
  6602.  
  6603. The following topic is related to the information in this chapter: 
  6604.  
  6605.      Program execution and control 
  6606.  
  6607.  
  6608. ΓòÉΓòÉΓòÉ 3.1. About Debugging ΓòÉΓòÉΓòÉ
  6609.  
  6610. DosDebug  enables one application to control the execution of another 
  6611. application for debugging purposes. 
  6612.  
  6613. An application is selected for debugging when it is started. DosExecPgm and 
  6614. DosStartSession both have flags that can be used to specify that the 
  6615. application being started is to be controlled by the starting application. 
  6616.  
  6617. DosExecPgm starts an application within a new process. DosStartSession starts a 
  6618. new session within which one or more processes can be executing. See 
  6619. DosStartSession and DosExecPgm for details on how to start an application for 
  6620. debugging purposes. For information on processes and sessions, see Program 
  6621. Execution Control in this book. 
  6622.  
  6623. Once a process has been selected for debugging, DosDebug  is used to control 
  6624. its execution and to examine and manipulate its variables. 
  6625.  
  6626. DosDebug  provides a full set of debugging commands, including execution 
  6627. control commands-like single stepping and setting watchpoints-and commands to 
  6628. examine and manipulate the memory and registers of the process being debugged. 
  6629. The debugger process can access specific threads within a process being 
  6630. debugged and specific processes within a session being debugged. 
  6631.  
  6632. DosDebug  also has a rich set of notification messages to keep the debugger 
  6633. application informed of activities occurring during the execution of the 
  6634. application being debugged. 
  6635.  
  6636. The debugger application can use the session and process control functions 
  6637. described in Program Execution Control to control the child process or session 
  6638. being debugged. For example, the debugger can use DosSelectSession to switch 
  6639. itself, or the session being debugged, to the foreground. 
  6640.  
  6641.  
  6642. ΓòÉΓòÉΓòÉ 3.2. Using the Debugging Function ΓòÉΓòÉΓòÉ
  6643.  
  6644. DosDebug  provides a set of commands that permit one process to control another 
  6645. process for debugging. 
  6646.  
  6647. In the following code fragment, the calling process uses DosDebug  to modify a 
  6648. word in a controlled process. All the necessary steps have already been taken 
  6649. so that the calling process controls the second process-the process identifier 
  6650. of the controlled process has been placed into PID, the address of the word to 
  6651. be modified in the controlled process has been placed into Addr, and the value 
  6652. to be substituted in the controlled process has been placed into Value. 
  6653.  
  6654. (Due to the size of the debug_buffer data structure, the code fragment has been 
  6655. divided into two figures. If you were actually entering this into a program, 
  6656. the information would be together as if it were all one figure.) 
  6657.  
  6658. Note:  In the example code fragments that follow, error checking was left out 
  6659.        to conserve space. Applications should always check the return code that 
  6660.        the functions return. Control Program functions return an APIRET value. 
  6661.        A return code of 0 indicates success. If a non-zero value is returned, 
  6662.        an error occurred. 
  6663.  
  6664.   Type
  6665.     Debug_Buffer = record
  6666.      Pid:    Longint;     {  Debuggee Process ID        }
  6667.      Tid:    Longint;     {  Debuggee Thread ID         }
  6668.      Cmd:    Longint;     {  Command or Notification    }
  6669.      Value:  Longint;     {  Generic Data Value         }
  6670.      Addr:   Longint;     {  Debuggee Address           }
  6671.      Buffer: Longint;     {  Debugger Buffer Address    }
  6672.      Len:    Longint;     {  Length of Range            }
  6673.      Index:  Longint;     {  Generic Identifier Index   }
  6674.      MTE:    Longint;     {  Module Handle              }
  6675.      EAX:    Longint;     {  Register Set               }
  6676.      ECX:    Longint;
  6677.      EDX:    Longint;
  6678.      EBX:    Longint;
  6679.      ESP:    Longint;
  6680.      EBP:    Longint;
  6681.      ESI:    Longint;
  6682.      EDI:    Longint;
  6683.      EFlags: Longint;
  6684.      EIP:    Longint;
  6685.      CSLim:  Longint;     {  Byte Granular Limits }
  6686.      CSBase: Longint;     {  Byte Granular Base   }
  6687.      CSAcc:  Byte;        {  Access Rights        }
  6688.      CSAtr:  Byte;        {  Attributes           }
  6689.      CS:     SmallWord;
  6690.      DSLim:  Longint;
  6691.      DSBase: Longint;
  6692.      DSAcc:  Byte;
  6693.      DSAtr:  Byte;
  6694.      DS:     SmallWord;
  6695.      ESLim:  Longint;
  6696.      ESBase: Longint;
  6697.      ESAcc:  Byte;
  6698.      ESAtr:  Byte;
  6699.      ES:     SmallWord;
  6700.      FSLim:  Longint;
  6701.      FSBase: Longint;
  6702.      FSAcc:  Byte;
  6703.      FSAtr:  Byte;
  6704.      FS:     SmallWord;
  6705.      GSLim:  Longint;
  6706.      GSBase: Longint;
  6707.      GSAcc:  Byte;
  6708.      GSAtr:  Byte;
  6709.      GS:     SmallWord;
  6710.      SSLim:  Longint;
  6711.      SSBase: Longint;
  6712.      SSAcc:  Byte;
  6713.      SSAtr:  Byte;
  6714.      SS:     SmallWord;
  6715.     end;
  6716.  
  6717.   Uses
  6718.     Crt,Dos,Os2Def,Os2Base;
  6719.  
  6720.   Var
  6721.     UlPID  : ULONG;         (* Process ID of the controlled process *)
  6722.     UlAddr : ULONG;         (* Address in the controlled process    *)
  6723.     LValue : LONG;          (* Value to be substituted in the       *)
  6724.                             (* controlled process                   *)
  6725.     Ulrc   : APIRET;        (* Return code                          *)
  6726.     DbgBuf : debug_buffer;  (* Debug buffer                         *)
  6727.  
  6728.   Begin
  6729.  
  6730.       DbgBuf.Cmd := DBG_C_WriteMem;  (* Indicate that a Write Word           *)
  6731.                                      (* command is requested                 *)
  6732.  
  6733.       DbgBuf.Pid := ulPID;           (* Place PID of controlled process      *)
  6734.                                      (* into the debug buffer                *)
  6735.  
  6736.       DbgBuf.Addr := ulAddr;         (* Place the word address (within the   *)
  6737.                                      (* controlled process) into the debug   *)
  6738.                                      (* buffer                               *)
  6739.  
  6740.       DbgBuf.Value := lValue;        (* Place the value to be updated into   *)
  6741.                                      (* the specIfied word of the controlled *)
  6742.                                      (* process                              *)
  6743.  
  6744.       ulrc := DosDebug(DbgBuf);
  6745.  
  6746.       If (ulrc <> 0) Then Begin
  6747.         Write('DosDebug error: return code = ', ulrc);
  6748.         Halt;
  6749.       End;
  6750.  
  6751.       (* Be sure to check DbgBuf.Cmd for the notIfication returned by DosDebug *)
  6752.  
  6753.   End.
  6754.  
  6755.  The Cmd field in the debug buffer is used for two purposes. On input, the Cmd 
  6756.  field is used to pass the commands that direct DosDebug's activities. On 
  6757.  output, the Cmd field is used by DosDebug to return a notification indicating 
  6758.  the events and activities that occurred during the call. 
  6759.  
  6760.  If DosDebug returns no error, a notification resides in the Cmd field of the 
  6761.  debug buffer. The data returned with the notification varies, depending on the 
  6762.  command passed in the Cmd field of the debug buffer data structure when 
  6763.  DosDebug was called. 
  6764.  
  6765.  Not all fields in the debug buffer have to be defined on every DosDebug 
  6766.  command. The same field can have a different meaning in different DosDebug 
  6767.  commands. 
  6768.  
  6769.  Some notifications (such as DBG_N_ModuleLoad and DBG_N_NewProc) might require 
  6770.  multiple returns to the debugger. These additional, pending notifications will 
  6771.  be returned before the process being debugged is permitted to execute any more 
  6772.  user code, and will be returned on the Go, Single Step, or Stop commands. 
  6773.  
  6774.  Additional notifications can be pending at any time, so a debugger must be 
  6775.  ready to handle any notification any time a Go, Single Step, or Stop command 
  6776.  is called. 
  6777.  
  6778.  
  6779. ΓòÉΓòÉΓòÉ 3.3. Debugging on OS/2 Warp (PowerPC Edition) ΓòÉΓòÉΓòÉ
  6780.  
  6781. The following are the specific features available for debugging for OS/2 Warp 
  6782. (PowerPC Edition): 
  6783.  
  6784.    1. PowerPC-specific debug buffer: The debug buffer is specified in the value 
  6785.       field of DBG_C_Connect command as follows: 
  6786.  
  6787.           Intel: 
  6788.  
  6789.                       DBG_L_386
  6790.  
  6791.            This is not defined in bsedos.h. 
  6792.           PowerPC: 
  6793.  
  6794.                       DBG_L_PPC
  6795.  
  6796.            This is defined in bsedos.h. 
  6797.  
  6798.    2. PowerPC-specific functions: 
  6799.  
  6800.         a. DBG_C_ATTACH: This debug command has the following parameters: 
  6801.  
  6802.            PID            Process ID of debuggee 
  6803.  
  6804.            CMD            DBG_C_Attach 
  6805.  
  6806.            VALUE          DBG_L_PPC 
  6807.  
  6808.            This command is defined as follows: 
  6809.  
  6810.                For clients in bsedos.h 
  6811.                For servers in server\include\debug_types.h as follows: 
  6812.  
  6813.            This command returns: 
  6814.  
  6815.            DBG_N_Success            Attachment made 
  6816.  
  6817.            DBG_N_Error              Any OS/2-defined error 
  6818.  
  6819.            This command allows attaching to a currently running task. 
  6820.  
  6821.            Note:  A DBG_C_Connect does not need to be issued because 
  6822.            DBG_C_Attach will perform the connection.  Also, because the 
  6823.            debugger did not start the task, it will not have a parent/child 
  6824.            relationship as in a DBG_C_Connect. 
  6825.  
  6826.            DosDebug generates the following notifications: 
  6827.  
  6828.              1. DBG_N_ModuleLoad notifications for all loaded modules 
  6829.              2. DBG_N_ThreadCreate notifications for all active threads in task 
  6830.  
  6831.            Note:  Unlike DBG_C_Connect, there will not be any DBG_N_ModuleInit 
  6832.            notifications because the task is most likely already in _main. 
  6833.  
  6834.         b. DBG_C_Detach: This debug command has the following parameters: 
  6835.  
  6836.            PID            Process ID of debuggee 
  6837.  
  6838.            CMD            DBG_C_Detach 
  6839.  
  6840.            This command returns: 
  6841.  
  6842.            DBG_N_Success            Attachment made 
  6843.  
  6844.            DBG_N_Error              Any OS/2-defined error 
  6845.  
  6846.            This command detaches from attached and connected tasks. The 
  6847.            specified task is resumed and all debugging hooks are removed. 
  6848.  
  6849.            Note:  This is the only call that will cleanly turn off debugging 
  6850.            and resume the specified task. DBG_C_Term will kill the task whether 
  6851.            it was connected or attached. 
  6852.  
  6853.    3. PowerPC-specific notifications: are as follows: 
  6854.  
  6855.         a. DBG_N_ModuleInit: Module initialization routine about to run. This 
  6856.            notification is the same format as DBG_N_ModuleLoad. 
  6857.            CMD            DBG_N_ModuleInit 
  6858.  
  6859.            Value          MTE (module handle) 
  6860.  
  6861.            Addr           0 
  6862.         b. DBG_N_ReadyToRunMain: Debuggee thread 1 ready to run _start. Issued 
  6863.            after all import DLL Init/Term routines have completed. This allows 
  6864.            the debugger to know that the debugged task has finished loading and 
  6865.            is ready to run. 
  6866.  
  6867.            Note:  For descendant debuggee tasks, DBG_N_NewProc will be sent 
  6868.            instead. 
  6869.            CMD            DBG_N_ReadyToRunMain 
  6870.  
  6871.            Value          Process ID of debuggee 
  6872.  
  6873.    4. DBG_C_Go and DBG_C_SStep: will stop and return any pending notifications. 
  6874.  
  6875.    5. Serialization of command execution: All notifications other than 
  6876.       DBG_N_Success and DBG_N_Error must be acknowledged through DBG_C_Continue 
  6877.       before processing resumes or another notification can be grabbed.  Thus, 
  6878.       only GO/SStep and Stop (to prevent retrieving a pending notification) 
  6879.       will be prevented from running.  All other subcommands can be executed. 
  6880.  
  6881.       DosDebug informs the debugger that a notification has been returned, but 
  6882.       not acknowledged.  If you issue a Go/SStep/Stop and get the following 
  6883.       synchronous notification, then you must issue a DBG_C_Continue before 
  6884.       resuming execution. 
  6885.  
  6886.             rc := DosDebug() = 0;
  6887.                            puDB^.Cmd   := DBG_N_Error;
  6888.                            puDB^.Value := ERROR_INVALID_FUNCTION;
  6889.  
  6890.       The following code segments illustrate the use of various commands: 
  6891.  
  6892.             (*********************************************************************)
  6893.             (* Connect and grab all pending DBG_N_ThreadCreate, DBG_N_ModuleInit *)
  6894.             (* and DBG_N_ModuleLoad notIfications. Note, Stop returns            *)
  6895.             (* DBG_N_Success when there are no more notIfications.               *)
  6896.             (*********************************************************************)
  6897.  
  6898.               DBG_C_Connect
  6899.  
  6900.               DBG_C_Stop
  6901.               While ( puDB^.Cmd <> DBG_N_Success ) Do Begin
  6902.                 DBG_C_Continue w XCPT_CONTINUE_STOP
  6903.                 DBG_C_Stop
  6904.               End;
  6905.  
  6906.             (**********************************************************************)
  6907.             (* Go until certain notIfication occurs. This loop will also grab any *)
  6908.             (* pending notIfications that are outstanding since DBG_C_Go won't    *)
  6909.             (* execute If any notifications are pending.                          *)
  6910.             (**********************************************************************)
  6911.  
  6912.  
  6913.               DBG_C_Go
  6914.               While (debug_buffer^.Cmd <> NotIfication your looking for) Do Begin
  6915.  
  6916.                 DBG_C_Continue w XCPT_CONTINUE_STOP
  6917.                 DBG_C_GO
  6918.               End;
  6919.  
  6920.             (*********************************************************************)
  6921.             (* Clear all pending notIfications and acknowledge each notification *)
  6922.             (*********************************************************************)
  6923.  
  6924.               DBG_C_STOP
  6925.               While (debug_buffer^.Cmd <> DBG_N_Success) Do Begin
  6926.                 DBG_C_Continue w XCPT_CONTINUE_STOP
  6927.                 DBG_C_STOP
  6928.               End;
  6929.  
  6930.    6. Per task serialization of all DosDebug subcommands: A debugger can be 
  6931.       multi-threaded.  If the debugger issues subcommands for different tasks 
  6932.       they can run concurrently.  If the debugger issues subcommands for the 
  6933.       same task they will be serialized. 
  6934.  
  6935.    7. Breakpoint exceptions (trap word instruction): Debugger must increment IP 
  6936.       to next instruction (+4) whenever a breakpoint exception occurs. 
  6937.  
  6938.    8. DBG_N_Exception notification: Returns Thread ID of thread taking 
  6939.       exception in debug_buffer^.TID field. When responding to exception 
  6940.       notifications use the proper Thread ID in the DBG_C_Continue call. 
  6941.  
  6942.    9. Unsupported or not working for the PowerPC: 
  6943.  
  6944.         a. Calls to these commands will result in a DBG_C_Null: 
  6945.                DBG_C_XchngOpcode 
  6946.                DBG_C_RangeStep 
  6947.                DBG_C_MapRWAlias 
  6948.                DBG_C_UnMapAlias 
  6949.                DBG_C_MapROAlias 
  6950.                DBG_C_LinToSel 
  6951.                DBG_C_SelToLin 
  6952.         b. Global scope watchpoints: Watchpoint effective in the context of any 
  6953.            task currently not allowed. 
  6954.         c. Descendant (task or session) debugging not working. 
  6955.              1. EXEC_ASYNCRESULTDB: Tasking flag will act like EXEC_TRACE 
  6956.              2. SSF_TRACEOPT_TRACEALL:  Session flag will act like 
  6957.                 SSF_TRACEOPT_TRACE 
  6958.              3. DBG_N_ProcNew notification never sent 
  6959.  
  6960.   10. DBG_C_NumToAddr and DBG_AddrToNum: these functions are not fully 
  6961.       supported on the PowerPC as there meaning differs between Intel and 
  6962.       PowerPC architectures.  The following has been observed: 
  6963.  
  6964.         a. On Intel, this should be data segment.  It appears to be data 
  6965.            segment on the PowerPC: 
  6966.  
  6967.                         PBuf^.Cmd   := DBG_C_NumToAddr;
  6968.                         PBuf^.Value := 1;
  6969.  
  6970.         b. On Intel, this should be a code segment.  On the PowerPC, this is 
  6971.            invalid: 
  6972.  
  6973.                         PBuf^.Cmd   := DBG_C_NumToAddr;
  6974.                         PBuf^.Value := 2;
  6975.  
  6976.         c. On Intel, this should be invalid. On the PowerPC, this appears to be 
  6977.            code segment: 
  6978.  
  6979.                         PBuf^.Cmd   := DBG_C_NumToAddr;
  6980.                         PBuf^.Value := 0;
  6981.  
  6982.  
  6983. ΓòÉΓòÉΓòÉ 3.3.1. Summary of bsedos.h ΓòÉΓòÉΓòÉ
  6984.  
  6985. The following summarizes the contents of the header file bsedos.h. 
  6986.  
  6987.  
  6988. ΓòÉΓòÉΓòÉ 3.3.1.1. Debug Buffer for the PowerPC ΓòÉΓòÉΓòÉ
  6989.  
  6990.  
  6991. TYPE
  6992.   uDB = Record
  6993.     Pid            : ULONG; (* Debuggee Process id          *)
  6994.     Tid            : ULONG; (* Debuggee Thread id           *)
  6995.     Cmd            : LONG;  (* Command or Notification      *)
  6996.     Value          : LONG;  (* Generic Data Value           *)
  6997.     Addr           : ULONG; (* Debuggee Address             *)
  6998.     Buffer         : ULONG; (* Debugger Buffer Address      *)
  6999.     Len            : ULONG; (* Length of Range              *)
  7000.     Index          : ULONG; (* Generic Identifier Index     *)
  7001.     MTE            : ULONG; (* Module Table Entry Handle    *)
  7002.     Ctr            : ULONG; (* Count register               *)
  7003.     Lr             : ULONG; (* Link register                *)
  7004.     Xer            : ULONG; (* Integer Exception register   *)
  7005.     Msr            : ULONG; (* Machine State Register       *)
  7006.     Cr             : ULONG; (* Condition Register           *)
  7007.     Iar            : ULONG; (* Instruction pointer          *)
  7008.     GP_REGS        : Array[0..31] of ULONG; (* General Purpose registers    *)
  7009.   End;
  7010.  
  7011.  
  7012. ΓòÉΓòÉΓòÉ 3.3.1.2. DosDebug Command Numbers ΓòÉΓòÉΓòÉ
  7013.  
  7014. The following are the DosDebug command numbers: 
  7015.  
  7016.  
  7017. (* 16 is reserved               *)
  7018.  
  7019.  
  7020. The following defines are not implemented for the PowerPC and are translated to 
  7021. DBG_C_nil: 
  7022.  
  7023.  
  7024.  
  7025. The following defines are not yet implemented for the PowerPC: 
  7026.  
  7027.  
  7028.  
  7029. ΓòÉΓòÉΓòÉ 3.3.1.3. DosDebug Notification Numbers ΓòÉΓòÉΓòÉ
  7030.  
  7031. The following are the DosDebug notification numbers for the PowerPC: 
  7032.  
  7033.  
  7034.  
  7035. (*** NEW to PowerPC ***)
  7036. Init routines completed *)
  7037.  
  7038.  
  7039. ΓòÉΓòÉΓòÉ 3.3.1.4. DBG_T_ TState Values ΓòÉΓòÉΓòÉ
  7040.  
  7041. These are the possible values that can be returned in the TState field of the 
  7042. TStat structure.  These values identify scheduler state information: 
  7043.  
  7044.  
  7045.  
  7046. ΓòÉΓòÉΓòÉ 3.3.1.5. DosDebug Hardware-Specific Subcommands ΓòÉΓòÉΓòÉ
  7047.  
  7048. The following are the DosDebug PowerPC-specific subcommands: 
  7049.  
  7050.    1. Connect: 
  7051.  
  7052.               uDB.Value := DBG_L_PPC (* Debugging level number *)
  7053.  
  7054.       DBG_L_PPC is defined in bsedos.h. 
  7055.  
  7056.    2. ReadRegs and WriteRegs: 
  7057.  
  7058.       Uses the debug buffer defined in bsedos.h. 
  7059.  
  7060.    3. ReadCoRegs and WriteCoRegs: 
  7061.  
  7062.       PPC_FLOAT_STATE_SIZE is defined in public uKernel release tree in file 
  7063.       thread_status.h: 
  7064.  
  7065.  
  7066.               uDB.Value := DBG_CO_PPC           (* Coprocessor type identIfier       *)
  7067.               uDB.Len   ;= PPC_FLOAT_STATE_SIZE (* Size of coprocessor               *)
  7068.                                                 (* register context buffer           *)
  7069.  
  7070.       Note:  Not defined in bsedos.h. 
  7071.  
  7072.    4. ThrdStat. uDB.Len is the length of the thread status buffer, in bytes. 
  7073.       This field is four bytes (same as Intel). 
  7074.  
  7075.       Thread Status Buffer is the same as Intel and is not stored in bsedos.h. 
  7076.  
  7077.               TStat = record
  7078.                 DbgState:  Byte;            { Thread's Debugging State    }
  7079.                 TState:    Byte;            { Thread's Scheduler State    }
  7080.                 TPriority: SmallWord;       { Thread's Scheduler Priority }
  7081.               end;
  7082.  
  7083.       The following are defined in this Guide: 
  7084.  
  7085.       The following are defined in bsedos.h and in this Guide: 
  7086.  
  7087.    5. SetWatch: 
  7088.  
  7089.       uDB.Addr       Starting Address of Watchpoint 
  7090.  
  7091.       uDB.Len        Length of Watchpoint, in bytes 
  7092.  
  7093.       uDB.Index      Reserved (0) 
  7094.  
  7095.       uDB.Value      Watchpoint Type and Scope (same as Intel) 
  7096.  
  7097.                      Scopes         Only DBG_W_Local allowed. No DBG_W_Global 
  7098.                                     allowed. 
  7099.  
  7100.                      Types          DBG_W_Execute, DBG_W_Write, and 
  7101.                                     DBG_W_ReadWrite. 
  7102.  
  7103.       All defines are the same as the Intel defines, as described in this 
  7104.       Guide. 
  7105.  
  7106.       Note:  There are two types of Watchpoints: 
  7107.  
  7108.         a. Instruction (DBG_W_Execute).  Four bytes long and four byte aligned. 
  7109.  
  7110.         b. Data (DBG_W_Write, DBG_W_ReadWrite). Eight bytes long and eight byte 
  7111.            aligned. 
  7112.  
  7113.  
  7114.             601, 604 : 1 instruction WP, 1 data WP
  7115.             603      : 1 instruction WP
  7116.  
  7117.    6. Attach and Detach: 
  7118.  
  7119.       DBG_C_ATTACH - Debug command: 
  7120.  
  7121.       Parameters: 
  7122.  
  7123.       PID            Process ID of debuggee 
  7124.  
  7125.       CMD            DBG_C_Attach 
  7126.  
  7127.       VALUE          DBG_L_PPC (DBG_L_PPC - defined in bsedos.h) 
  7128.  
  7129.       Returns: 
  7130.  
  7131.       Note:  A DBG_C_Connect does not need to be issued because DBG_C_Attach 
  7132.       will perform the connection.  Also, because the debugger did not start 
  7133.       the task, it will not have a parent/child relationship as in a 
  7134.       DBG_C_Connect. 
  7135.  
  7136.       DBG_N_Success            Attachment made. 
  7137.  
  7138.       DBG_N_Error              All errors (for example, bad process id) 
  7139.  
  7140.       DosDebug will generate the following notifications: 
  7141.  
  7142.         a. DBG_N_ModuleLoad notifications for all loaded modules. 
  7143.         b. DBG_N_ThreadCreate notifications for all active threads in task. 
  7144.  
  7145.       Currently, descendant debugging is not working. 
  7146.  
  7147.       DBG_C_Detach - Debug command. 
  7148.  
  7149.       Parameters: 
  7150.  
  7151.       PID            Process ID of debuggee 
  7152.  
  7153.       CMD            DBG_C_Detach 
  7154.  
  7155.       Returns: 
  7156.  
  7157.       DBG_N_Success            Attachment made 
  7158.  
  7159.       DBG_N_Error              All errors (for example, bad process id) 
  7160.  
  7161.       Will detach from an attached or connected task. 
  7162.  
  7163.       Note:  This is the only call that will normally turn off debugging and 
  7164.       resume the specified task. DBG_C_Term will kill the task whether it was 
  7165.       connected or attached. 
  7166.  
  7167.  
  7168. ΓòÉΓòÉΓòÉ 3.4. DosDebug Commands ΓòÉΓòÉΓòÉ
  7169.  
  7170. The following table list describes the available commands. 
  7171.  
  7172. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7173. ΓöéCmd  ΓöéCommand Name        ΓöéDescription                        Γöé
  7174. ΓöéNo.  Γöé                    Γöé                                   Γöé
  7175. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7176. Γöé0    ΓöéDBG_C_Null          ΓöéNull                               Γöé
  7177. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7178. Γöé1    ΓöéDBG_C_ReadMem       ΓöéRead Word                          Γöé
  7179. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7180. Γöé1    ΓöéDBG_C_ReadMem_I     ΓöéRead Word                          Γöé
  7181. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7182. Γöé2    ΓöéDBG_C_ReadMem_D     ΓöéRead Word (same as 1)              Γöé
  7183. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7184. Γöé3    ΓöéDBG_C_ReadReg       ΓöéRead Register Set                  Γöé
  7185. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7186. Γöé4    ΓöéDBG_C_WriteMem      ΓöéWrite Word                         Γöé
  7187. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7188. Γöé4    ΓöéDBG_C_WriteMem_I    ΓöéWrite Word                         Γöé
  7189. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7190. Γöé5    ΓöéDBG_C_WriteMem_D    ΓöéWrite Word (same as 4)             Γöé
  7191. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7192. Γöé6    ΓöéDBG_C_WriteReg      ΓöéWrite Register Set                 Γöé
  7193. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7194. Γöé7    ΓöéDBG_C_Go            ΓöéGo                                 Γöé
  7195. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7196. Γöé8    ΓöéDBG_C_Term          ΓöéTerminate                          Γöé
  7197. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7198. Γöé9    ΓöéDBG_C_SStep         ΓöéSingle Step                        Γöé
  7199. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7200. Γöé10   ΓöéDBG_C_Stop          ΓöéStop                               Γöé
  7201. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7202. Γöé11   ΓöéDBG_C_Freeze        ΓöéFreeze Thread                      Γöé
  7203. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7204. Γöé12   ΓöéDBG_C_Resume        ΓöéResume Thread                      Γöé
  7205. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7206. Γöé13   ΓöéDBG_C_NumToAddr     ΓöéObject Number to Address           Γöé
  7207. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7208. Γöé14   ΓöéDBG_C_ReadCoRegs    ΓöéRead Coprocessor Registers         Γöé
  7209. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7210. Γöé15   ΓöéDBG_C_WriteCoRegs   ΓöéWrite Coprocessor Registers        Γöé
  7211. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7212. Γöé16   ΓöéReserved            ΓöéReserved                           Γöé
  7213. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7214. Γöé17   ΓöéDBG_C_ThrdStat      ΓöéGet Thread Status                  Γöé
  7215. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7216. Γöé18   ΓöéDBG_C_MapROAlias    ΓöéMap Read-Only Alias                Γöé
  7217. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7218. Γöé19   ΓöéDBG_C_MapRWAlias    ΓöéMap Read-Write Alias               Γöé
  7219. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7220. Γöé20   ΓöéDBG_C_UnMapAlias    ΓöéUnmap Alias                        Γöé
  7221. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7222. Γöé21   ΓöéDBG_C_Connect       ΓöéConnect to Debuggee                Γöé
  7223. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7224. Γöé22   ΓöéDBG_C_ReadMemBuf    ΓöéRead Memory Buffer                 Γöé
  7225. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7226. Γöé23   ΓöéDBG_C_WriteMemBuf   ΓöéWrite Memory Buffer                Γöé
  7227. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7228. Γöé24   ΓöéDBG_C_SetWatch      ΓöéSet Watchpoint                     Γöé
  7229. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7230. Γöé25   ΓöéDBG_C_ClearWatch    ΓöéClear Watchpoint                   Γöé
  7231. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7232. Γöé26   ΓöéDBG_C_RangeStep     ΓöéRange Step                         Γöé
  7233. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7234. Γöé27   ΓöéDBG_C_Continue      ΓöéContinue After an Execution        Γöé
  7235. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7236. Γöé28   ΓöéDBG_C_AddrToObject  ΓöéAddress to an Object               Γöé
  7237. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7238. Γöé29   ΓöéDBG_C_XchngOpcode   ΓöéExchange Opcode and Go             Γöé
  7239. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7240. Γöé30   ΓöéDBG_C_LinToSel      ΓöéTranslate Linear Address to        Γöé
  7241. Γöé     Γöé                    ΓöéSegment:Offset                     Γöé
  7242. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7243. Γöé31   ΓöéDBG_C_SelToLin      ΓöéTranslate Segment:Offset to Linear Γöé
  7244. Γöé     Γöé                    ΓöéAddress                            Γöé
  7245. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  7246.  
  7247. Not all fields must be defined for every DosDebug command. The same field can 
  7248. have a different meaning in different DosDebug commands. Fields in the DosDebug 
  7249. Buffer structure that are not listed in the Parameter section of each command 
  7250. is not useful for that command. 
  7251.  
  7252. Error cases for commands are not listed. The listed return values from commands 
  7253. are valid only if the DBG_N_Success notification is given. 
  7254.  
  7255.  
  7256. ΓòÉΓòÉΓòÉ 3.4.1. DBG_C_Null ΓòÉΓòÉΓòÉ
  7257.  
  7258. Debug Command 0 - Null Command 
  7259.  
  7260. Parameters 
  7261.  
  7262.  Pid    = Process ID of debuggee 
  7263.  Cmd    = DBG_C_Null 
  7264.  
  7265.  No operation is performed on the debuggee. You can issue this command to 
  7266.  verify the process ID of the debuggee, and to check if the debuggee is active. 
  7267.  
  7268.  Pid must be valid, or an error is returned. 
  7269.  
  7270.  
  7271. ΓòÉΓòÉΓòÉ 3.4.2. DBG_C_ReadMem ΓòÉΓòÉΓòÉ
  7272.  
  7273. Debug Command 1 and 2 - Read Word Command 
  7274.  
  7275. Parameters 
  7276.  
  7277.  Pid    = Process ID of debuggee 
  7278.  Addr   = Address to read from 
  7279.  Cmd    = DBG_C_ReadMem_I, or DBG_C_ReadMem_D, or DBG_C_ReadMem 
  7280.  
  7281.  The commands DBG_C_ReadMem_I, DBG_C_ReadMem_D, and DBG_C_ReadMem are 
  7282.  identical. 
  7283.  
  7284.  Returns 
  7285.  
  7286.  The word at the desired address is read, and stored into Value. 
  7287.  
  7288.  Value  = Word read from the specified address. 
  7289.  
  7290.  Restrictions 
  7291.  
  7292.  You are unable to read from any memory outside user space. 
  7293.  
  7294.  The high-order word of Value is set to zero. 
  7295.  
  7296.  
  7297. ΓòÉΓòÉΓòÉ 3.4.3. DBG_C_ReadMem_I ΓòÉΓòÉΓòÉ
  7298.  
  7299. Debug Command 1 and 2 - Read Word Command 
  7300.  
  7301. Parameters 
  7302.  
  7303.  Pid    = Process ID of debuggee 
  7304.  Addr   = Address to read from 
  7305.  Cmd    = DBG_C_ReadMem_I, or DBG_C_ReadMem_D, or DBG_C_ReadMem 
  7306.  
  7307.  The commands DBG_C_ReadMem_I, DBG_C_ReadMem_D, and DBG_C_ReadMem are 
  7308.  identical. 
  7309.  
  7310.  Returns 
  7311.  
  7312.  The word at the desired address is read, and stored into Value. 
  7313.  
  7314.  Value  = Word read from the specified address. 
  7315.  
  7316.  Restrictions 
  7317.  
  7318.  You are unable to read from any memory outside user space. 
  7319.  
  7320.  The high-order word of Value is set to zero. 
  7321.  
  7322.  
  7323. ΓòÉΓòÉΓòÉ 3.4.4. DBG_C_ReadMem_D ΓòÉΓòÉΓòÉ
  7324.  
  7325. Debug Command 1 and 2 - Read Word Command 
  7326.  
  7327. Parameters 
  7328.  
  7329.  Pid    = Process ID of debuggee 
  7330.  Addr   = Address to read from 
  7331.  Cmd    = DBG_C_ReadMem_I, or DBG_C_ReadMem_D, or DBG_C_ReadMem 
  7332.  
  7333.  The commands DBG_C_ReadMem_I, DBG_C_ReadMem_D, and DBG_C_ReadMem, are 
  7334.  identical. 
  7335.  
  7336.  Returns 
  7337.  
  7338.  The word at the desired address is read, and stored into Value. 
  7339.  
  7340.  Value  = Word read from the specified address. 
  7341.  
  7342.  Restrictions 
  7343.  
  7344.  You are unable to read from any memory outside user space. 
  7345.  
  7346.  The high-order word of Value is set to zero. 
  7347.  
  7348.  
  7349. ΓòÉΓòÉΓòÉ 3.4.5. DBG_C_ReadReg ΓòÉΓòÉΓòÉ
  7350.  
  7351. Debug Command 3 - Read Register Set Command 
  7352.  
  7353. Parameters 
  7354.  
  7355.  Pid    = Process ID of debuggee 
  7356.  Tid    = Thread ID of register set to read 
  7357.  Cmd    = DBG_C_ReadReg 
  7358.  
  7359.  If Tid is zero and the debuggee is stopped, the register set comes from the 
  7360.  active debuggee thread.  If Tid is zero and the debuggee is executing, 
  7361.  ERROR_INVALID_THREADID is returned. 
  7362.  
  7363.  Returns 
  7364.  
  7365.  The register set in the DosDebug Buffer structure is updated, including the 
  7366.  selector information as follows: 
  7367.  
  7368.  Tid    = Thread ID corresponding to the register set 
  7369.  MTE    = Program module's MTE (Module Table Entry) handle 
  7370.  
  7371.  
  7372. ΓòÉΓòÉΓòÉ 3.4.6. DBG_C_WriteMem ΓòÉΓòÉΓòÉ
  7373.  
  7374. Debug Command 4 and 5 - Write Word Command 
  7375.  
  7376. Parameters 
  7377.  
  7378.  Pid    = Process ID of debuggee 
  7379.  Addr   = Address to write to 
  7380.  Value  = Word to write 
  7381.  Cmd    = DBG_C_WriteMem_I, or DBG_C_WriteMem_D or DBG_C_WriteMem 
  7382.  
  7383.  The commands DBG_C_WriteMem_I, DBG_C_WriteMem_D, and DBG_C_WriteMem are 
  7384.  identical. 
  7385.  
  7386.  Returns 
  7387.  
  7388.  The word in Value is written to the specified address. 
  7389.  
  7390.  In the case of a write to shared read-only memory, the memory is converted to 
  7391.  private, and any set dynamic RAS tracepoints are removed from that memory, 
  7392.  before the write is performed. 
  7393.  
  7394.  The area will continue to be shared by other processes, if any. In this way, 
  7395.  breakpoints may be set in the debuggee without affecting the other modules. 
  7396.  
  7397.  Restrictions 
  7398.  
  7399.  You are unable to write to any memory outside user space. 
  7400.  
  7401.  The high-order word of Value is ignored. 
  7402.  
  7403.  
  7404. ΓòÉΓòÉΓòÉ 3.4.7. DBG_C_WriteMem_I ΓòÉΓòÉΓòÉ
  7405.  
  7406. Debug Command 4 and 5 - Write Word Command 
  7407.  
  7408. Parameters 
  7409.  
  7410.  Pid    = Process ID of debuggee 
  7411.  Addr   = Address to write to 
  7412.  Value  = Word to write 
  7413.  Cmd    = DBG_C_WriteMem_I, or DBG_C_WriteMem_D, or DBG_C_WriteMem_I 
  7414.  
  7415.  The commands DBG_C_WriteMem_I, DBG_C_WriteMem_D, and DBG_C_WriteMem_I are 
  7416.  identical. 
  7417.  
  7418.  Returns 
  7419.  
  7420.  The word in Value is written to the specified address. 
  7421.  
  7422.  In the case of a write to shared read-only memory, the memory is converted to 
  7423.  private, and any set dynamic RAS tracepoints are removed from that memory, 
  7424.  before the write is performed. 
  7425.  
  7426.  The area will continue to be shared by other processes, if any. In this way, 
  7427.  breakpoints may be set in the debuggee without affecting the other modules. 
  7428.  
  7429.  Restrictions 
  7430.  
  7431.  You are unable to write to any memory outside user space. 
  7432.  
  7433.  The high-order word of Value is ignored. 
  7434.  
  7435.  
  7436. ΓòÉΓòÉΓòÉ 3.4.8. DBG_C_WriteMem_D ΓòÉΓòÉΓòÉ
  7437.  
  7438. Debug Command 4 and 5 - Write Word Command 
  7439.  
  7440. Parameters 
  7441.  
  7442.  Pid    = Process ID of debuggee 
  7443.  Addr   = Address to write to 
  7444.  Value  = Word to write 
  7445.  Cmd    = DBG_C_WriteMem_I or DBG_C_WriteMem_D, or DBG_C_WriteMem, and 
  7446.  
  7447.  The commands DBG_C_WriteMem_I, DBG_C_WriteMem_D, and DBG_C_WriteMem, and are 
  7448.  identical. 
  7449.  
  7450.  Returns 
  7451.  
  7452.  The word in Value is written to the specified address. 
  7453.  
  7454.  In the case of a write to shared read-only memory, the memory is converted to 
  7455.  private, and any set dynamic RAS tracepoints are removed from that memory, 
  7456.  before the write is performed. 
  7457.  
  7458.  The area will continue to be shared by other processes, if any. In this way, 
  7459.  breakpoints may be set in the debuggee without affecting the other modules. 
  7460.  
  7461.  Restrictions 
  7462.  
  7463.  You are unable to write to any memory outside user space. 
  7464.  
  7465.  The high-order word of Value is ignored. 
  7466.  
  7467.  
  7468. ΓòÉΓòÉΓòÉ 3.4.9. DBG_C_WriteReg ΓòÉΓòÉΓòÉ
  7469.  
  7470. Debug Command 6 - Write Register Set Command 
  7471.  
  7472. Parameters 
  7473.  
  7474.  Pid    = Process ID of debuggee 
  7475.  Tid    = Nonzero Thread ID of register set to write 
  7476.  Cmd    = DBG_C_WriteReg 
  7477.  
  7478.  The register set in the DosDebug Buffer should contain the desired values. 
  7479.  
  7480.  Returns 
  7481.  
  7482.  Tid    Thread ID corresponding to the register set. 
  7483.  
  7484.  All registers are updated to the stored values. The access rights, limits, and 
  7485.  Eflags are also updated to match the current values. 
  7486.  
  7487.  An error is returned if the selectors are not accessible by user space code, 
  7488.  or are not valid memory segments. 
  7489.  
  7490.  Restrictions 
  7491.  
  7492.  Reserved system or processor flags bits are not modified via this method, but 
  7493.  are masked to their correct values. The selector access rights and limits 
  7494.  cannot be modified. The flags, access rights, and limits in the DosDebug 
  7495.  Buffer structure are updated to the actual values. 
  7496.  
  7497.  
  7498. ΓòÉΓòÉΓòÉ 3.4.10. DBG_C_Go ΓòÉΓòÉΓòÉ
  7499.  
  7500. Debug Command 7 - Go Command 
  7501.  
  7502. Parameters 
  7503.  
  7504.  Pid    = Process ID of debuggee 
  7505.  Cmd    = DBG_C_Go 
  7506.  
  7507.  Returns 
  7508.  
  7509.  All non-frozen threads of the debuggee are allowed to execute user code at 
  7510.  once. If all of the debuggee threads are frozen, an error is returned. 
  7511.  
  7512.  The DBG_C_Go command completes when a DosDebug event (such as a Breakpoint) 
  7513.  occurs. This event can be any one of the DosDebug notifications. See DosDebug 
  7514.  Notifications for more information. 
  7515.  
  7516.  When the next DosDebug event occurs, all threads in the debuggee process are 
  7517.  marked to not execute any additional user code until the next DBG_C_Go command 
  7518.  is issued. This provides a stable environment for debugging. 
  7519.  
  7520.  When the DBG_C_Go command returns, the register set is automatically updated 
  7521.  to reflect the thread that detected the event. 
  7522.  
  7523.  
  7524. ΓòÉΓòÉΓòÉ 3.4.11. DBG_C_Term ΓòÉΓòÉΓòÉ
  7525.  
  7526. Debug Command 8 - Terminate Command 
  7527.  
  7528. Parameters 
  7529.  
  7530.  Pid    = Process ID of debuggee 
  7531.  Cmd    = DBG_C_Term 
  7532.  
  7533.  Returns 
  7534.  
  7535.  The debuggee process is terminated immediately. 
  7536.  
  7537.  No additional DosDebug commands or notifications will be allowed to this 
  7538.  process. Outstanding memory aliases and watchpoints will be invalidated 
  7539.  automatically. 
  7540.  
  7541.  Debuggee DosExecPgm processing will be attempted, but any unexpected DosDebug 
  7542.  event (such as a Breakpoint) during this period will cause the process to 
  7543.  terminate without completing DosExitList processing. For this reason, data 
  7544.  watchpoints will automatically be cleared before attempting DosExitList 
  7545.  processing. 
  7546.  
  7547.  If the Terminate command is issued during DosExitList processing, DosExitList 
  7548.  processing will terminate immediately, without continuing the DosExitList 
  7549.  routines. 
  7550.  
  7551.  
  7552. ΓòÉΓòÉΓòÉ 3.4.12. DBG_C_SStep ΓòÉΓòÉΓòÉ
  7553.  
  7554. Debug Command 9 - Single Step Command 
  7555.  
  7556. Parameters 
  7557.  
  7558.  Pid    = Process ID of debuggee 
  7559.  Tid    = Thread ID of thread to single-step 
  7560.  Cmd    = DBG_C_SStep 
  7561.  
  7562.  If Tid is zero, all threads will be marked to single-step at once, and the 
  7563.  first thread to be scheduled to execute user-space code will single-step. No 
  7564.  other threads will single-step. 
  7565.  
  7566.  Returns 
  7567.  
  7568.  Usually, the DBG_N_Exception notification is returned, but any notification 
  7569.  may be returned. See DosDebug Notifications for more information. 
  7570.  
  7571.  Callgates that result in a privilege level transition to ring 0 will appear to 
  7572.  single-step as a single instruction, with the single-step occurring just after 
  7573.  the function completes. This hides ring 0 execution from debuggers. 
  7574.  
  7575.  Attempting to single-step any thread that is frozen results in an error. 
  7576.  
  7577.  Restrictions 
  7578.  
  7579.  The DBG_C_SStep command has two modes of operation, as follows: 
  7580.  
  7581.      If Tid is zero, the current thread is single-stepped while allowing all 
  7582.       other threads to execute. 
  7583.  
  7584.      If Tid is nonzero, a specific thread is selected for single-stepping. 
  7585.       Only that thread is executed, even if it is single-stepping a kernel 
  7586.       function that can potentially cause a deadlock condition. 
  7587.  
  7588.  The single-step exception (XCPT_SINGLE_STEP) is not lost if the single-step 
  7589.  operation causes a notification to be sent to DosDebug. In this case, the 
  7590.  single-step exception is queued. 
  7591.  
  7592.  The single-step operation is not lost if other notifications were queued 
  7593.  before the DBG_C_SStep command was issued. The Debug DBG_C_Continue command 
  7594.  will clear the notifications one at a time until DosDebug has been completely 
  7595.  notified. On the last DBG_C_Continue command, the single-step operation will 
  7596.  take place as originally requested. 
  7597.  
  7598.  When a single-step operation is interrupted by an exception, the EIP 
  7599.  (instruction pointer) should be moved to the next RING3 instruction. This may 
  7600.  be in ring 3 system code. The single-step notification will be issued at this 
  7601.  time. 
  7602.  
  7603.  The DBG_C_SStep command correctly single-steps most instructions. 
  7604.  Single-stepping some REP instructions may not work correctly due to errors in 
  7605.  the 80386 processor. 
  7606.  
  7607.  
  7608. ΓòÉΓòÉΓòÉ 3.4.13. DBG_C_Stop ΓòÉΓòÉΓòÉ
  7609.  
  7610. Debug Command 10 - Stop Command 
  7611.  
  7612. Parameters 
  7613.  
  7614.  Pid    = Process ID of debuggee 
  7615.  Cmd    = DBG_C_Stop 
  7616.  
  7617.  Returns 
  7618.  
  7619.  The function performed by this command depends on the current state of the 
  7620.  debuggee process, as follows: 
  7621.  
  7622.      If the debuggee is already stopped: 
  7623.  
  7624.       If there is a pending notification from the current thread, it is 
  7625.       returned. See DosDebug Notifications for information about pending 
  7626.       notifications. 
  7627.  
  7628.       If there is no pending notification from the current thread, 
  7629.       DBG_N_Success is returned. 
  7630.  
  7631.      If the debuggee is executing user code: 
  7632.  
  7633.       The debuggee is marked to stop before the next time it is ready to 
  7634.       execute user-space (ring 2 or 3) code. This is known as an asynchronous 
  7635.       stop. 
  7636.  
  7637.       Kernel operations will not be interrupted for this DBG_C_Stop That is, 
  7638.       threads blocked in the kernel (via a semaphore or internal operation) 
  7639.       will not be interrupted. However, an infinite loop in user space will be 
  7640.       stopped. 
  7641.  
  7642.       Note:  The asynchronous variation of the stop command implies a debugger 
  7643.              with a minimum of two threads; one waits for a DBG_C_Go or 
  7644.              DBG_C_SStep command to finish, and another executes the DBG_C_Stop 
  7645.              command. 
  7646.  
  7647.  
  7648. ΓòÉΓòÉΓòÉ 3.4.14. DBG_C_Freeze ΓòÉΓòÉΓòÉ
  7649.  
  7650. Debug Command 11 - Freeze Thread Command 
  7651.  
  7652. Parameters 
  7653.  
  7654.  Pid    = Process ID of debuggee 
  7655.  Tid    = Thread ID of thread to freeze 
  7656.  Cmd    = DBG_C_Freeze 
  7657.  
  7658.  If Tid is zero, all debuggee threads will be frozen. 
  7659.  
  7660.  Returns 
  7661.  
  7662.  The desired threads are prevented from executing user code on a DBG_C_Go or 
  7663.  DBG_C_SStep command. 
  7664.  
  7665.  By using the DBG_C_Freeze and DBG_C_Resume commands, a given set of threads 
  7666.  can be executed at once, while keeping the other threads suspended. 
  7667.  
  7668.  No error is returned if the thread was previously frozen; it just remains 
  7669.  frozen. DBG_C_Freeze and DBG_C_Resume commands cannot be nested. 
  7670.  
  7671.  If the Tid is specified as zero, it will be set to the thread ID of the 
  7672.  debuggee thread most recently scheduled to execute. 
  7673.  
  7674.  
  7675. ΓòÉΓòÉΓòÉ 3.4.15. DBG_C_Resume ΓòÉΓòÉΓòÉ
  7676.  
  7677. Debug Command 12 - Resume Thread Command 
  7678.  
  7679. Parameters 
  7680.  
  7681.  Pid    = Process ID of debuggee 
  7682.  Tid    = Thread ID of thread to thaw 
  7683.  Cmd    = DBG_C_Resume 
  7684.  
  7685.  If Tid is zero, all debuggee threads will be thawed. 
  7686.  
  7687.  Returns 
  7688.  
  7689.  The DBG_C_Resume command complements the DBG_C_Freeze command. A thread that 
  7690.  has been resumed will function as if it were never frozen. 
  7691.  
  7692.  No error is returned if the thread was not previously frozen. 
  7693.  
  7694.  If the Tid is specified as zero, it will be set to the thread ID of the 
  7695.  debuggee thread most recently scheduled to execute. 
  7696.  
  7697.  
  7698. ΓòÉΓòÉΓòÉ 3.4.16. DBG_C_NumToAddr ΓòÉΓòÉΓòÉ
  7699.  
  7700. Debug Command 13 - Convert Object Number to Address Command 
  7701.  
  7702. Parameters 
  7703.  
  7704.  Pid    = Process ID of debuggee 
  7705.  Cmd    = DBG_C_NumToAddr 
  7706.  Value  = Logical object number in module 
  7707.  MTE    = Module handle of module of interest 
  7708.  
  7709.  Returns 
  7710.  
  7711.  Addr   = Starting address of object 
  7712.  Value  = Logical object number 
  7713.  MTE    = Module handle of module of interest 
  7714.  
  7715.  The logical object number in Value is converted into an address that points to 
  7716.  the starting address of the desired logical object of the specified module in 
  7717.  the debuggee's memory space. This address is then stored in the Addr field, in 
  7718.  the form of a linear address. 
  7719.  
  7720.  The Value and MTE fields are left unchanged. 
  7721.  
  7722.  The logical object numbers for a module are generated at link time. By using 
  7723.  this function, a debugger can discern the relationship between addresses and 
  7724.  logical object numbers. Once the logical object number is known, symbols can 
  7725.  be generated for an address via a map or symbol file, for symbolic debugging. 
  7726.  
  7727.  
  7728. ΓòÉΓòÉΓòÉ 3.4.17. DBG_C_ReadCoRegs ΓòÉΓòÉΓòÉ
  7729.  
  7730. Debug Command 14 - Read Coprocessor Registers Command 
  7731.  
  7732. Parameters 
  7733.  
  7734.  Pid    = Process ID of debuggee processor 
  7735.  Tid    = Thread ID of Coprocessor register set to read 
  7736.  Cmd    = DBG_C_ReadCoRegs 
  7737.  Value  = Coprocessor Type Identifier 
  7738.  Buffer = Pointer to Coprocessor Register Context Buffer 
  7739.  Len    = Size of Coprocessor Register Context Buffer 
  7740.  Index  = Reserved, must be zero 
  7741.  
  7742.  If Tid is zero and the debuggee is stopped, the register set comes from the 
  7743.  active debuggee thread. If Tid is zero and the debuggee is executing, 
  7744.  ERROR_INVALID_THREADID is returned. 
  7745.  
  7746.  The coprocessor type identifier is a number that identifies the format of the 
  7747.  coprocessor register context buffer. The buffer length must correspond exactly 
  7748.  to the requested buffer format. The supported coprocessor types, formats and 
  7749.  lengths include the following: 
  7750.  
  7751.  For the Intel 80387 NPX processor: 
  7752.  
  7753.  Value  = DBG_CO_387 = 1 
  7754.  Len    = 108 
  7755.  
  7756.  The coprocessor register context buffer format is the same as that defined by 
  7757.  the fsave/frestore instructions as executed by the appropriate processor. 
  7758.  
  7759.  Returns 
  7760.  
  7761.  The debugger's coprocessor register context buffer is filled in with a copy of 
  7762.  the registers read from the appropriate coprocessor, for the thread specified 
  7763.  in the Tid field. 
  7764.  
  7765.  If an error occurs while attempting to access the coprocessor context during 
  7766.  this command, the DBG_N_CoError notification is returned. 
  7767.  
  7768.  Restrictions 
  7769.  
  7770.  An error is returned if any one of the following occurs: 
  7771.  
  7772.      The debuggee process is emulating the coprocessor. 
  7773.      The specified debuggee thread has not yet attempted to use the 
  7774.       coprocessor. 
  7775.      The wrong coprocessor type is used. 
  7776.      Index is not zero. 
  7777.  
  7778.  
  7779. ΓòÉΓòÉΓòÉ 3.4.18. DBG_C_WriteCoRegs ΓòÉΓòÉΓòÉ
  7780.  
  7781. Debug Command 15 - Write Coprocessor Registers Command 
  7782.  
  7783. Parameters 
  7784.  
  7785.  Pid    = Process ID of debuggee processor 
  7786.  Tid    = Nonzero Thread ID of Coprocessor register set to read 
  7787.  Cmd    = DBG_C_WriteCoRegs 
  7788.  Value  = Coprocessor Type Identifier 
  7789.  Buffer = Pointer to Coprocessor Register Context Buffer 
  7790.  Len    =  Size of Coprocessor Register Context Buffer 
  7791.  Index  = Reserved, must be zero 
  7792.  
  7793.  The coprocessor type identifier is a number that identifies the format of the 
  7794.  coprocessor register context buffer. The buffer length must correspond exactly 
  7795.  to the requested buffer format. 
  7796.  
  7797.  See DBG_C_ReadCoRegs for the supported coprocessor types, formats, and 
  7798.  lengths. 
  7799.  
  7800.  The coprocessor register context buffer format is the same as that defined by 
  7801.  the fsave/frestore instructions as executed by the appropriate processor. 
  7802.  
  7803.  Returns 
  7804.  
  7805.  The debuggee thread's coprocessor registers are filled with the values passed 
  7806.  via the coprocessor register context buffer, for the thread specified in the 
  7807.  Tid field. 
  7808.  
  7809.  If an error occurs while attempting to access the coprocessor context during 
  7810.  this command, the DBG_N_CoError notification is returned. 
  7811.  
  7812.  Restrictions 
  7813.  
  7814.  An error is returned if any one of the following occurs: 
  7815.  
  7816.      The debuggee process is emulating the coprocessor. 
  7817.      The specified debuggee thread has not yet attempted to use the 
  7818.       coprocessor. 
  7819.      The wrong coprocessor type is used. 
  7820.      Index is not zero. 
  7821.  
  7822.  The coprocessor may adjust some control register bits, but DosDebug will not 
  7823.  return an error if a modification is attempted, nor will it mask the values. 
  7824.  Because of internal coprocessor management, this adjustment may be delayed 
  7825.  until the thread actually uses the coprocessor again. 
  7826.  
  7827.  
  7828. ΓòÉΓòÉΓòÉ 3.4.19. DBG_C_ThrdStat ΓòÉΓòÉΓòÉ
  7829.  
  7830. Debug Command 17 - Get Thread Status Command 
  7831.  
  7832. Parameters 
  7833.  
  7834.  Pid    = Process ID of debuggee 
  7835.  Tid    = Thread ID of thread of interest 
  7836.  Cmd    = DBG_C_ThrdStat 
  7837.  Buffer = Pointer to Thread Status buffer 
  7838.  Len    = Length of Thread Status buffer, in bytes. This value is 4. 
  7839.  
  7840.  If Tid is zero, the status of the debuggee thread most recently scheduled to 
  7841.  run will be returned. 
  7842.  
  7843.  Returns 
  7844.  
  7845.  Value                  = Thread ID of "next" active thread to examine 
  7846.  Tid                    = Thread ID of thread whose status is returned 
  7847.  Thread Status buffer   = Buffer for the thread status, filled in. 
  7848.  
  7849.  Thread Status buffer format is as follows: 
  7850.  
  7851.   Not defined.
  7852.  
  7853.  DbgState in the Thread Status buffer contains information about the current 
  7854.  state of debugging, and will have one of the following values upon return: 
  7855.  
  7856.  0   DBG_D_Thawed 
  7857.  1   DBG_D_Frozen 
  7858.  
  7859.  TState in the Thread Status buffer contains information about the scheduling 
  7860.  state of the thread, and will have one of the following values upon return: 
  7861.  
  7862.  0   DBG_T_Runnable 
  7863.  1   DBG_T_Suspended 
  7864.  2   DBG_T_Blocked 
  7865.  3   DBG_T_CritSec 
  7866.  
  7867.  TPriority in the Thread Status buffer contains the thread's base scheduling 
  7868.  priority. This priority will be expressed as scheduling class and delta values 
  7869.  upon return. 
  7870.  
  7871.  The Value field will be filled in with the Thread ID of the "next" thread to 
  7872.  look at when traversing threads. 
  7873.  
  7874.  By repeatedly calling the DBG_C_ThrdStat command, replacing the Tid with the 
  7875.  last returned Value until a thread ID is repeated, all threads in the process 
  7876.  can be traversed. When used in this way, the Tids returned by the 
  7877.  DBG_C_ThrdStat command form a loop of the debuggee's thread IDs. 
  7878.  
  7879.  
  7880. ΓòÉΓòÉΓòÉ 3.4.20. DBG_C_MapROAlias ΓòÉΓòÉΓòÉ
  7881.  
  7882. Debug Command 18 and 19 - Map Read-Only or Read-Write Memory Alias Command 
  7883.  
  7884. Parameters 
  7885.  
  7886.  Pid    = Process ID of debuggee 
  7887.  Cmd    = DBG_C_MapROAlias (Read Only)  (Not always supported) 
  7888.  Cmd    = DBG_C_MapRWAlias (Read Write) 
  7889.  Buffer = Reserved, must be zero. 
  7890.  Addr   = Start of debuggee region to alias (Page-Aligned) 
  7891.  Len    = Requested length of alias region (Page-Multiple) 
  7892.  
  7893.  Returns 
  7894.  
  7895.  Buffer = Address of the start of the debugger alias region 
  7896.  
  7897.  An alias to the debuggee's memory region of the requested length is mapped 
  7898.  into the debugger's memory space. This region is reserved for use as an alias 
  7899.  region until it is unmapped. 
  7900.  
  7901.  The access rights for the alias area are determined by the command number. The 
  7902.  DBG_C_MapROAlias command maps a read-only alias region, while the 
  7903.  DBG_C_MapRWAlias command maps a read-write alias region. 
  7904.  
  7905.  For read-write aliases, if the region is shared and read-only in the 
  7906.  debuggee's context, a private copy of the aliased pages will be created in the 
  7907.  debuggee's context, and dynamic RAS tracepoints will be removed from that 
  7908.  region. This prevents debugging from affecting other areas of the system, 
  7909.  while allowing access to shared memory areas, and proper disassembly of 
  7910.  regions where dynamic RAS tracepoints are in use. 
  7911.  
  7912.  Because the read-write aliases may convert objects to private, using up system 
  7913.  resources, it is recommended that read-only aliases be used when simply 
  7914.  perusing memory.  See the following Restrictions regarding read-only aliases 
  7915.  on the 80386 processor. 
  7916.  
  7917.  Because the entire aliased region may map both valid and invalid regions of 
  7918.  memory, debuggers should issue DosQueryMem just before accessing the alias 
  7919.  region to determine if the region is valid. Debuggers should not access this 
  7920.  region while the debuggee is executing, as portions of this region may become 
  7921.  invalid without notifying the debugger. It is possible that no valid pages 
  7922.  will exist in the alias region. 
  7923.  
  7924.  When the debuggee frees an aliased object, or shrinks the underlying object 
  7925.  such that the alias would span a region outside the resultant object, an 
  7926.  alias-free notification is returned to the debugger. This notification will be 
  7927.  returned before the alias is invalidated. See DosDebug Notifications for 
  7928.  details. 
  7929.  
  7930.  These commands may be performed while the debuggee is executing code via a 
  7931.  DBG_C_Go command. 
  7932.  
  7933.  Restrictions 
  7934.  
  7935.  Because debuggers can execute code at ring 2, and the read-only bit in the 
  7936.  page tables entries is effective only at ring 3, the read-only aliases cannot 
  7937.  be supported. When the read-only bit becomes effective at all rings, as is 
  7938.  expected on later processors, the read-only aliases will again be supported. 
  7939.  
  7940.  Most memory management calls may not be used on these aliases. DosQueryMem is 
  7941.  permitted, but for interrogation only. 
  7942.  
  7943.  The passed starting addresses must be aligned on a page boundary, and the 
  7944.  length of the aliased region must be a multiple of the page size. This 
  7945.  restriction is due to the underlying hardware. 
  7946.  
  7947.  Aliased regions must be completely contained within a single debuggee memory 
  7948.  object. 
  7949.  
  7950.  No interface is available for moving an alias to point to another section of 
  7951.  debuggee memory. To move an alias, the debugger must free an existing alias, 
  7952.  and then map a new alias to the desired region. 
  7953.  
  7954.  Aliases will only be permitted to the user space memory region of the 
  7955.  debuggee. No aliases will be provided to system space. 
  7956.  
  7957.  The alias region will only be provided at the linear level. No debugger Local 
  7958.  Descriptor Table ( LTD) selector will be available to access the alias region. 
  7959.  
  7960.  
  7961. ΓòÉΓòÉΓòÉ 3.4.21. DBG_C_MapRWAlias ΓòÉΓòÉΓòÉ
  7962.  
  7963. Debug Command 18 and 19 - Map Read-Only or Read-Write Memory Alias Command 
  7964.  
  7965. Parameters 
  7966.  
  7967.  Pid    = Process ID of debuggee 
  7968.  Cmd    = DBG_C_MapROAlias (Read Only)  (Not always supported) 
  7969.  Cmd    = DBG_C_MapRWAlias (Read Write) 
  7970.  Buffer = Reserved, must be zero. 
  7971.  Addr   = Start of debuggee region to alias (Page-Aligned) 
  7972.  Len    = Requested length of alias region (Page-Multiple) 
  7973.  
  7974.  Returns 
  7975.  
  7976.  Buffer = Address of the start of the debugger alias region 
  7977.  
  7978.  An alias to the debuggee's memory region of the requested length is mapped 
  7979.  into the debugger's memory space. This region is reserved for use as an alias 
  7980.  region until it is unmapped. 
  7981.  
  7982.  The access rights for the alias area are determined by the command number. The 
  7983.  DBG_C_MapROAlias command maps a read-only alias region, while the 
  7984.  DBG_C_MapRWAlias command maps a read-write alias region. 
  7985.  
  7986.  For read-write aliases, if the region is shared and read-only in the 
  7987.  debuggee's context, a private copy of the aliased pages will be created in the 
  7988.  debuggee's context, and dynamic RAS tracepoints will be removed from that 
  7989.  region. This prevents debugging from affecting other areas of the system, 
  7990.  while allowing access to shared memory areas, and proper disassembly of 
  7991.  regions where dynamic RAS tracepoints are in use. 
  7992.  
  7993.  Because the read-write aliases may convert objects to private, using up system 
  7994.  resources, it is recommended that read-only aliases be used when simply 
  7995.  perusing memory. See the following Restrictions regarding read-only aliases on 
  7996.  the 80386 processor. 
  7997.  
  7998.  Because the entire aliased region may map both valid and invalid regions of 
  7999.  memory, debuggers should issue DosQueryMem just before accessing the alias 
  8000.  region to determine if the region is valid. Debuggers should not access this 
  8001.  region while the debuggee is executing, as portions of this region may become 
  8002.  invalid without notifying the debugger. It is possible that no valid pages 
  8003.  will exist in the alias region. 
  8004.  
  8005.  When the debuggee frees an aliased object, or shrinks the underlying object 
  8006.  such that the alias would span a region outside the resultant object, an 
  8007.  alias-free notification is returned to the debugger. This notification will be 
  8008.  returned before the alias is invalidated. See DosDebug Notifications for 
  8009.  details. 
  8010.  
  8011.  These commands may be performed while the debuggee is executing code via a 
  8012.  DBG_C_Go command. 
  8013.  
  8014.  Restrictions 
  8015.  
  8016.  Because debuggers can execute code at ring 2, and the read-only bit in the 
  8017.  page tables entries is effective only at ring 3, the read-only aliases cannot 
  8018.  be supported. When the read-only bit becomes effective at all rings, as is 
  8019.  expected on later processors, the read-only aliases will again be supported. 
  8020.  
  8021.  Most memory management calls may not be used on these aliases. DosQueryMem is 
  8022.  permitted, but for interrogation only. 
  8023.  
  8024.  The passed starting addresses must be aligned on a page boundary, and the 
  8025.  length of the aliased region must be a multiple of the page size. This 
  8026.  restriction is due to the underlying hardware. 
  8027.  
  8028.  Aliased regions must be completely contained within a single debuggee memory 
  8029.  object. 
  8030.  
  8031.  No interface is available for moving an alias to point to another section of 
  8032.  debuggee memory. To move an alias, the debugger must free an existing alias, 
  8033.  and then map a new alias to the desired region. 
  8034.  
  8035.  Aliases will only be permitted to the user space memory region of the 
  8036.  debuggee. No aliases will be provided to system space. 
  8037.  
  8038.  The alias region will only be provided at the linear level. No debugger Local 
  8039.  Descriptor Table ( LDT) selector will be available to access the alias region. 
  8040.  
  8041.  
  8042. ΓòÉΓòÉΓòÉ 3.4.22. DBG_C_UnMapAlias ΓòÉΓòÉΓòÉ
  8043.  
  8044. Debug Command 20 - UnMap Memory Alias Command 
  8045.  
  8046. Parameters 
  8047.  
  8048.  Pid    = Process ID of debuggee 
  8049.  Cmd    = DBG_C_UnMapAlias 
  8050.  Buffer = Address of the debugger alias region to unmap 
  8051.  
  8052.  Returns 
  8053.  
  8054.  The DBG_C_UnMapAlias command is used when the debugger has finished using an 
  8055.  alias region. Both read-only and read-write aliases may be freed in this way. 
  8056.  
  8057.  Regions returned from other memory management calls may not be used. 
  8058.  
  8059.  The debugger may issue this command while the debuggee is executing code via a 
  8060.  DBG_C_Go command. 
  8061.  
  8062.  When the debuggee process terminates, all aliases to its memory space will be 
  8063.  invalidated. When a debugger program terminates, all aliases from its memory 
  8064.  space will also be invalidated. 
  8065.  
  8066.  
  8067. ΓòÉΓòÉΓòÉ 3.4.23. DBG_C_Connect ΓòÉΓòÉΓòÉ
  8068.  
  8069. Debug Command 21 - Connect To Debuggee Command 
  8070.  
  8071. Parameters 
  8072.  
  8073.  Addr   = Possible values are shown in the list below: 
  8074.  
  8075.         0x00000000       The default action is to sever the connection between 
  8076.                          the debugger and the program being debugged if a 
  8077.                          system resource is being held. 
  8078.  
  8079.         0x00000001       The Sever action is not wanted between the debugger 
  8080.                          and the program being debugged. 
  8081.  
  8082.  Pid    = Process ID of debuggee 
  8083.  
  8084.  Tid    = Reserved, must be zero 
  8085.  
  8086.  Cmd    = DBG_C_Connect 
  8087.  
  8088.  Value  = Debugging Level Number 
  8089.  
  8090.         The only permitted debugging level number is shown in the following 
  8091.         list: 
  8092.  
  8093.         1        = DBG_L_386 
  8094.  
  8095.  This must be the first DosDebug command. No other DosDebug command will be 
  8096.  accepted until the debugging connection has been established. 
  8097.  
  8098.  Returns 
  8099.  
  8100.  This command establishes a debugging connection. It must be the initial 
  8101.  command, since it verifies the buffer format for the rest of the connection. 
  8102.  
  8103.  Because DosDebug usually cannot be ported to new machines without changing the 
  8104.  format of the buffer, this command is needed to establish that the debugger is 
  8105.  capable of handling the desired buffer format. 
  8106.  
  8107.  If the requested debugging level is not supported, an error is returned, and 
  8108.  the connection is not made. This gives the debugger a chance to try again, or 
  8109.  to automatically start a different debugger process that uses a different 
  8110.  buffer format. 
  8111.  
  8112.  For this command, only the machine-independent portion of the buffer is 
  8113.  examined. This portion includes the Pid, Tid, Cmd, and Value fields. This 
  8114.  makes it possible to port the DosDebug buffer from one machine to another, 
  8115.  without returning an error to the debugger on the initial DosDebug command. 
  8116.  
  8117.  The only DosDebug notifications that are returned by this command are 
  8118.  DBG_N_Success and DBG_N_Error. 
  8119.  
  8120.  Restrictions 
  8121.  
  8122.  If the connection to the debuggee is not established within a reasonable 
  8123.  amount of time, it is assumed that the connection will never be established, 
  8124.  and the debuggee process is terminated automatically. 
  8125.  
  8126.  The current format level may or may not be supported in future versions. This 
  8127.  is due to the machine dependence of the DosDebug function. 
  8128.  
  8129.  Remarks 
  8130.  
  8131.  If Addr is set to 0, the connection between the debugger and the program being 
  8132.  debugged is not severed. If any debuggee threads, other than the thread that 
  8133.  encountered the debug event, are holding system semaphores, they will be 
  8134.  allowed to run until they release the semaphores. They will then be stopped 
  8135.  and the notification will be delivered. 
  8136.  
  8137.  If the thread encountering the debug event is holding a system semaphore the 
  8138.  debugger/debuggee connection is severed by terminating the debuggee, and 
  8139.  returning a DBG_N_Error notification to the debugger with the value field set 
  8140.  to 0, and the register set filled in. No further DosDebug commands will be 
  8141.  accepted by the debuggee, nor will it generate any other notifications. 
  8142.  
  8143.  If a DBG_C_Stop is issued, and a thread owning a system semaphore is about to 
  8144.  generate a DBG_N_AsyncStop notification, it will be allowed to continue 
  8145.  execution until it releases the semaphore. It will then be stopped, and the 
  8146.  notification delivered. This is the only exception to the severing of the 
  8147.  debugger/debuggee rule. 
  8148.  
  8149.  If Addr is set to 0, the connection between the debugger the program being 
  8150.  debugged is severed if a system resource is being held,. in which case 
  8151.  DosDebug returns: 
  8152.  
  8153.  Tid    = Thread owning semaphore 
  8154.  Cmd    = DBG_N_Error 
  8155.  Value  = ERROR_EXCL_SEM_ALREADY_OWNED 
  8156.  
  8157.  If the debugger needs to present some information to the user or use the 
  8158.  thread holding the system resource, the debugger must terminate the program 
  8159.  being debugged. Any other action might result in a system halt. 
  8160.  
  8161.  
  8162. ΓòÉΓòÉΓòÉ 3.4.24. DBG_C_ReadMemBuf ΓòÉΓòÉΓòÉ
  8163.  
  8164. Debug Command 22 - Read Memory Buffer Command 
  8165.  
  8166. Parameters 
  8167.  
  8168.  Pid    = Process ID of debuggee 
  8169.  Cmd    = DBG_C_ReadMemBuf 
  8170.  Addr   = Debuggee address to read from 
  8171.  Buffer = Debugger address to copy to 
  8172.  Len    = Number of bytes to read 
  8173.  
  8174.  Returns 
  8175.  
  8176.  The number of bytes specified by Len is copied from the debuggee's user memory 
  8177.  space starting at Addr into the debugger's Buffer. 
  8178.  
  8179.  This command is not serialized with respect to the DBG_C_Go command. 
  8180.  
  8181.  Restrictions 
  8182.  
  8183.  You are unable to read from any memory outside user space. 
  8184.  
  8185.  Both specified memory regions must be currently valid. 
  8186.  
  8187.  
  8188. ΓòÉΓòÉΓòÉ 3.4.25. DBG_C_WriteMemBuf ΓòÉΓòÉΓòÉ
  8189.  
  8190. Debug Command 23 - Write Memory Buffer Command 
  8191.  
  8192. Parameters 
  8193.  
  8194.  Pid    = Process ID of debuggee 
  8195.  Cmd    = DBG_C_WriteMemBuf 
  8196.  Addr   = Debuggee address to write to 
  8197.  Buffer = Debugger address to copy from 
  8198.  Len    = Number of bytes to write 
  8199.  
  8200.  Returns 
  8201.  
  8202.  The number of bytes specified by Len is copied from the debugger's Buffer into 
  8203.  the debuggee's memory space starting at Addr. 
  8204.  
  8205.  This command is not serialized with respect to the DBG_C_Go command. 
  8206.  
  8207.  In the case of a write to shared read-only memory, the memory is first 
  8208.  converted to private, and any set dynamic RAS logging points are removed from 
  8209.  that memory, before the write is performed. 
  8210.  
  8211.  Dynamic RAS logging will continue to function in that area, in the context of 
  8212.  other processes. The area will continue to be shared by other processes, if 
  8213.  any. 
  8214.  
  8215.  In this way, breakpoints may be set in the debuggee without affecting the 
  8216.  other modules. 
  8217.  
  8218.  Restrictions 
  8219.  
  8220.  You are unable to write to any memory outside user space. 
  8221.  
  8222.  Both specified memory regions must be currently valid. 
  8223.  
  8224.  
  8225. ΓòÉΓòÉΓòÉ 3.4.26. DBG_C_SetWatch ΓòÉΓòÉΓòÉ
  8226.  
  8227. Debug Command 24 - Set Watchpoint Command 
  8228.  
  8229. Parameters 
  8230.  
  8231.  Pid    = Process ID of debuggee 
  8232.  Cmd    = DBG_C_SetWatch 
  8233.  Addr   = Starting Address of Watchpoint 
  8234.  Len    = Length of Watchpoint, in bytes 
  8235.  Index  = Reserved, must be zero 
  8236.  Value  = Watchpoint Type and Scope 
  8237.  
  8238.  The Watchpoint Type and Scope is a combination of a Scope number and a Type 
  8239.  number. Both the Scope and Type must be specified. For example, to set a local 
  8240.  watchpoint for either read or write access, Value should be set to 
  8241.  (DBG_W_Local + DBG_W_ReadWrite). 
  8242.  
  8243.  The Watchpoint Scopes are: 
  8244.  
  8245.       DBG_W_Global (00000001h) 
  8246.       DBG_W_Local (00000002h) 
  8247.  
  8248.  The Watchpoint Types are: 
  8249.  
  8250.       DBG_W_Execute (00010000h) 
  8251.       DBG_W_Write (00020000h) 
  8252.       DBG_W_ReadWrite (00030000h) 
  8253.  
  8254.  Returns 
  8255.  
  8256.  Index  = Watchpoint ID Number 
  8257.  
  8258.  This command sets a code or data watchpoint of the desired scope and type to 
  8259.  cover the specified range of addresses. 
  8260.  
  8261.  The Watchpoint Scope controls the context in which the watchpoint is actually 
  8262.  effective. DBG_W_Local watchpoints are effective only in the context of the 
  8263.  debuggee process, while DBG_W_Global watchpoints are effective in the context 
  8264.  of any process. 
  8265.  
  8266.  Both DBG_W_Local and DBG_W_Global watchpoints remain effective at interrupt 
  8267.  time, and while executing kernel code.  However, the DBG_W_Local watchpoints 
  8268.  may miss interrupt time accesses, depending on the process context in which 
  8269.  the interrupt occurred. 
  8270.  
  8271.  Watchpoints are disabled as soon as they are hit, so that they can only be hit 
  8272.  once. 
  8273.  
  8274.  The resources used by a watchpoint will not be freed until the debugger is 
  8275.  finally notified of the hit, or the debugger terminates. The debugger should 
  8276.  use the DBG_C_Stop command to free resources held by any pending watchpoint 
  8277.  hits prior to setting a watchpoint, so that these held resources will not 
  8278.  prevent setting a new watchpoint. 
  8279.  
  8280.  DBG_W_Global watchpoints should be used sparingly, as they restrict the 
  8281.  watchpoint resources available to all processes at once. Watchpoint resources 
  8282.  are very limited. 
  8283.  
  8284.  Restrictions 
  8285.  
  8286.  The watchpoints are restricted by the hardware. In the case of the 80386 
  8287.  processor, where debug registers are used, the available watchpoint lengths 
  8288.  are 1, 2, and 4 bytes. The 2-byte data watchpoints must be aligned on a word 
  8289.  boundary, and the 4-byte data watchpoints must be aligned on a doubleword 
  8290.  boundary. DBG_W_Execute watchpoints must be exactly 1 byte in length, and they 
  8291.  must begin on an instruction boundary to be effective. 
  8292.  
  8293.  Global watchpoints are effective in v86 mode, but cannot detect DMA (direct 
  8294.  memory access) device accesses. 
  8295.  
  8296.  Global watchpoints may be set only in the shared memory region of the linear 
  8297.  address space.  Global watchpoints will remain effective even if the 
  8298.  underlying memory has been converted to private memory via a DosDebug memory 
  8299.  write operation. 
  8300.  
  8301.  
  8302. ΓòÉΓòÉΓòÉ 3.4.27. DBG_C_ClearWatch ΓòÉΓòÉΓòÉ
  8303.  
  8304. Debug Command 25 - Clear Watchpoint Command 
  8305.  
  8306. Parameters 
  8307.  
  8308.  Pid    = Process ID of debuggee 
  8309.  Cmd    = DBG_C_ClearWatch 
  8310.  Index  = Watchpoint ID Number 
  8311.  
  8312.  Returns 
  8313.  
  8314.  This command clears a currently set or hit watchpoint. 
  8315.  
  8316.  If the watchpoint is not currently set, an error is returned. 
  8317.  
  8318.  If a debugger wishes to move a watchpoint from one location to another, it 
  8319.  should clear the old watchpoint before setting the new one, to free any 
  8320.  resources used by currently set watchpoints. 
  8321.  
  8322.  The watchpoint will be cleared even if it is currently hit, and a notification 
  8323.  is pending. To prevent missing the watchpoint hit in this way, you should 
  8324.  issue the DBG_C_Stop command just before clearing the watchpoint, to pick up 
  8325.  any pending watchpoint hit notifications. 
  8326.  
  8327.  
  8328. ΓòÉΓòÉΓòÉ 3.4.28. DBG_C_RangeStep ΓòÉΓòÉΓòÉ
  8329.  
  8330. Debug Command 26 - Range Step Command 
  8331.  
  8332. Parameters 
  8333.  
  8334.  Pid    = Process ID of debuggee 
  8335.  Tid    = Thread ID of thread to range-step 
  8336.  Cmd    = DBG_C_RangeStep 
  8337.  Value  = Linear address denoting start of range (exclusive) 
  8338.  Addr   = Linear address denoting end of range (exclusive) 
  8339.  
  8340.  Returns 
  8341.  
  8342.  The RangeStep notification is usually returned, but any Debug notification may 
  8343.  be returned. See DosDebug Notifications for more information. 
  8344.  
  8345.  This command allows a debugger to specify a range of addresses (bounded by the 
  8346.  linear addresses in the Value and Addr fields) through which a debuggee thread 
  8347.  should single-step until one of the following conditions occurs: 
  8348.  
  8349.      The debuggee thread's linear EIP (instruction pointer) is outside the 
  8350.       range. 
  8351.      The linear EIPs of consecutive debuggee threads are the same. 
  8352.      Some other notification occurs. 
  8353.  
  8354.  When the DBG_C_RangeStep command returns, the register set is automatically 
  8355.  updated to reflect the thread that detected the event. 
  8356.  
  8357.  Callgates that result in a privilege level transition to ring 0 will appear to 
  8358.  range-step as a single instruction, with the range-step continuing after the 
  8359.  function completes. This hides ring 0 execution from debuggers. 
  8360.  
  8361.  Attempting to range-step a thread that is frozen results in an error. 
  8362.  
  8363.  Restrictions 
  8364.  
  8365.  To accomplish callgate single-stepping, the single-step must be simulated 
  8366.  because the flags (specifically, the TF bit) are not stored in the ring 0 
  8367.  callgate stack frame. Because of this, a range-step that results in leaving a 
  8368.  ring 0 callgate will sometimes not execute any user-space code. The following 
  8369.  range-step should function normally. 
  8370.  
  8371.  Range-stepping some REP instructions may not work correctly due to errors in 
  8372.  the 80386 processor. 
  8373.  
  8374.  
  8375. ΓòÉΓòÉΓòÉ 3.4.29. DBG_C_Continue ΓòÉΓòÉΓòÉ
  8376.  
  8377. Debug Command 27 - Continue After an Exception Command 
  8378.  
  8379. Parameters 
  8380.  
  8381.  Pid    = Process ID of debuggee 
  8382.  Tid    = Thread ID 
  8383.  Cmd    = DBG_C_Continue 
  8384.  Value  = XCPT_CONTINUE_EXECUTION (0xFFFFFFFF), or XCPT_CONTINUE_SEARCH 
  8385.         (0x00000000), or XCPT_CONTINUE_STOP (0x00716668) 
  8386.  
  8387.  Returns 
  8388.  
  8389.  You must issue the DBG_C_Continue command to continue after DosDebug has been 
  8390.  given preemptive notifications or an exception notification. For such 
  8391.  notifications, the DBG_C_Continue command is the only Debug command that will 
  8392.  start the child process again. You can issue other Debug commands, but you 
  8393.  must eventually issue the DBG_C_Continue command. 
  8394.  
  8395.  If you issue the DBG_C_Continue command and there is no pre-existing 
  8396.  notification or exception, the DBG_C_Continue command acts like a Debug 
  8397.  DBG_C_Go. 
  8398.  
  8399.  In single-step mode, XCPT_CONTINUE_STOP has the same effect as 
  8400.  XCPT_CONTINUE_EXECUTION. That is, execution is always stopped after a 
  8401.  single-step operation when DBG_N_Success is returned. 
  8402.  
  8403.  Handling Preemptive Notifications 
  8404.  
  8405.  The DBG_C_Continue command is used to either continue or stop the child 
  8406.  process after a preemptive notification has been received from DosDebug. 
  8407.  
  8408.  The XCPT_CONTINUE_STOP parameter can be used to stop the child process after a 
  8409.  preemptive notification has been received. Any pending notifications will be 
  8410.  held until execution of the child process is resumed using subsequent DosDebug 
  8411.  commands. While the child process is stopped, you can issue other DosDebug 
  8412.  commands, such as DBG_C_ReadMem. 
  8413.  
  8414.  The XCPT_CONTINUE_SEARCH parameter allows the child process to execute until 
  8415.  the next notification is received. 
  8416.  
  8417.  The following is a list of preemptive notifications. 
  8418.  
  8419.      DBG_N_ModuleLoad 
  8420.      DBG_N_ModuleFree 
  8421.      DBG_N_NewProc 
  8422.      DBG_N_ProcTerm 
  8423.      DBG_N_ThreadCreate 
  8424.      DBG_N_ThreadTerm 
  8425.      DBG_N_AliasFree 
  8426.      DBG_N_Exception 
  8427.  
  8428.  Handling the DBG_N_Exception Notification 
  8429.  
  8430.  Note:  XCPT_BREAKPOINT and XCPT_SINGLE_STEP are pre-first chance exception 
  8431.         notifications. 
  8432.  
  8433.  The XCPT_CONTINUE_STOP parameter serves two purposes. It stops the child 
  8434.  process, and it tells DosDebug that the debugger handled the exception. 
  8435.  
  8436.  The XCPT_CONTINUE_EXECUTION parameter tells DosDebug to restore the execution 
  8437.  context of the thread that received the exception, and then continue execution 
  8438.  of the child process. This implies that the debugger has handled the 
  8439.  exception. 
  8440.  
  8441.  The XCPT_CONTINUE_SEARCH parameter tells DosDebug to pass the exception to the 
  8442.  exception handler because the debugger will not handle it. After receiving an 
  8443.  exception notification other than XCPT_BREAKPOINT or XCPT_SINGLE_STEP, the 
  8444.  DBG_C_Continue command with the XCPT_CONTINUE_SEARCH parameter resumes 
  8445.  execution of the child process. 
  8446.  
  8447.  
  8448. ΓòÉΓòÉΓòÉ 3.4.30. DBG_C_AddrToObject ΓòÉΓòÉΓòÉ
  8449.  
  8450. Debug Command 28 - Get Memory Object Information Command 
  8451.  
  8452. Parameters 
  8453.  
  8454.  Pid    = Process ID of debuggee 
  8455.  Cmd    = DBG_C_AddrToObject 
  8456.  Addr   = Debuggee Linear Address 
  8457.  
  8458.  Returns 
  8459.  
  8460.  Buffer = Starting address of object 
  8461.  Len    = Size of object in bytes 
  8462.  Value  = Object flags 
  8463.  MTE    = Module Table Entry handle of module if DBG_O_OBJMTE is set in the 
  8464.         Value field object flags. 
  8465.  
  8466.  The object flags are defined as follows: 
  8467.  
  8468.       DBG_O_OBJMTE (10000000h) - Object is part of a module 
  8469.  
  8470.  Information about the memory object containing the linear address is returned. 
  8471.  If the linear address is not part of an object, DBG_N_Error is returned with 
  8472.  ERROR_INVALID_OBJECT in the Value field. 
  8473.  
  8474.  The Addr field will be left unchanged. 
  8475.  
  8476.  
  8477. ΓòÉΓòÉΓòÉ 3.4.31. DBG_C_XchngOpcode ΓòÉΓòÉΓòÉ
  8478.  
  8479. Debug Command 29 - Exchange Opcode and Go Command 
  8480.  
  8481. Parameters 
  8482.  
  8483.  Pid    = Process ID of debuggee 
  8484.  Tid    = Thread ID of thread 
  8485.  Cmd    = DBG_C_XchngOpcode 
  8486.  Value  = Opcode 1 for Single Step 
  8487.  Addr   = Opcode 2 for Go 
  8488.  
  8489.  Returns 
  8490.  
  8491.  The sequence of operations for this Debug command is: 
  8492.  
  8493.    1. Replace the code at the EIP (instruction pointer) with opcode 1. 
  8494.  
  8495.    2. Single-step the thread specified by the Tid field. Do not execute other 
  8496.       threads. If the single-step operation goes into ring 0 code, consider the 
  8497.       single-step operation complete at the first ring 0 instruction. 
  8498.  
  8499.    3. Replace the code at the original EIP with opcode 2. 
  8500.  
  8501.    4. Issue a Debug Go command on all non-frozen threads. 
  8502.  
  8503.  If an exception that DosDebug is to be notified about occurs during the 
  8504.  single-step operation of this Debug command, opcode 2 is placed at the 
  8505.  original EIP, and DosDebug is notified of the exception. When the debugger 
  8506.  issues the Debug Continue command, the child process continues execution. 
  8507.  
  8508.  Note:  If an exception that DosDebug is not to be notified about occurs, then 
  8509.         the DBG_C_XchngOpcode command executes as if no exception took place. 
  8510.  
  8511.  If opcode 1 and opcode 2 are identical, this Debug command executes only 
  8512.  operations 3 and 4 above. There is no need to single-step the thread specified 
  8513.  by the Tid field. This would be a "replace opcode and go" sequence using only 
  8514.  one DosDebug function instead of two. 
  8515.  
  8516.  
  8517. ΓòÉΓòÉΓòÉ 3.4.32. DBG_C_LinToSel ΓòÉΓòÉΓòÉ
  8518.  
  8519. Debug Command 30 - Translate Linear Address to Selector:Offset Command 
  8520.  
  8521. Parameters 
  8522.  
  8523.  Pid    = Process ID of debuggee 
  8524.  Cmd    = DBG_C_LinToSel 
  8525.  Addr   = Linear address to be translated 
  8526.  
  8527.  Returns 
  8528.  
  8529.  Value  = Selector 
  8530.  Index  = Offset 
  8531.  
  8532.  The Addr field will be left unchanged. 
  8533.  
  8534.  
  8535. ΓòÉΓòÉΓòÉ 3.4.33. DBG_C_SelToLin ΓòÉΓòÉΓòÉ
  8536.  
  8537. Debug Command 31 - Translate Selector:Offset to Linear Address Command 
  8538.  
  8539. Parameters 
  8540.  
  8541.  Pid    = Process ID of debuggee 
  8542.  Cmd    = DBG_C_SelToLin 
  8543.  Value  = Selector from address to be translated 
  8544.  Index  = Offset from address to be translated 
  8545.  
  8546.  Returns 
  8547.  
  8548.  Addr   = Linear address 
  8549.  
  8550.  The Value and Index fields will be left unchanged. 
  8551.  
  8552.  
  8553. ΓòÉΓòÉΓòÉ 3.5. DosDebug Notifications ΓòÉΓòÉΓòÉ
  8554.  
  8555. For a description of the data returned with each notification, select 
  8556.  
  8557. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8558. ΓöéNot. ΓöéNotification Name   ΓöéDescription                        Γöé
  8559. ΓöéNo.  Γöé                    Γöé                                   Γöé
  8560. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8561. Γöé 0   ΓöéDBG_N_Success       ΓöéSuccessful command completion      Γöé
  8562. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8563. Γöé-1   ΓöéDBG_N_Error         ΓöéError detected during command      Γöé
  8564. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8565. Γöé-6   ΓöéDBG_N_ProcTerm      ΓöéProcess termination - DosExitList  Γöé
  8566. Γöé     Γöé                    Γöédone                               Γöé
  8567. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8568. Γöé-7   ΓöéDBG_N_Exception     ΓöéException detected                 Γöé
  8569. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8570. Γöé-8   ΓöéDBG_N_ModuleLoad    ΓöéModule loaded                      Γöé
  8571. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8572. Γöé-9   ΓöéDBG_N_CoError       ΓöéCoprocessor not in use error       Γöé
  8573. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8574. Γöé-10  ΓöéDBG_N_ThreadTerm    ΓöéThread termination - not in        Γöé
  8575. Γöé     Γöé                    ΓöéDosExitList                        Γöé
  8576. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8577. Γöé-11  ΓöéDBG_N_AsyncStop     ΓöéAsync Stop detected                Γöé
  8578. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8579. Γöé-12  ΓöéDBG_N_NewProc       ΓöéNew Process started                Γöé
  8580. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8581. Γöé-13  ΓöéDBG_N_AliasFree     ΓöéAlias needs to be freed            Γöé
  8582. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8583. Γöé-14  ΓöéDBG_N_Watchpoint    ΓöéWatchpoint hit                     Γöé
  8584. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8585. Γöé-15  ΓöéDBG_N_ThreadCreate  ΓöéThread creation                    Γöé
  8586. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8587. Γöé-16  ΓöéDBG_N_ModuleFree    ΓöéModule freed                       Γöé
  8588. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8589. Γöé-17  ΓöéDBG_N_RangeStep     ΓöéRange Step detected                Γöé
  8590. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8591.  
  8592. Note:  References to "IP" in the data return descriptions refer to the 
  8593.        instruction pointer address. This is the 32-bit equivalent of the CS:EIP 
  8594.        instruction pointer, regardless of the CS selector. This is also known 
  8595.        as a linearized instruction pointer. 
  8596.  
  8597.  Some notifications (such as DBG_N_ModuleLoad and DBG_N_Watchpoint) may require 
  8598.  multiple returns to the debugger. These additional pending notifications will 
  8599.  be returned before the process being debugged can execute any more user code, 
  8600.  and will be returned on the DBG_C_Go, DBG_C_SStep, or DBG_C_Stop commands. 
  8601.  
  8602.  Note that more notifications might be pending at any time, so a debugger 
  8603.  should be ready to handle any notification at any time that a DBG_C_Go, 
  8604.  DBG_C_SStep, or DBG_C_Stop command is issued. 
  8605.  
  8606.  If DosDebug returns ERROR_INTERRUPT after a command, the next notification 
  8607.  might have been lost. If the process being debugged was executing code at that 
  8608.  time (via a DBG_C_Go, DBG_C_SStep or DBG_C_RangeStep command), it will be 
  8609.  stopped automatically. To prevent this, DosDebug should not be used by thread 
  8610.  1 while signals are being used, or the debugger should issue 
  8611.  DosEnterMustComplete before issuing the command. 
  8612.  
  8613.  
  8614. ΓòÉΓòÉΓòÉ 3.5.1. DBG_N_Success ΓòÉΓòÉΓòÉ
  8615.  
  8616. Debug Notification 0 - Success Notification 
  8617.  
  8618. This notification returns: 
  8619.  
  8620.  Cmd    = DBG_N_Success 
  8621.  
  8622.  The DosDebug command was successful. Returned values depend on the command 
  8623.  just executed. 
  8624.  
  8625.  
  8626. ΓòÉΓòÉΓòÉ 3.5.2. DBG_N_Error ΓòÉΓòÉΓòÉ
  8627.  
  8628. Debug Notification -1 - Error Notification 
  8629.  
  8630. This notification returns: 
  8631.  
  8632.  Cmd    = DBG_N_Error 
  8633.  Value  = Any standard error code 
  8634.  
  8635.  An error was detected while attempting a DosDebug command. 
  8636.  
  8637.  Error codes are returned from DosDebug in different ways: 
  8638.  
  8639.    1. Errors can be returned via the standard method (EAX = ERROR_CODE). 
  8640.  
  8641.       This is only done when the DosDebug command failed to execute at all. An 
  8642.       example of this would be ERROR_INTERRUPT when the debugger receives a 
  8643.       signal. If DosDebug returns a nonzero value in the EAX register, the 
  8644.       returned Debug buffer is invalid. 
  8645.  
  8646.    2. Errors are also returned via the DBG_N_Error notification. 
  8647.  
  8648.       This is used when the DosDebug command was attempted, but failed due to 
  8649.       some internal DosDebug failure. Examples of error codes returned via this 
  8650.       interface are ERROR_INVALID_PROCID and ERROR_INVALID_DATA. Generally, 
  8651.       these errors are detected while in the context of the debuggee process, 
  8652.       and may include ERROR_INTERRUPT. 
  8653.  
  8654.  
  8655. ΓòÉΓòÉΓòÉ 3.5.3. DBG_N_ProcTerm ΓòÉΓòÉΓòÉ
  8656.  
  8657. Debug Notification -6 - Process Termination Notification 
  8658.  
  8659. This notification returns: 
  8660.  
  8661.  Cmd    = DBG_N_ProcTerm 
  8662.  Value  = Process Exit Code 
  8663.  Index  = Process Exit Type 
  8664.  Addr   = 0 
  8665.  
  8666.  The debuggee process is about to terminate. 
  8667.  
  8668.  The debugger is still allowed to examine the debuggee's final register and 
  8669.  memory contents at this time. Note that when the debugger has completed this 
  8670.  examination, it should finish terminating the debuggee process with a final 
  8671.  DBG_C_Go, DBG_C_SStep, or DBG_C_Term command. 
  8672.  
  8673.  Value and Index contain the same information as that returned via a subsequent 
  8674.  DosWaitChild call. The act of collecting this information does not terminate 
  8675.  the process. 
  8676.  
  8677.  
  8678. ΓòÉΓòÉΓòÉ 3.5.4. DBG_N_Exception ΓòÉΓòÉΓòÉ
  8679.  
  8680. Debug Notification -7 - General Exception Notification 
  8681.  
  8682. This notification returns: 
  8683.  
  8684.      For the pre-first chance for a breakpoint exception: 
  8685.  
  8686.       Cmd         = DBG_N_Exception 
  8687.       Value       = 0 (DBG_X_PRE_FIRST_CHANCE) 
  8688.       Addr        = Linear address of breakpoint 
  8689.       Buffer      = Exception number (XCPT_BREAKPOINT) (0xC000009F) 
  8690.  
  8691.      For the pre-first chance for a single-step exception: 
  8692.  
  8693.       Cmd         = DBG_N_Exception 
  8694.       Value       = 0 (DBG_X_PRE_FIRST_CHANCE) 
  8695.       Addr        = Linear address of instruction after Single Step 
  8696.       Buffer      = Exception number (XCPT_SINGLE_STEP) (0xC00000A0) 
  8697.  
  8698.      For the first chance for all exceptions: 
  8699.  
  8700.       Cmd         = DBG_N_Exception 
  8701.       Value       = 1 (DBG_X_FIRST_CHANCE) 
  8702.       Addr        = Linear address of exception 
  8703.       Buffer      = Pointer to Exception Report Record in debuggee's context 
  8704.       Len         = Pointer to Exception Context Record in debuggee's context 
  8705.  
  8706.      For the last chance for all exceptions: 
  8707.  
  8708.       Cmd         = DBG_N_Exception 
  8709.       Value       = 2 (DBG_X_LAST_CHANCE) 
  8710.       Addr        = Linear address of exception 
  8711.       Buffer      = Pointer to Exception Report Record in debuggee's context 
  8712.       Len         = Pointer to Exception Context Record in debuggee's context 
  8713.  
  8714.      For an invalid stack notification: 
  8715.  
  8716.       Cmd         = DBG_N_Exception 
  8717.       Value       = 3 (DBG_X_STACK_INVALID) 
  8718.       Addr        = Linear address of exception 
  8719.       Buffer      = Exception number 
  8720.  
  8721.  The scenarios under which a debug exception is reported are pre-first, first, 
  8722.  and last chance, and invalid stack notification. The Value field of the user 
  8723.  debug buffer indicates the scenario. 
  8724.  
  8725.  DosDebug has detected an exception (a trap or a fault) at the specified 
  8726.  address. The exception number in the exception structure identifies the 
  8727.  exception that was detected. 
  8728.  
  8729.  Exception notifications are always returned from the context of the thread 
  8730.  that detected the exception. That is, the exception structure reflects the 
  8731.  state of the thread that caused the exception, at the time the exception was 
  8732.  detected. 
  8733.  
  8734.  The debugger is given a maximum of two chances to handle exceptions other than 
  8735.  single-step or breakpoint exceptions, which have a maximum of three chances. 
  8736.  The order of operations for handling an exception is as follows: 
  8737.  
  8738.    1. Debugger has the pre-first chance to handle the exception (for breakpoint 
  8739.       and single-step exceptions). 
  8740.    2. Debugger has the first chance to handle the exception, or to invoke an 
  8741.       exception handler if it is present. 
  8742.    3. Debugger has the last chance to handle the exception, or to invoke an 
  8743.       exception handler if it is present. 
  8744.  
  8745.  An exception notification is returned for all exceptions, including those 
  8746.  raised by the user via DosRaiseException. 
  8747.  
  8748.  An exception can have an informational, warning, or fatal severity. The 
  8749.  severity is coded in the high-order three bits of the exception number for 
  8750.  user-raised and system exceptions. 
  8751.  
  8752.  The debugger may dismiss the exception by returning XCPT_CONTINUE_EXECUTION, 
  8753.  so that the user's context is restored, and execution continues at the point 
  8754.  where the exception occurred. Otherwise, the debugger may return 
  8755.  XCPT_CONTINUE_SEARCH. This causes the exception to be passed to the user's 
  8756.  exception handlers (after the debugger's first chance), or causes the default 
  8757.  action for the exception to occur (after the debugger's last chance). 
  8758.  
  8759.  For performance reasons, the single-step and breakpoint exceptions cause a 
  8760.  "pre-first" notification. This is faster than the ordinary first exception 
  8761.  notification. At the time of the notification, the debugger may decide if the 
  8762.  single-step or breakpoint exception was an anticipated event. If it was 
  8763.  anticipated, the debugger may return XCPT_CONTINUE_EXECUTION, as for an 
  8764.  ordinary first notification. If it was not anticipated, the debugger may 
  8765.  return XCPT_CONTINUE_SEARCH  in order to raise an ordinary first notification 
  8766.  for the single-step or breakpoint exception. With the second notification, 
  8767.  this allows a maximum of three notifications for the single-step and 
  8768.  breakpoint exceptions. 
  8769.  
  8770.  For breakpoint exceptions, the instruction pointer (EIP) of the debuggee is 
  8771.  decremented to point to the breakpoint instruction. 
  8772.  
  8773.  Note:  Do not confuse the family of floating point exceptions with the 
  8774.         DBG_N_CoError error notification. 
  8775.  
  8776.  Restrictions 
  8777.  
  8778.  The error code may not be reliable in some situations for the page fault 
  8779.  exception, due to hardware errors. 
  8780.  
  8781.  
  8782. ΓòÉΓòÉΓòÉ 3.5.5. DBG_N_ModuleLoad ΓòÉΓòÉΓòÉ
  8783.  
  8784. Debug Notification -8 - Module Load Notification 
  8785.  
  8786. This notification returns: 
  8787.  
  8788.  Cmd    = DBG_N_ModuleLoad 
  8789.  Value  = MTE (Module Table Entry) handle of newly attached module 
  8790.  Addr   = 0 
  8791.  
  8792.  A module has just been loaded.  This occurs either at program startup, or 
  8793.  during a call to DosLoadModule. 
  8794.  
  8795.  The newly attached module's handle is returned via Value. You can use this 
  8796.  handle with DosQueryModuleName, or with the Debug DBG_C_NumToAddr command, for 
  8797.  symbolic debugging. A debugger should save these handles for future reference. 
  8798.  
  8799.  There may be many module attachments done at one time, but DosDebug is only 
  8800.  able to communicate a single load during any one notification. In this case, 
  8801.  the additional library load notifications become pending. The debugger should 
  8802.  issue repeated DBG_C_Stop commands to be notified of these additional library 
  8803.  loads, until Success is returned from the DBG_C_Stop command. If the DBG_C_Go, 
  8804.  DBG_C_SStep, or DBG_C_RangeStep commands are issued instead of the DBG_C_Stop 
  8805.  command, the pending notifications will be returned immediately, until there 
  8806.  are no further notifications. 
  8807.  
  8808.  
  8809. ΓòÉΓòÉΓòÉ 3.5.6. DBG_N_CoError ΓòÉΓòÉΓòÉ
  8810.  
  8811. Debug Notification -9 - Coprocessor Error Notification 
  8812.  
  8813. This notification returns: 
  8814.  
  8815.  Cmd    = DBG_N_CoError 
  8816.  Value  = Any standard Error Code 
  8817.  
  8818.  An error was detected while attempting a DosDebug command that attempted to 
  8819.  access a Coprocessor. 
  8820.  
  8821.  DBG_N_CoError is similar to the DBG_N_Error notification, but is returned only 
  8822.  after attempting an access to the coprocessor registers. 
  8823.  
  8824.  DBG_N_CoError is returned if any one of the following occurs: 
  8825.  
  8826.      The debuggee process is emulating the coprocessor. 
  8827.      The specified debuggee thread has not yet attempted to use the 
  8828.       coprocessor. 
  8829.      The wrong coprocessor type is used. 
  8830.      The requested coprocessor type is not supported or available. 
  8831.  
  8832.  This notification should not be confused with any of the floating point 
  8833.  exception notifications. 
  8834.  
  8835.  
  8836. ΓòÉΓòÉΓòÉ 3.5.7. DBG_N_ThreadTerm ΓòÉΓòÉΓòÉ
  8837.  
  8838. Debug Notification -10 - Thread Termination Notification 
  8839.  
  8840. This notification returns: 
  8841.  
  8842.  Cmd    = DBG_N_ThreadTerm 
  8843.  Value  = Thread's proposed return code (from DosExit) 
  8844.  Addr   = 0 
  8845.  
  8846.  A debuggee thread is about to terminate. 
  8847.  
  8848.  DosExitList processing has not yet been started. 
  8849.  
  8850.  The debugger is still allowed to examine the debuggee thread' signal register 
  8851.  contents at this time. When the debugger has completed this examination, it 
  8852.  should finish terminating the debuggee thread with a final DBG_C_Go or 
  8853.  DBG_C_SStep command. 
  8854.  
  8855.  Value contains the return code from the thread. This is only a proposed return 
  8856.  code passed from DosExit. Only when the process actually terminates is the 
  8857.  return code that is passed to DosWaitChild finally known. 
  8858.  
  8859.  
  8860. ΓòÉΓòÉΓòÉ 3.5.8. DBG_N_AsyncStop ΓòÉΓòÉΓòÉ
  8861.  
  8862. Debug Notification -11 - Asynchronous Stop Notification 
  8863.  
  8864. This notification returns: 
  8865.  
  8866.  Cmd    = DBG_N_AsyncStop 
  8867.  Value  = 0 
  8868.  Addr   = 0 
  8869.  
  8870.  An Asynchronous Stop request has been detected. 
  8871.  
  8872.  The asynchronous stop command is used to get the attention of some debuggee 
  8873.  thread, so that the debugger can again control the process. Because any 
  8874.  notification results in the debuggee's coming under control of the debugger 
  8875.  again, the asynchronous stop notification becomes redundant in that case, and 
  8876.  is not returned. 
  8877.  
  8878.  The asynchronous stop request will be overridden and ignored if another 
  8879.  notification can be performed instead, at the same time. An asynchronous stop 
  8880.  notification never becomes a "pending" notification, in the sense that a 
  8881.  library load notification becomes pending. 
  8882.  
  8883.  
  8884. ΓòÉΓòÉΓòÉ 3.5.9. DBG_N_NewProc ΓòÉΓòÉΓòÉ
  8885.  
  8886. Debug Notification -12 - New Process Notification 
  8887.  
  8888. This notification returns: 
  8889.  
  8890.  Cmd    = DBG_N_NewProc 
  8891.  Value  = Process ID of the new process 
  8892.  Addr   = 0 
  8893.  
  8894.  The debuggee process has just started a child process, and that child process 
  8895.  needs to be debugged. 
  8896.  
  8897.  Note:  This notification occurs only if descendant debugging was specified in 
  8898.         the DosExecPgm call that started the process tree in which the debuggee 
  8899.         is executing. 
  8900.  
  8901.  
  8902. ΓòÉΓòÉΓòÉ 3.5.10. DBG_N_AliasFree ΓòÉΓòÉΓòÉ
  8903.  
  8904. Debug Notification -13 - Alias Free Notification 
  8905.  
  8906. This notification returns: 
  8907.  
  8908.  Cmd    = DBG_N_AliasFree 
  8909.  Buffer = 32-bit offset to debugger alias region 
  8910.  Addr   = 0 
  8911.  
  8912.  An object that contains an aliased region is about to be freed by the 
  8913.  debuggee. This can also occur if the underlying memory object is about to be 
  8914.  shrunk such that the alias would span memory outside the resultant object. 
  8915.  
  8916.  The alias region must be unmapped before the debugger may execute the debuggee 
  8917.  again. 
  8918.  
  8919.  The DBG_C_UnMapAlias command is the proper response to an alias free 
  8920.  notification. 
  8921.  
  8922.  If a debugger creates an alias to memory in another debugger, and that memory 
  8923.  is itself an alias to the second debugger's debuggee, then the first debugger 
  8924.  will not receive an alias free notification when the memory of the second 
  8925.  debugger's debuggee is freed. The alias will be freed automatically. The 
  8926.  second debugger will receive an alias free notification. 
  8927.  
  8928.  
  8929. ΓòÉΓòÉΓòÉ 3.5.11. DBG_N_Watchpoint ΓòÉΓòÉΓòÉ
  8930.  
  8931. Debug Notification -14 - Watchpoint Hit Notification 
  8932.  
  8933. This notification returns: 
  8934.  
  8935.  Cmd    = DBG_N_Watchpoint 
  8936.  Addr   = Linearized instruction pointer of watchpoint hit 
  8937.  Value  = Process ID of process that hit the watchpoint 
  8938.  Len    = Thread ID of thread that hit the watchpoint 
  8939.  MTE    = Module Table Entry handle of process that hit the watchpoint 
  8940.  Index  = Watchpoint ID number 
  8941.  
  8942.  A watchpoint has been hit. The Watchpoint ID number identifies the watchpoint 
  8943.  that was hit. 
  8944.  
  8945.  Multiple watchpoint hits become pending notifications that are returned on 
  8946.  subsequent DBG_C_Stop, DBG_C_Go, or DBG_C_SStep commands. A watchpoint may be 
  8947.  hit at any time, and more than one watchpoint may be hit at the same time. 
  8948.  
  8949.  If a watchpoint notification is pending, the resources used by the watchpoint 
  8950.  will not be freed until the watchpoint notification is complete, or the 
  8951.  watchpoint is cleared. 
  8952.  
  8953.  A watchpoint notification is not always returned by the same thread that 
  8954.  caused the hit. A watchpoint may be hit by one thread, but another thread may 
  8955.  return the notification. The thread ID of the thread that hit the watchpoint 
  8956.  is not necessarily the value passed in the Tid field. 
  8957.  
  8958.  Data Watchpoint hits are treated as faults, rather than as traps, by the 80386 
  8959.  processor. Therefore, the linearized instruction pointer may not point to the 
  8960.  exact instruction that caused the fault. 
  8961.  
  8962.  If a watchpoint is hit at interrupt time, the Value, Addr, MTE, and Len fields 
  8963.  are all returned as zero. 
  8964.  
  8965.  
  8966. ΓòÉΓòÉΓòÉ 3.5.12. DBG_N_ThreadCreate ΓòÉΓòÉΓòÉ
  8967.  
  8968. Debug Notification -15 - Thread Creation Notification 
  8969.  
  8970. This notification returns: 
  8971.  
  8972.  Cmd    = DBG_N_ThreadCreate 
  8973.  Tid    = Thread ID of new thread 
  8974.  Addr   = 0 
  8975.  
  8976.  A debuggee thread has just been created. 
  8977.  
  8978.  The new thread has not executed any user code yet. 
  8979.  
  8980.  
  8981. ΓòÉΓòÉΓòÉ 3.5.13. DBG_N_ModuleFree ΓòÉΓòÉΓòÉ
  8982.  
  8983. Debug Notification -16 - Module Free Notification 
  8984.  
  8985. This notification returns: 
  8986.  
  8987.  Cmd    = DBG_N_ModuleFree 
  8988.  Value  = MTE (Module Table Entry) handle of freed module 
  8989.  Addr   = 0 
  8990.  
  8991.  A module has just been freed. This occurs either at program termination, or 
  8992.  during execution of the DosFreeModule. 
  8993.  
  8994.  The newly attached module's handle is returned via Value. You can use this 
  8995.  handle with DosQueryModuleName, or with the DosDebug DBG_C_NumToAddr command, 
  8996.  for symbolic debugging. A debugger should save these handles for future 
  8997.  reference. 
  8998.  
  8999.  There may be many modules freed at one time, but DosDebug is only able to 
  9000.  communicate the freeing of a single module during any one notification. In 
  9001.  this case, the additional notifications of freed modules become pending. The 
  9002.  debugger should issue repeated DBG_C_Stop commands to be notified of these 
  9003.  additional module freeing operations, until DBG_N_Error is returned from the 
  9004.  DBG_C_Stop command. If the DBG_C_Go or DBG_C_SStep commands are issued instead 
  9005.  of the DBG_C_Stop command, the pending notifications will be returned 
  9006.  immediately, until there are no further notifications. 
  9007.  
  9008.  
  9009. ΓòÉΓòÉΓòÉ 3.5.14. DBG_N_RangeStep ΓòÉΓòÉΓòÉ
  9010.  
  9011. Debug Notification -17 - Range Step Notification 
  9012.  
  9013. This notification returns: 
  9014.  
  9015.  Cmd    = DBG_N_RangeStep 
  9016.  Addr   = Linearized instruction pointer at exception 
  9017.  Value  = Linearized instruction pointer of last user instruction executed 
  9018.  
  9019.  The debuggee stopped range-stepping because its linearized instruction pointer 
  9020.  was outside the original range, or because the current linearized instruction 
  9021.  pointer is equal to the linearized instruction pointer of the previous user 
  9022.  instruction. 
  9023.  
  9024.  The DBG_N_RangeStep notification is returned independently of the 
  9025.  DBG_N_Watchpoint notification, even though the Watchpoint fault and the 
  9026.  RangeStep may have occurred at the exact same time. 
  9027.  
  9028.  
  9029. ΓòÉΓòÉΓòÉ 4. Device I/O ΓòÉΓòÉΓòÉ
  9030.  
  9031. Devices used with computers include the keyboard, video display, mouse, floppy 
  9032. and fixed disk drives, and external systems, such as modems and printers. This 
  9033. chapter describes the OS/2 functions used to access and control such devices. 
  9034.  
  9035. The following topics are related to the information in this chapter: 
  9036.  
  9037.      File systems 
  9038.      File names 
  9039.      File management 
  9040.      Semaphores 
  9041.  
  9042.  
  9043. ΓòÉΓòÉΓòÉ 4.1. About Device I/O ΓòÉΓòÉΓòÉ
  9044.  
  9045. OS/2 uses devices to communicate with the real world. A device is a piece of 
  9046. hardware used for input and output. The keyboard and screen are devices, as are 
  9047. serial and parallel ports. The computer's speaker, which can be made to beep 
  9048. using DosBeep, is a device. 
  9049.  
  9050.  
  9051. ΓòÉΓòÉΓòÉ 4.1.1. Accessing Devices ΓòÉΓòÉΓòÉ
  9052.  
  9053. OS/2 applications usually communicate with devices through OS/2. Some devices, 
  9054. like the screen, have their own set of supporting functions. Most other devices 
  9055. can be accessed by using the standard OS/2 file system functions- DosOpen, 
  9056. DosRead, DosWrite, and DosClose. Using the file system functions, an 
  9057. application can open and access the device just as it would a disk file. Using 
  9058. the file system also enables applications to redirect the device's I/O stream. 
  9059.  
  9060. Sometimes however, these higher-level approaches do not suffice. For these 
  9061. situations, OS/2 provides several functions that interface with devices at a 
  9062. lower level. DosDevConfig is used to retrieve information about the devices 
  9063. available. DosPhysicalDisk can be used to retrieve information about a 
  9064. partitionable hard disk. DosDevIOCtl is used to send device-specific commands 
  9065. directly to a particular device driver. 
  9066.  
  9067.  
  9068. ΓòÉΓòÉΓòÉ 4.1.2. Device Names ΓòÉΓòÉΓòÉ
  9069.  
  9070. To open a device using DosOpen, the application must supply the reserved name 
  9071. for that device. For example, to open the console (both keyboard and screen), 
  9072. you must specify the name CON. 
  9073.  
  9074. The following table shows some of the common reserved device names: 
  9075.  
  9076. Common Device Names 
  9077.  
  9078. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9079. ΓöéDevice NameΓöéDescription                                       Γöé
  9080. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9081. ΓöéCON        ΓöéThe system console. This device consists of both  Γöé
  9082. Γöé           Γöéthe keyboard and the screen. You can open CON for Γöé
  9083. Γöé           Γöéreading (from the keyboard), writing (to the      Γöé
  9084. Γöé           Γöéscreen), or both.                                 Γöé
  9085. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9086. ΓöéCOM1       ΓöéSerial port 1. You can open this device for       Γöé
  9087. Γöé           Γöéreading, writing, or both. Other serial ports willΓöé
  9088. Γöé           Γöéhave names in ascending sequence-COM2, COM3, and  Γöé
  9089. Γöé           Γöéso on.                                            Γöé
  9090. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9091. ΓöéPRN        ΓöéThe default printer port. This device corresponds Γöé
  9092. Γöé           Γöéto one of the system's parallel ports, usually    Γöé
  9093. Γöé           ΓöéLPT1. You can open it for writing but not for     Γöé
  9094. Γöé           Γöéreading.                                          Γöé
  9095. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9096. ΓöéLPT1       ΓöéParallel port 1. You can open this device for     Γöé
  9097. Γöé           Γöéwriting but not for reading. Other parallel ports Γöé
  9098. Γöé           Γöéwill have names in ascending sequence-LPT2, LPT3, Γöé
  9099. Γöé           Γöéand so on.                                        Γöé
  9100. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9101. ΓöéNUL        ΓöéThe null device. This device provides a method of Γöé
  9102. Γöé           Γöédiscarding output. If you open this device for    Γöé
  9103. Γöé           Γöéwriting, any data written to the file is          Γöé
  9104. Γöé           Γöédiscarded. If you open the device for reading, anyΓöé
  9105. Γöé           Γöéattempt to read from the file returns an          Γöé
  9106. Γöé           Γöéend-of-file mark.                                 Γöé
  9107. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9108. ΓöéSCREEN$    ΓöéThe screen. This device can be written to but not Γöé
  9109. Γöé           Γöéread from. Writing to the screen is similar to    Γöé
  9110. Γöé           Γöéwriting to the system console. Bytes are displayedΓöé
  9111. Γöé           Γöéas characters (unless the ANSI screen driver is   Γöé
  9112. Γöé           Γöéloaded and the character represents an ANSI escapeΓöé
  9113. Γöé           Γöésequence).                                        Γöé
  9114. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9115. ΓöéKBD$       ΓöéThe keyboard. This device can be read from but notΓöé
  9116. Γöé           Γöéwritten to. Reading from the keyboard is similar  Γöé
  9117. Γöé           Γöéto reading from the system console.               Γöé
  9118. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9119.  
  9120. After an application uses a device, it should close it by using DosClose. 
  9121.  
  9122.  
  9123. ΓòÉΓòÉΓòÉ 4.1.3. Device Drivers ΓòÉΓòÉΓòÉ
  9124.  
  9125. OS/2 communicates with devices through special programs called device drivers. 
  9126. A device driver acts as an interface between OS/2, together with its 
  9127. applications, and a physical device such as the keyboard, mouse, or printer. 
  9128. The device driver sends data to and receives data from a device, resolving 
  9129. device-independent requests from applications with the device-specific 
  9130. attributes of the device. 
  9131.  
  9132. The primary method of communication between OS/2 and a device driver is request 
  9133. packets. OS/2 receives I/O requests from applications and sends data in the 
  9134. form of request packets to the device driver. The device driver communicates 
  9135. with the device either directly or through the BIOS and ABIOS interfaces. 
  9136. (Applications can communicate with device drivers also, by using DosDevIOCtl. 
  9137. See IOCtl Interface) 
  9138.  
  9139. Devices work differently depending on the device driver installed. For example, 
  9140. if an application writes to the system console, each byte is interpreted as a 
  9141. character and is displayed on the screen. If, however, the ANSI display driver 
  9142. is loaded, some byte sequences direct the system to carry out certain actions 
  9143. on the screen, such as moving the cursor or clearing the screen. These byte 
  9144. sequences are called ANSI escape sequences. 
  9145.  
  9146. Some devices are available to applications only if the appropriate device 
  9147. driver is installed. For example, an application cannot open a serial port 
  9148. unless a communications device driver, such as COM.SYS, has been loaded by 
  9149. using a DEVICE= command in CONFIG.SYS. 
  9150.  
  9151.  
  9152. ΓòÉΓòÉΓòÉ 4.1.4. IOCtl Interface ΓòÉΓòÉΓòÉ
  9153.  
  9154. Many devices have more than one operating mode. For example, a serial port 
  9155. typically can operate at a variety of bit rates (sometimes called baud rates). 
  9156. Because the modes are unique to each device, OS/2 does not include specific 
  9157. functions to set or retrieve these modes. Instead OS/2 provides an I/O Control 
  9158. (IOCtl) interface to enable applications to control devices by communicating 
  9159. directly with the device driver. 
  9160.  
  9161. The IOCtl interface is a method that an application or subsystem can use to 
  9162. send device-specific control commands to a device driver. The IOCtl interface 
  9163. function for OS/2 applications is DosDevIOCtl. 
  9164.  
  9165. DosDevIOCtl provides a generic, expandable IOCtl facility. Applications send 
  9166. commands and data to the device driver with DosDevIOCtl. The OS/2 kernel 
  9167. reformats the generic IOCtl packets into request packets then calls the device 
  9168. driver. The device driver then carries out the specified action. IOCtl commands 
  9169. can be sent to both block and character device drivers. 
  9170.  
  9171. Before using DosDevIOCtl, the application or subsystem must first obtain the 
  9172. device handle by calling DosOpen for the device name. The opened device handle 
  9173. is used to specify the device the command is to go to. 
  9174.  
  9175. Refer to the Control Program Programming Reference for details of DosDevIOCtl. 
  9176.  
  9177.  
  9178. ΓòÉΓòÉΓòÉ 4.1.5. IOCtl Commands ΓòÉΓòÉΓòÉ
  9179.  
  9180. DosDevIOCtl has many subfunctions. These are called generic IOCtl commands and 
  9181. typically are used to retrieve data from a device driver that is not available 
  9182. through standard OS/2 functions. For example, an application can use these 
  9183. functions to set the bit rate of a serial port or read input directly from a 
  9184. sector on a disk. 
  9185.  
  9186.  
  9187. ΓòÉΓòÉΓòÉ 4.1.5.1. Category and Function Codes ΓòÉΓòÉΓòÉ
  9188.  
  9189. Each IOCtl function has a category and a function code. The category defines 
  9190. the type of device to be accessed. OS/2 has several predefined categories. In 
  9191. general, all codes in the range 0x0000 through 0x007F are reserved for 
  9192. predefined categories. A device driver can use additional categories, but they 
  9193. must be explicitly defined by the device and be in the range 0x0080 through 
  9194. 0x00FF. 
  9195.  
  9196. In each category, a function code defines the action to carry out, such as 
  9197. reading from or writing to the device and retrieving or setting the device 
  9198. modes. The number and meaning of each function code depend on the device driver 
  9199. and the specified category. 
  9200.  
  9201.  
  9202. ΓòÉΓòÉΓòÉ 4.1.5.2. Parameter and Data Packets ΓòÉΓòÉΓòÉ
  9203.  
  9204. DosDevIOCtl uses a parameter packet and a data packet to pass information to 
  9205. and from the device driver. The packets can vary in format and length, 
  9206. depending on the IOCtl function. Simple functions might use only a single 
  9207. variable, while more complex functions might require a more complex data 
  9208. structure for the parameter packet, the data packet, or both. 
  9209.  
  9210.  
  9211. ΓòÉΓòÉΓòÉ 4.2. Using the File System to Access Devices ΓòÉΓòÉΓòÉ
  9212.  
  9213. An application can use the OS/2 file system functions-DosOpen, DosRead, 
  9214. DosWrite, and DosClose-with the standard (predefined) devices. The application 
  9215. simply specifies the name of the device in the call to DosOpen, then uses the 
  9216. returned handle to read from and write to the device. When the application has 
  9217. finished using the device, the application should close the device handle by 
  9218. using DosClose. 
  9219.  
  9220. The following code fragment shows how an application can open the COM1 device 
  9221. (serial port 1) and write the contents of a disk file to the communications 
  9222. port: 
  9223.  
  9224. Uses
  9225.   Crt,Dos,Os2Def,Os2Base;
  9226.  
  9227. Var
  9228.   AbBuf                     : Array[0..511] of BYTE;
  9229.   HfCom,HfFile              : HFILE;
  9230.   UlAction,cbRead,cbWritten : ULONG;
  9231.  
  9232. Begin
  9233.   DosOpen('COM1',
  9234.           hfCom,
  9235.           ulAction,
  9236.           0,
  9237.           FILE_NORMAL,
  9238.           FILE_OPEN,
  9239.           OPEN_ACCESS_READWRITE or
  9240.           OPEN_SHARE_DENYNONE,
  9241.           nil);
  9242.   DosOpen('testfile',
  9243.           hfFile,
  9244.           ulAction,
  9245.           0,
  9246.           FILE_NORMAL,
  9247.           FILE_OPEN,
  9248.           OPEN_ACCESS_READONLY or
  9249.           OPEN_SHARE_DENYWRITE,
  9250.           nil);
  9251.   Repeat
  9252.     DosRead(hfFile,abBuf,sizeof(abBuf),cbRead);
  9253.     DosWrite(hfCom,abBuf,cbRead,cbWritten);
  9254.   Until cbRead <> 0;
  9255.   DosClose(hfCom);
  9256.   DosClose(hfFile);
  9257. End.
  9258.  
  9259. Note:  In this example code fragment and the ones that follow, error checking 
  9260.        was left out to conserve space. Applications should always check the 
  9261.        return code that the functions return. Control Program functions return 
  9262.        an APIRET value. A return code of 0 indicates success. If a non-zero 
  9263.        value is returned, an error occurred. 
  9264.  
  9265.  
  9266. ΓòÉΓòÉΓòÉ 4.3. Using IOCtl Functions to Access Devices ΓòÉΓòÉΓòÉ
  9267.  
  9268. Many OS/2 functions communicate with devices. Usually, this communication is 
  9269. transparent to the application (the application has no knowledge of how the 
  9270. communication actually occurs). At times, however, an application requires more 
  9271. direct access to a device. To accommodate this need, OS/2 furnishes 
  9272. DosDevIOCtl. Applications can use DosDevIOCtl to send commands and data to a 
  9273. device driver; the device driver interprets these commands and sends the 
  9274. appropriate instructions to the physical device. 
  9275.  
  9276. As an example, some devices have several operating modes. A communications port 
  9277. can operate at one of a number of bit rates and have several data-word formats. 
  9278. The actual commands to set these parameters might vary, depending on the 
  9279. communications hardware. 
  9280.  
  9281. Named constants have been defined for the categories, functions, and commands 
  9282. that are passed to a device driver, to make it easier for application 
  9283. programmers to use DosDevIOCtl. These named constants are defined in the file 
  9284. BSEDEV.H. This file must be included in your application when you use the 
  9285. constants. This file also contains data structure definitions for the parameter 
  9286. and data packets commonly used with DosDevIOCtl. The following examples use the 
  9287. communications port to demonstrate how DosDevIOCtl works. 
  9288.  
  9289.  
  9290. ΓòÉΓòÉΓòÉ 4.3.1. Setting Communications-Port Parameters ΓòÉΓòÉΓòÉ
  9291.  
  9292. You can use DosDevIOCtl to control the data parameters (bit rate, stop bits, 
  9293. parity, and data bits) of a communications port and to get the status of the 
  9294. COM port. The IOCTL_ASYNC category is used for communications-port control. The 
  9295. ASYNC_SETBAUDRATE function sets the COM port transmission rate. The 
  9296. ASYNC_GETCOMMSTATUS returns the COM port status-byte. 
  9297.  
  9298.  
  9299. ΓòÉΓòÉΓòÉ 4.3.1.1. Setting the Data Rate ΓòÉΓòÉΓòÉ
  9300.  
  9301. The ASYNC_SETBAUDRATE function sets the bit rate of a communications port. 
  9302.  
  9303. The following code fragment sets the bit rate of COM1 to 9600 bits per second: 
  9304.  
  9305. Uses
  9306.   Crt,Dos,Os2Def,Os2Base;
  9307.  
  9308. Var
  9309.   Hf        : HFILE;  (* File handle for the device           *)
  9310.   UsBPS     : USHORT; (* Bit rate to set the COM port to      *)
  9311.   UlParmLen : ULONG;  (* Maximum size of the parameter packet *)
  9312.   UlAction  : ULONG;  (* Action taken by DosOpen              *)
  9313.   Ulrc      : APIRET; (* Return code                          *)
  9314.  
  9315. Begin
  9316.   UlParmLen := 2;
  9317.   UsBPS     := 9600;
  9318.  
  9319.   ulrc := DosOpen('COM1',
  9320.                   hf,
  9321.                   ulAction,
  9322.                   0,
  9323.                   FILE_NORMAL,
  9324.                   FILE_OPEN,
  9325.                   OPEN_ACCESS_READWRITE OR
  9326.                   OPEN_SHARE_DENYNONE,
  9327.                   nil);
  9328.  
  9329.   ulrc := DosDevIOCtl(hf,                (* Device handle                  *)
  9330.                       IOCTL_ASYNC,       (* Serial-device control          *)
  9331.                       ASYNC_SETBAUDRATE, (* Sets bit rate                  *)
  9332.                       usBPS,             (* Points at bit rate             *)
  9333.                       sizeof(usBPS),     (* Maximum size of parameter list *)
  9334.                       ulParmLen,         (* Size of parameter packet       *)
  9335.                       nil,               (* No data packet                 *)
  9336.                       0,                 (* Maximum size of data packet    *)
  9337.                       nil);              (* Size of data packet            *)
  9338.   .
  9339.   .   (* Use the COM port here. *)
  9340.   .
  9341.  
  9342.   ulrc := DosClose(hf);
  9343.  
  9344.  
  9345. ΓòÉΓòÉΓòÉ 4.3.1.2. Getting the COM Port Transmission Status ΓòÉΓòÉΓòÉ
  9346.  
  9347. The ASYNC_GETCOMMSTATUS function get the transmission status of the specified 
  9348. COM port. This function has no parameter packet. 
  9349.  
  9350. The following code fragment uses the ASYNC_GETCOMMSTATUS function to get the 
  9351. transmission status of COM1: 
  9352.  
  9353.  
  9354. Uses
  9355.   Crt,Dos,Os2Def,Os2Base;
  9356.  
  9357. Var
  9358.   Hf          : HFILE;  (* File handle for the device         *)
  9359.   UcStatus    : UCHAR;  (* The COM port status byte           *)
  9360.   UlStatusLen : ULONG;  (* Length of status (the data packet) *)
  9361.   UlAction    : ULONG;  (* Action taken by DosOpen            *)
  9362.   Rc          : APIRET; (* Return code                        *)
  9363.  
  9364. Begin
  9365.  
  9366.   rc := DosOpen('COM1', hf, ulAction, 0,
  9367.                 FILE_NORMAL, FILE_OPEN,
  9368.                 OPEN_ACCESS_READWRITE or OPEN_SHARE_DENYNONE,
  9369.                 nil);
  9370.  
  9371.   rc := DosDevIOCtl(hf,                  (* Device handle                    *)
  9372.                     IOCTL_ASYNC,         (* Serial-device control            *)
  9373.                     ASYNC_GETCOMMSTATUS, (* Get the COM status byte          *)
  9374.                     nil,                (* No parameter packet              *)
  9375.                     0,                   (* Maximum size of parameter packet *)
  9376.                     nil,                (* Length of parameter packet       *)
  9377.                     ucStatus,  (* Data packet                      *)
  9378.                     sizeof(ucStatus),    (* Maximum size of data packet      *)
  9379.                     ulStatusLen);       (* Length of data packet            *)
  9380.   .
  9381.   .   (* Use the COM port here. *)
  9382.   .
  9383.  
  9384.   rc := DosClose(hf);
  9385.  
  9386.  
  9387. ΓòÉΓòÉΓòÉ 5. Dynamic Linking ΓòÉΓòÉΓòÉ
  9388.  
  9389. This chapter describes: 
  9390.  
  9391.      Static versus dynamic linking 
  9392.      Dynamic link library (DLL) data 
  9393.      DLL initialization and termination 
  9394.      Building a DLL 
  9395.      Use of protected memory by DLLs 
  9396.  
  9397.  
  9398. ΓòÉΓòÉΓòÉ 5.1. Static Versus Dynamic Linking ΓòÉΓòÉΓòÉ
  9399.  
  9400. Most programmers are familiar with static linking; an application calls a 
  9401. routine or procedure whose code is not found in the application's source file. 
  9402. The routine is external to your source file and is declared as such.  When the 
  9403. source file is compiled, the compiler places an external reference for the 
  9404. routine in the application's object (.OBJ) file.  To create the executable file 
  9405. (.EXE) for the application, the application's object file is linked with an 
  9406. object file that contains the code for the routine.  The result is an EXE file 
  9407. that contains the application code, as well as a copy of the code for the 
  9408. routine. The following figure illustrates the process of building a statically 
  9409. linked application. 
  9410.  
  9411.    My_Application.OBJ
  9412.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9413.   Γöé EXTERNAL               Γöé
  9414.   Γöé     Your_Routine       Γöé
  9415.   @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  9416.  
  9417.   Γöé .                      Γöé                  My_Application.EXE
  9418.   Γöé .                      Γöé                 ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9419.   Γöé CALL ???; Your_Routine @>@ΓöÇΓöÇΓöÉ              Γöé .                Γöé
  9420.   Γöé                        Γöé  Γöé  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ    Γöé .                Γöé
  9421.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ  @>@ΓöÇΓöé LINK @>@ΓöÇΓöÇΓöÇΓöé CALL xxx         Γöé
  9422.                               Γöé  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ    Γöé .                Γöé
  9423.    Your_Library.OBJ           Γöé              Γöé                  Γöé
  9424.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  Γöé         xxx: Γöé Your_Routine:    Γöé
  9425.   Γöé PUBLIC                 Γöé  Γöé              Γöé                  Γöé
  9426.   Γöé     Your_Routine       Γöé  Γöé              ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9427.   @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  9428.   Γöé
  9429.   Γöé                        Γöé  Γöé
  9430.   Γöé Your_Routine:          Γöé  Γöé
  9431.   Γöé                        @>@ΓöÇΓöÇΓöÿ
  9432.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9433.  
  9434. Static Linking 
  9435.  
  9436. When OS/2 loads a statically linked program, all the code and data are 
  9437. contained in a single EXE file and the system can load it into memory all at 
  9438. once. 
  9439.  
  9440. The advantages and disadvantages of static linking are summarized in the 
  9441. following table. 
  9442.  
  9443. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9444. ΓöéAdvantages                    ΓöéDisadvantages                 Γöé
  9445. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9446. ΓöéCompile in pieces             ΓöéExternal routines built into  Γöé
  9447. Γöé                              ΓöéEXE (making EXEs larger)      Γöé
  9448. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9449. ΓöéCan create libraries of       ΓöéEXE cannot be changed without Γöé
  9450. Γöéroutines that can be linked   Γöérelinking.                    Γöé
  9451. Γöéwith applications.            Γöé                              Γöé
  9452. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9453. Γöé                              ΓöéExternal routines cannot be   Γöé
  9454. Γöé                              Γöéshared (duplicate copies of   Γöé
  9455. Γöé                              Γöélibraries).                   Γöé
  9456. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9457.  
  9458. Dynamic linking permits several applications to use a single copy of an 
  9459. executable module.  The executable module is completely separate from the 
  9460. applications that use it.  Several functions can be built into a DLL, and 
  9461. applications can use these functions as though they were part of the 
  9462. application's executable code.  You can change the dynamically-linked functions 
  9463. without recompiling or relinking the application. 
  9464.  
  9465. The advantages of dynamic linking are: 
  9466.  
  9467.       Reduced memory requirements 
  9468.  
  9469.       Many applications can use a single DLL simultaneously.  Since only one 
  9470.       copy of the DLL is in memory, this saves memory space and, in general, 
  9471.       the code is discardable. 
  9472.  
  9473.       Simplified application modification 
  9474.  
  9475.       An application can be enhanced or modified simply by changing a DLL. For 
  9476.       example, if an application uses a DLL to support video output, several 
  9477.       displays can be supported by different DLLs.  The application can use the 
  9478.       DLL that supports the appropriate display. 
  9479.  
  9480.       Flexible software support 
  9481.  
  9482.       DLLs can be used for after-market support.  In the display-driver 
  9483.       example, a new DLL can be provided to support a display that was not 
  9484.       available when the application was shipped.  Similarly, a database 
  9485.       application can support a new data-file format with a new DLL. 
  9486.  
  9487.       Transparent migration of function 
  9488.  
  9489.       The DLL functions can be used by applications without any understanding 
  9490.       of how the functions actually do their work.  Future changes to the DLL 
  9491.       are transparent to the application, as long as the input and output 
  9492.       parameters remain the same. 
  9493.  
  9494.       Multiple programming language support 
  9495.  
  9496.       A function in a DLL can be used by an application written in any 
  9497.       programming language, as long as the application understands the 
  9498.       function's calling convention. 
  9499.  
  9500.       Application-controlled memory usage 
  9501.  
  9502.       Applications can make decisions about which DLL routines they want to 
  9503.       load into memory and use.  If a DLL is not used, it does not have to be 
  9504.       loaded. 
  9505.  
  9506.  DLLs can be used to implement subroutine packages, subsystems, and interfaces 
  9507.  to other processes.  In OS/2: 
  9508.  
  9509.      Some DLLs are interfaces to the kernel. 
  9510.  
  9511.       The worker routines for the OS/2 API reside in the OS/2 kernel. 
  9512.       Applications, which run at privilege level 3, usually can make direct 
  9513.       calls to the kernel, which runs at privilege level 0.  Some calls, 
  9514.       however, must be linked through a DLL.  For example, an application that 
  9515.       calls DosOpen is linked to the DLL DOSCALL1.DDL.  This library contains 
  9516.       the definitions for some system functions.  When a system function is 
  9517.       called, OS/2 makes the call to the kernel on behalf of the application. 
  9518.  
  9519.      Some DLLs are interfaces to devices. 
  9520.  
  9521.       DLL subsystems can virtualize devices and manage the device for its 
  9522.       clients. 
  9523.  
  9524.      Some DLLs provide an open system architecture for software. 
  9525.  
  9526.       Add-ons to OS/2 can be provided easily and by anyone. 
  9527.  
  9528.  OS/2 provides two varieties of dynamic linking: load-time and run-time.  In 
  9529.  load-time dynamic linking, references are resolved when an application is 
  9530.  loaded.  In run-time dynamic linking, references are resolved when the 
  9531.  application runs. 
  9532.  
  9533.  
  9534. ΓòÉΓòÉΓòÉ 5.1.1. Load-Time Dynamic Linking ΓòÉΓòÉΓòÉ
  9535.  
  9536. Load-time dynamic linking is similar to static linking in that an application 
  9537. can call a routine that is not found in the application's source file.  In 
  9538. load-time dynamic linking, however, an application is linked with a library 
  9539. file that contains a record that describes where the routine can be found 
  9540. instead of with a file that contains the code for the routine.  The resulting 
  9541. application executable file contains this record and not a copy of the 
  9542. routine's code. The following figure illustrates the process of building a 
  9543. load-time dynamically linked application. 
  9544.  
  9545. In the example in the following figure, the LIB file contains a record that 
  9546. describes where the code for a set of functions can be found.  In this case, 
  9547. the code for the function Your_Routine can be found in the file, or module, 
  9548. Your_Routines.DLL under the entry point name Your_Routine.  (The entry point 
  9549. name does not have to match the function name.)  The function code also can be 
  9550. referenced by its ordinal value. 
  9551.  
  9552.    My_Application.OBJ
  9553.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9554.   Γöé EXTERNAL               Γöé
  9555.   Γöé     Your_Routine       Γöé
  9556.   @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  9557.  
  9558.   Γöé .                      Γöé                  My_Application.EXE
  9559.   Γöé .                      Γöé                 ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9560.   Γöé CALL ???; Your_Routine @>@ΓöÇΓöÇΓöÉ              Γöé .                Γöé
  9561.   Γöé                        Γöé  Γöé  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ    Γöé .                Γöé
  9562.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ  @>@ΓöÇΓöé LINK @>@ΓöÇΓöÇΓöÇΓöé CALL ???         Γöé
  9563.                               Γöé  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ    Γöé .                @>@ΓöÇΓöÉ
  9564.    Your_Library.LIB           Γöé              Γöé                  Γöé  Γöé
  9565.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  Γöé              @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  9566.   Γöé
  9567.   Γöé                        Γöé  Γöé              Γöé Reference to     Γöé  Γöé
  9568.   @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  9569.   Γöé              Γöé                  Γöé  Γöé
  9570.   Γöé function name:         Γöé  Γöé              Γöé Your_Routine.1   Γöé  Γöé
  9571.   Γöé       Your_Routine     Γöé  Γöé              Γöé Your_Routine.    @>@ΓöÇΓöÇΓöÿ
  9572.   Γöé                        Γöé  Γöé              Γöé     Your_Routine Γöé
  9573.   Γöé module name:           Γöé  Γöé              Γöé                  Γöé
  9574.   Γöé       Your_Routines    @>@ΓöÇΓöÇΓöÿ              ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9575.   Γöé                        Γöé
  9576.   Γöé entry point            Γöé
  9577.   Γöé       ordinal value: 1 Γöé
  9578.   Γöé       entry point name Γöé
  9579.   Γöé           Your_Routine Γöé
  9580.   @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  9581.  
  9582.   Γöé                        Γöé
  9583.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9584.  
  9585. Dynamic Linking 
  9586.  
  9587. When the application is loaded, the system resolves the dynamic-link 
  9588. references, as shown in the following figure. 
  9589.  
  9590. My_Application.EXE               Your_Routine.DLL
  9591. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ              ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9592. Γöé  .              Γöé              Γöé   Entry Table   Γöé
  9593. Γöé  .              Γöé              Γöé       1    ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÉ
  9594. Γöé  .              Γöé              Γöé.................Γöé  Γöé
  9595. Γöé Call ???        ΓöéΓöÇΓöÉ           Γöé                 Γöé  Γöé
  9596. Γöé  .              Γöé  Γöé           Γöé                 Γöé  Γöé
  9597. Γöé                 Γöé  Γöé   yyy:    Γöé  Your_Routine:  ΓöéΓöÇΓöÿ
  9598. Γöé                 Γöé  Γöé           Γöé                 Γöé
  9599. Γöé.................Γöé  Γöé           Γöé                 Γöé
  9600. ΓöéReference to     Γöé  Γöé           Γöé                 Γöé
  9601. Γöé                 Γöé  Γöé           Γöé                 Γöé
  9602. ΓöéYour_Routine.1   @>@ΓöÇΓöÇΓöÿ           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9603. ΓöéYour_Routine.    Γöé                       Γöé
  9604. Γöé     Your RoutineΓöé                       Γöé
  9605. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                       Γöé
  9606.         Γöé                                 Γöé
  9607.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9608.                           Γöé
  9609.                        ΓöîΓöÇΓöÇ@>@ΓöÇΓöÇΓöÉ
  9610.                        ΓöéLOAD Γöé
  9611.                        ΓööΓöÇΓöÇ@>@ΓöÇΓöÇΓöÿ
  9612.                           Γöé
  9613.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9614.         Γöé                                 Γöé
  9615. My_Application code              Other code
  9616. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ              ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9617. Γöé   Call yyy  ΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇ yyy:   Γöé  Your_Routine   Γöé
  9618. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ              ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9619.  
  9620. Resolving Dynamic Link References 
  9621.  
  9622. If a program contains dynamically linked references, the system must process 
  9623. the information in the references.  If the DLL already is in memory, the system 
  9624. adds information to the executable code so that the code can use the DLL 
  9625. functions.  If the required DLLs are not already in memory, OS/2 searches the 
  9626. path specified by the LIBPATH environment variable. If the system cannot find 
  9627. the DLLs, it stops loading the application and reports the error. If the system 
  9628. finds the DLLs, it loads them.  When DLLs are loaded into memory, OS/2 notifies 
  9629. the application where the DLL functions can be found. 
  9630.  
  9631. When a DLL is loaded into memory is determined by how the DLL was built. A DLL 
  9632. is built like an application, using a module-definition (.DEF) file. The CODE 
  9633. statement in a DEF file describes the attributes of application or DLL code. 
  9634. The load option for the CODE statement determines when application or DLL code 
  9635. is loaded: 
  9636.  
  9637.  PRELOAD             Code is loaded as soon as a process accesses the DLL. 
  9638.                      This leads to increased performance (in terms of accessing 
  9639.                      the DLL functions) while decreasing available memory. 
  9640.                      This option might be preferable if only one program is 
  9641.                      running. 
  9642.  
  9643.  LOADONCALL          Code is loaded when needed.  This is the recommended 
  9644.                      choice and the default. 
  9645.  
  9646.  
  9647. ΓòÉΓòÉΓòÉ 5.1.2. Run-Time Dynamic Linking ΓòÉΓòÉΓòÉ
  9648.  
  9649. When an application contains a reference to a DLL, the DLL is loaded into 
  9650. memory when the application is loaded (unless the DLL already is in memory). 
  9651. If the application uses functions in several DLLs, all of those DLLs are loaded 
  9652. into memory.  Some applications might use functions in several DLLs but use 
  9653. only a few of them at any one time. For example, an application that supports 
  9654. many different printers or plotters might use functions in many DLLs but need 
  9655. only one of them at a time, depending on the printer or plotter the application 
  9656. is supporting. If the user switches to a different printer or plotter, another 
  9657. DLL will be used, but the first will remain in memory.  Loading DLLs this way 
  9658. can be very wasteful. 
  9659.  
  9660. To avoid this problem, applications can take advantage of run-time dynamic 
  9661. linking and load and unload DLLs as they are required.  The process of building 
  9662. a run-time dynamically linked application is similar to the process of building 
  9663. a load-time dynamically linked application.  However, the EXE file for a 
  9664. run-time dynamically linked application does not contain a record describing 
  9665. where the external routines can be found.  Instead, the application explicitly 
  9666. tells OS/2 when to load and free the dynamic link module. 
  9667.  
  9668. Applications load and unload DLLs and call functions whose code resides in 
  9669. those DLLs by: 
  9670.  
  9671.    1. Calling DosLoadModule to get a handle to the DLL module. 
  9672.  
  9673.       This function also loads the DLL into memory or attaches to it, if it 
  9674.       already is loaded. 
  9675.  
  9676.    2. Calling DosQueryProcAddr to get a pointer to a function within the DLL. 
  9677.  
  9678.    3. Calling the function indirectly through the pointer returned by 
  9679.       DosQueryProcAddr. 
  9680.  
  9681.    4. Calling DosFreeModule to free the handle to the DLL module. 
  9682.  
  9683.       When all handles to the DLL module have been freed, the DLL is unloaded 
  9684.       from memory. 
  9685.  
  9686.  An application also can request information about a DLL from the system.  The 
  9687.  application can use the DosQueryModuleHandle function to determine whether a 
  9688.  DLL has been loaded into memory already.  The DosQueryModuleName function 
  9689.  returns full path information for the DLL file. 
  9690.  
  9691.  Following are the advantages of run-time dynamic linking: 
  9692.  
  9693.       Memory is consumed as needed. 
  9694.  
  9695.       DLLs can be loaded and unloaded as they are used. Unused DLLs do not have 
  9696.       to be loaded into memory, and memory can be released when the application 
  9697.       has finished using the DLL. 
  9698.  
  9699.       Applications can recover from DLL NOT FOUND. 
  9700.  
  9701.       Applications can make decisions.  If a load-time DLL cannot be found, the 
  9702.       application terminates immediately.  If a run-time DLL cannot be found, 
  9703.       the application receives an error value from the DosLoadModule function, 
  9704.       and it can use another DLL or specify a full path for the DLL.  If a 
  9705.       function is not available, the DosQueryProcAddr function returns an error 
  9706.       value, and the application can take appropriate action. 
  9707.  
  9708.       DLL and function names can be variable. 
  9709.  
  9710.       An application programmer does not have to know the names of the DLLs the 
  9711.       application will be using or the names of the functions within the DLL. 
  9712.       The application can read the names of the DLL or the functions from a 
  9713.       configuration file or obtain the names from user-supplied input. 
  9714.  
  9715.       DLLs can be anywhere. 
  9716.  
  9717.       The application can specify the full path for the DLL.  Load-time DLLs 
  9718.       must be in a directory in the path specified by the LIBPATH environment 
  9719.       variable, but run-time DLLs can be in other directories. 
  9720.  
  9721.  
  9722. ΓòÉΓòÉΓòÉ 5.2. DLL Data ΓòÉΓòÉΓòÉ
  9723.  
  9724. Most DLLs will contain some data.  Whereas DLL code is shared by all processes 
  9725. that use it, DLL data can be shared or not shared by all processes that use it. 
  9726. Data that is specific to each process that uses the DLL (that is, to each 
  9727. instance of the DLL) is called instance data.  Data that is shared by all 
  9728. processes that use the DLL is called shared or global data. 
  9729.  
  9730. The first time a process references a DLL (and it is loaded or its usage count 
  9731. is incremented because it is already loaded), a separate copy of the DLL's 
  9732. instance data is created.  Modifications to the instance data for one process 
  9733. do not affect the instance data for any other process.  The system, however, 
  9734. maintains only one copy of a DLL's shared data for all processes that use the 
  9735. DLL.  Every process that uses the DLL can access the same data.  If one process 
  9736. modifies the data (increments a count, for example), the data will be modified 
  9737. for all processes that use the DLL. 
  9738.  
  9739. Because changes to shared DLL data by one process are visible to the DLL code 
  9740. when called by another process, shared data provides DLLs with a mechanism for 
  9741. tracking processes that use it.  This is crucial to subsystems, which are DLLs 
  9742. that manage resources (for example, devices, queues, and so forth). 
  9743.  
  9744. There usually is only one data and one code object, or segment, defined in a C 
  9745. source file.  This means that a DLL that has instance and shared data is built 
  9746. from more than one C source file, with a default automatic data segment and 
  9747. with named data segments.  How data is defined is determined by how the DLL is 
  9748. built.  A DLL is built like an application, using a DEF file.  The DATA 
  9749. statement in a DEF file describes the attributes of application or DLL data. 
  9750. Following is a list of the available options for the DATA statement: 
  9751.  
  9752.  Options             Result 
  9753.  
  9754.  MULTIPLE            OS/2 creates a unique copy of the automatic data segment 
  9755.                      for each process that uses the DLL.  Modifications made by 
  9756.                      one process do not affect any other process.  This is the 
  9757.                      default. 
  9758.  
  9759.  SINGLE              OS/2 creates only one automatic data segment for all 
  9760.                      processes that use the DLL.  If one process modifies the 
  9761.                      data, the data will be modified for all processes that use 
  9762.                      the DLL. 
  9763.  
  9764.  READWRITE           Enables you to read from or write to the automatic data 
  9765.                      segment. This is the default. 
  9766.  
  9767.  READONLY            Enables you to read only from the automatic data segment. 
  9768.  
  9769.  LOADONCALL          The automatic data segment is loaded into memory as 
  9770.                      needed.  This is the default. 
  9771.  
  9772.  PRELOAD             The automatic data segment is loaded as soon as a process 
  9773.                      accesses a DLL. 
  9774.  
  9775.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9776.   Γöé Process A Γöé                   Γöé Process B Γöé
  9777.   ΓööΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÿ                   ΓööΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÿ
  9778.      Γöé     Γöé                         Γöé     Γöé
  9779.      Γöé     Γöé                         Γöé     Γöé
  9780.   ΓöîΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÉ
  9781.   Γöé  Γöé     Γöé       Dynamic Link      Γöé     Γöé  Γöé
  9782.   Γöé  Γöé     Γöé        Functions        Γöé     Γöé  Γöé
  9783.   ΓööΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÿ
  9784.      Γöé     Γöé                         Γöé     Γöé
  9785.      Γöé     Γöé      ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ          Γöé     Γöé
  9786.      Γöé     Γöé      ΓöéShared Γöé          Γöé     Γöé
  9787.      Γöé     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöé Data  ΓöéΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ     Γöé
  9788.      Γöé            ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                Γöé
  9789.      Γöé              ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ            Γöé
  9790.      Γöé              ΓöéProcess BΓöé            Γöé
  9791.      Γöé            ΓöîΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöéΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9792.      Γöé            ΓöéProcess AΓöé Γöé
  9793.      ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöéInstance @>@ΓöÇΓöÿ
  9794.                   Γöé  Data   Γöé
  9795.                   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9796.  
  9797.  DLL Data 
  9798.  
  9799.  You also can create a DLL with both shared and instance data.  For more 
  9800.  information, see Using Shared and Instance Data 
  9801.  
  9802.  
  9803. ΓòÉΓòÉΓòÉ 5.3. DLL Initialization and Termination ΓòÉΓòÉΓòÉ
  9804.  
  9805. A DLL is initialized and terminated by the default _DLL_InitTerm function. 
  9806. When a process gains access to the DLL, this function initializes the necessary 
  9807. environment for the DLL, including storage, semaphores, and variables.  When 
  9808. the process frees its access to the DLL, the _DLL_InitTerm function terminates 
  9809. the DLL environment created for that process.  The _DLL_InitTerm function is 
  9810. called automatically when you link to the DLL. 
  9811.  
  9812. The _DLL_InitTerm function can be executed once when the DLL is first loaded 
  9813. into memory, or it can be executed each time a new process first accesses the 
  9814. DLL.  The LIBRARY statement in the module-definition file is used to specify 
  9815. when the _DLL_InitTerm function is to be executed.  Following is a list of of 
  9816. the available options for the LIBRARY statement. 
  9817.  
  9818.  Options             Result 
  9819.  
  9820.  INITINSTANCE        The _DLL_InitTerm function is called the first time the 
  9821.                      DLL is loaded for each process that accesses the DLL. 
  9822.  
  9823.  INITGLOBAL          The _DLL_InitTerm function is called only the very first 
  9824.                      time the DLL is loaded.  This is the default. 
  9825.  
  9826.  TERMINSTANCE        The _DLL_InitTerm function is called the last time the DLL 
  9827.                      is freed for each process that accesses the DLL. 
  9828.  As an example, the following statement, identifies the executable file as a 
  9829.  DLL and specifies that SAMPLE03 is the name of the DLL: 
  9830.  
  9831.  
  9832.   LIBRARY SAMPLE03 INITINSTANCE TERMINSTANCE
  9833.  
  9834.  It also specifies that the _DLL_InitTerm function is to be called the first 
  9835.  time the DLL is loaded for each process that calls the DLL and the last time 
  9836.  the DLL is freed for each process that calls the DLL. 
  9837.  
  9838.  When OS/2 starts executing a DLL, it sets the CPU registers to known values, 
  9839.  but only for 16-bit DLLs.  All 32-bit DLLs are called with a stack frame, like 
  9840.  all other API calls. 
  9841.  
  9842.  Initialization/termination functions can be written in a high-level language. 
  9843.  For more information on writing your own initialization/termination function, 
  9844.  see Creating an Initialization/Termination Function. 
  9845.  
  9846.  
  9847. ΓòÉΓòÉΓòÉ 5.4. Building DLLs ΓòÉΓòÉΓòÉ
  9848.  
  9849. Building a DLL is not very different from building a conventional static 
  9850. library.  The following sections show how you can use OS/2 tools and functions 
  9851. to create, manage, and use DLLs. 
  9852.  
  9853.  
  9854. ΓòÉΓòÉΓòÉ 5.4.1. External Function References ΓòÉΓòÉΓòÉ
  9855.  
  9856. When you compile or assemble an application, the compiler or assembler 
  9857. generates an object module for the code in the application.  If you use any 
  9858. functions that are external to your application (their code is in another 
  9859. object module), the compiler or assembler adds an external function reference 
  9860. to your application's object module. 
  9861.  
  9862. The Linker resolves these external references.  If the Linker finds the 
  9863. external function in a library called an import library or in an IMPORTS 
  9864. statement in the application's module-definition file, the code for the 
  9865. external function is in a DLL.  To resolve external references to DLLs, the 
  9866. Linker simply adds information to the executable file that tells the loader 
  9867. where to find the DLL code when the application is loaded. 
  9868.  
  9869.  
  9870. ΓòÉΓòÉΓòÉ 5.4.2. Module-Definition Files ΓòÉΓòÉΓòÉ
  9871.  
  9872. The module-definition file is an important tool for building DLLs. This file 
  9873. contains information that tells OS/2 the name of the DLL, when to load the DLL, 
  9874. how to manage memory for the DLL, and when to initialize the DLL. 
  9875.  
  9876. When you create a DLL, the module-definition file must contain a list of all 
  9877. the functions in the DLL that can be called by an application (or by another 
  9878. DLL).  You specify these external functions by using an EXPORTS statement in 
  9879. the module-definition file. 
  9880.  
  9881. You also must tell the Linker where to find the external functions in your 
  9882. application.  If the functions are in a DLL, you can use an IMPORTS statement 
  9883. in the module-definition file for the application to tell the Linker where to 
  9884. find the DLL functions.  You also can use an import library to tell the Linker 
  9885. where to find your DLL functions. 
  9886.  
  9887.  
  9888. ΓòÉΓòÉΓòÉ 5.4.3. Import Libraries ΓòÉΓòÉΓòÉ
  9889.  
  9890. A conventional library contains object modules for a number of functions. The 
  9891. library is a convenient way to manage a large number of modules and use them in 
  9892. your executable code by linking to the library.  The Linker uses the external 
  9893. references in your object module to determine which modules must be pulled out 
  9894. of the library. 
  9895.  
  9896. An import library does not contain any object modules.  Instead, the import 
  9897. library contains information that tells the Linker what DLLs are used by your 
  9898. application and the location of the functions your application uses within each 
  9899. DLL. 
  9900.  
  9901. Like a conventional library, an import library primarily is a convenience. 
  9902. Instead of specifying all the functions your application imports in its 
  9903. module-definition file, you can link with the import library and let the Linker 
  9904. resolve the external references in your object module. 
  9905.  
  9906. You use import libraries every time you compile and link a program that uses 
  9907. the OS/2 API.  All the OS/2 functions are implemented in DLLs, and OS2386.LIB 
  9908. is an import library that tells the Linker where to find each OS/2 function. 
  9909.  
  9910. For more information about module-definition files and import libraries, see 
  9911. the online Tools Reference in the OS/2 Warp Developer's Toolkit. 
  9912.  
  9913.  
  9914. ΓòÉΓòÉΓòÉ 5.4.4. Creating a Simple DLL ΓòÉΓòÉΓòÉ
  9915.  
  9916. DLLs typically are used to provide common functions that can be used by a 
  9917. number of applications. The following figure shows a C source file, MYPUTS.C, 
  9918. for a DLL that contains a simple string-printing function. 
  9919.  
  9920. Uses Crt,Dos;
  9921. Var hf_stdout : byte;
  9922.  
  9923. Procedure MyPuts(pszmsg : PSZ);
  9924. Var
  9925.   UlWritten : ULONG;
  9926.   hfstdout  : BYTE;
  9927. Begin
  9928.   hfstrout := 1;
  9929.   While pszmsg <> 0 Do Begin
  9930.     DosWrite(HF_STDOUT, pszMsg,1,ulWritten);
  9931.     Inc(pszMsg);
  9932.   End;
  9933. End;
  9934.  
  9935. The following figure shows the module-definition file, MYPUTS.DEF, for this 
  9936. DLL. 
  9937.  
  9938.     LIBRARY myputs
  9939.     DATA SINGLE SHARED
  9940.     EXPORTS
  9941.         myPuts
  9942.  
  9943. The LIBRARY statement names the DLL (MYPUTS.DLL).  The DATA statement tells the 
  9944. system that this DLL will share all data with each process that uses the DLL. 
  9945. The EXPORTS statement indicates that the function myPuts can be used by 
  9946. applications and DLLs. 
  9947.  
  9948. The DLL is compiled and linked like any application. You can use IBM's ICC and 
  9949. LINK386, as shown below, to create MYPUTS.DLL. 
  9950.  
  9951.     icc  /C+ /Ge- myputs.c
  9952.  
  9953.     link386 /noi myputs, , nul, OS2386, myputs
  9954.  
  9955. When the DLL has been created, you must copy it to one of the directories 
  9956. indicated by the LIBPATH environment variable in your CONFIG.SYS file. 
  9957.  
  9958.  
  9959. ΓòÉΓòÉΓòÉ 5.4.5. Importing DLL Functions ΓòÉΓòÉΓòÉ
  9960.  
  9961. After you create a DLL, you can use it in an application. The following figure 
  9962. shows a C source file, USEPUTS.C, that uses the myPuts function contained in 
  9963. the DLL MYPUTS.DLL. 
  9964.  
  9965.  
  9966. VOID EXPENTRY myPuts(PSZ);
  9967.  
  9968. Begin
  9969.   myPuts('Testing, 1,2,3');
  9970. End.
  9971.  
  9972. The module-definition file for USEPUTS.C tells OS/2 where to find the myPuts 
  9973. function.  This module-definition file (USEPUTS.DEF) contains the information 
  9974. shown in the following figure. 
  9975.  
  9976.     NAME useputs
  9977.     IMPORTS
  9978.         myputs.myPuts
  9979.  
  9980. The module-definition file tells OS/2 that USEPUTS imports the myPuts function 
  9981. from MYPUTS.DLL.  USEPUTS.C is compiled and linked as shown below. 
  9982.  
  9983.     icc  /C+ useputs.c
  9984.  
  9985.     link386 /noi useputs, , nul, , useputs
  9986.  
  9987.  
  9988. ΓòÉΓòÉΓòÉ 5.4.6. Using an Import Library ΓòÉΓòÉΓòÉ
  9989.  
  9990. You also can create an import library for your DLL.  If you do this, you can 
  9991. link applications with your DLL without explicitly declaring the imports for 
  9992. each application. OS/2 uses this technique for the application programming 
  9993. interface (API).  When you link your applications with OS2386.LIB, you are 
  9994. using an import library. 
  9995.  
  9996. To create the import library STRINGS.LIB from MYPUTS.DLL, you use the Import 
  9997. Library Manager (IMPLIB), as shown below. 
  9998.  
  9999.     implib strings.lib myputs.def
  10000.  
  10001. You then can link your applications with STRINGS.LIB to resolve references to 
  10002. the myPuts function, as shown below. 
  10003.  
  10004.     link386 /noi useputs, , nul, strings;
  10005.  
  10006. A module-definition file for USEPUTS.C is optional in this example because we 
  10007. are linking with an import library. 
  10008.  
  10009.  
  10010. ΓòÉΓòÉΓòÉ 5.4.7. Using Shared and Instance Data ΓòÉΓòÉΓòÉ
  10011.  
  10012. When you create a DLL, you can use the DATA statement in the module-definition 
  10013. file to define the default attributes for data segments within the DLL.  The 
  10014. default condition is for the DLL to have a unique copy of the automatic data 
  10015. segment for each process.  You can specify DATA MULTIPLE READWRITE in the 
  10016. module-definition file to cause OS/2 to create a separate copy of all the DLL 
  10017. data for each process that uses the DLL (instance data).  Modifications made by 
  10018. one process do not affect other processes. 
  10019.  
  10020. You also can specify different attributes for different sets of data by using 
  10021. the #pragma data_seg and #pragma alloc_text directives to define your own data 
  10022. and code segments.  You can list the segments in the module-definition file 
  10023. under the heading SEGMENTS and specify attributes for each. 
  10024.  
  10025.   SEGMENTS
  10026.     mydata SINGLE READONLY
  10027.     mycode PRELOAD
  10028.  
  10029. Any segments that you do not specify under SEGMENTS are given the attributes 
  10030. specified by the DATA or CODE statement, depending on the type of segment. 
  10031.  
  10032.  
  10033. ΓòÉΓòÉΓòÉ 5.4.8. Creating an Initialization/Termination Function ΓòÉΓòÉΓòÉ
  10034.  
  10035. It might be necessary for a DLL to perform some tasks before an application 
  10036. accesses a DLL or after an application finishes accessing a DLL.  For example, 
  10037. the library might need to allocate a heap or open a device prior to using a 
  10038. DLL, or deallocate a heap or close a device after using a DLL.  You can handle 
  10039. these tasks in an initialization/termination function.  The 
  10040. initialization/termination function can be called to perform initialization 
  10041. tasks when the DLL is first loaded or each time a new process accesses the DLL, 
  10042. depending on the LIBRARY statement in the module-definition file.  If you 
  10043. specify INITGLOBAL in the LIBRARY statement, the initialization/termination 
  10044. function is called only once, when the DLL is first loaded into memory.  This 
  10045. is the default setting.  If you specify INITINSTANCE, the library function is 
  10046. called each time the DLL is accessed by a new process.  In the same way, the 
  10047. initialization/termination function can be called on to perform termination 
  10048. tasks. If you specify TERMINSTANCE, the library function is called each time 
  10049. the DLL is freed for each process that accesses the DLL. 
  10050.  
  10051. When a thread calls DosLoadModule to load a DLL, the initialization routines of 
  10052. the loaded DLL (and the initialization routines of the DLLs that it loads) will 
  10053. run on the thread that called DosLoadModule. This initialization will complete 
  10054. before DosLoadModule returns. 
  10055.  
  10056. The prototype for the _DLL_InitTerm function is: 
  10057.  
  10058. Function _DLL_InitTerm(modhandle, flag : longint) : longint;
  10059.  
  10060. If the value of the flag parameter is 0, the DLL environment is initialized. 
  10061. If the value of the flag parameter is 1, the DLL environment is ended.  The 
  10062. modhandle parameter is the module handle assigned by OS/2 for this DLL.  The 
  10063. module handle can be used as a parameter to various OS/2 API calls. For 
  10064. example, DosQueryModuleName can be used to return the fully-qualified path name 
  10065. of the DLL, which tells you where the DLL was loaded from. 
  10066.  
  10067. The return code from _DLL_InitTerm tells the loader whether the initialization 
  10068. or termination was performed successfully.  If the call was successful, 
  10069. _DLL_InitTerm returns a nonzero value.  A return code of 0 indicates that the 
  10070. function failed.  If a failure is indicated, the loader will not load the 
  10071. program that is accessing the DLL. 
  10072.  
  10073. Before you can call any C library functions, you must first initialize the C 
  10074. run-time environment.  To initialize the environment, use the function 
  10075. _CRT_init.  The prototype for this function is: 
  10076.  
  10077. function _CRT_init : integer;
  10078.  
  10079. If the run-time environment is successfully initialized, _CRT_init returns 0. 
  10080. A return code of -1 indicates an error.  If an error occurs, an error message 
  10081. is written to file handle 2, which is the usual destination of stderr. 
  10082.  
  10083. To properly terminate the C run-time environment, use the function, _CRT_term. 
  10084. The prototype for this function is: 
  10085.  
  10086. !!!MANUAL@error@
  10087.  
  10088. Because _DLL_InitTerm is called by OS/2, it must be compiled using the system 
  10089. linkage.  In the IBM C Set/2 compiler, the following #pragma directive is used 
  10090. to specify the system linkage: 
  10091.  
  10092. !!!MANUAL@error@
  10093.  
  10094. The initialization/termination function must have a specific entry point.  You 
  10095. cannot create a function with a specific entry point in the C programming 
  10096. language, so the initialization function must be written in assembly language. 
  10097. However, you can write a very simple initialization function in assembly 
  10098. language and have it immediately jump to a C function. The following figure 
  10099. shows an Assembler language initialization function entry point. 
  10100.  
  10101.  
  10102.      PAGE     ,132
  10103.      TITLE    DLLSTUB
  10104.      NAME     DLLSTUB
  10105.  
  10106.      .386
  10107.      .387
  10108.  
  10109.      EXTERN   _DLL_InitTerm:NEAR
  10110.  
  10111.      END      _DLL_InitTerm
  10112.  
  10113. The following figure shows a sample initialization/termination function written 
  10114. in C.  This code was written using the IBM C Set/2 compiler.  If you use 
  10115. another compiler, some of the #pragmas or keywords might need to be changed. 
  10116.  
  10117. !!!MANUAL@error@
  10118.  
  10119. You also can write the initialization/termination function entirely in assembly 
  10120. language, without jumping to a C function.  For this case, the library 
  10121. initialization registers are defined as follows: 
  10122.  
  10123.  EIP            Library entry address 
  10124.  
  10125.  ESP            User program stack 
  10126.  
  10127.  CS             Code selector for base of linear address space 
  10128.  
  10129.  DS =ES=SS      Data selector for base of linear address space 
  10130.  
  10131.                 Note:  All 32-bit protected memory library modules will be 
  10132.                 given a GDT selector in the DS and ES registers (ProtDS) that 
  10133.                 addresses the full linear address space available to an 
  10134.                 application.  This selector should be saved by the 
  10135.                 initialization routine.  Non-protected memory library modules 
  10136.                 will receive a selector (FlatDS) that addresses the same amount 
  10137.                 of linear address space as an application's EXE file. 
  10138.  
  10139.  FS             Data selector of the base of the Thread Information Block (TIB) 
  10140.  
  10141.  GS             Is equal to 0 
  10142.  
  10143.  EAX=EBX        Is equal to 0 
  10144.  
  10145.  ECX=EDX        Is equal to 0 
  10146.  
  10147.  ESI=EDI        Is equal to 0 
  10148.  
  10149.  EBP            Is equal to 0 
  10150.  
  10151.  [ESP+0]        Return address to system, and EAX = return code 
  10152.  
  10153.  [ESP+4]        Module handle for the library module 
  10154.  
  10155.  [ESP+8]        Is equal to 0 (for initialization) 
  10156.  
  10157.  A 32-bit library can specify that its entry point address is the 16-bit object 
  10158.  code.  In this case, the entry registers are the same as for entry to a 
  10159.  library using the segmented EXE format.  This means that a 16-bit library can 
  10160.  be relinked to take advantage of the benefits of the linear EXE format (such 
  10161.  as more efficient paging). 
  10162.  
  10163.  The library termination registers are defined as follows: 
  10164.  
  10165.  EIP            Library entry address 
  10166.  
  10167.  ESP            User program stack 
  10168.  
  10169.  CS             Code selector for the base of the linear address space 
  10170.  
  10171.  DS=ES=SS       Data selector for the base of the linear address space 
  10172.  
  10173.  FS             Data selector of the base of the Thread Information Block (TIB) 
  10174.  
  10175.  GS             Is equal to 0 
  10176.  
  10177.  EAX=EBX        Is equal to 0 
  10178.  
  10179.  ECX=EDX        Is equal to 0 
  10180.  
  10181.  ESI=EDI        Is equal to 0 
  10182.  
  10183.  EBP            Is equal to 0 
  10184.  
  10185.  [ESP+0]        Return address to the system 
  10186.  
  10187.  [ESP+4]        Module handle for the library module 
  10188.  
  10189.  [ESP+8]        Is equal to 1 (for termination) 
  10190.  
  10191.  Note:  Library termination is not permitted for libraries with 16-bit entries. 
  10192.  
  10193.  
  10194. ΓòÉΓòÉΓòÉ 5.4.9. Linking at Runtime ΓòÉΓòÉΓòÉ
  10195.  
  10196. So far, the examples in this chapter have used load-time dynamic linking. With 
  10197. load-time linking, OS/2 loads the DLL containing the imported functions when it 
  10198. loads the EXE file.  If it cannot find the necessary DLL, it terminates the 
  10199. application and reports the error. 
  10200.  
  10201. Run-time dynamic linking permits an application to load a DLL into memory when 
  10202. it is required, and to remove the DLL when it is no longer needed. The 
  10203. application uses the DosLoadModule function to load the DLL into memory (if it 
  10204. is not loaded already).  If the system cannot find the DLL, the application 
  10205. receives an error value and can take appropriate action. For example, the 
  10206. application might use another DLL or search another directory. 
  10207.  
  10208. Once the application has loaded the DLL, it can use the DosQueryProcAddr 
  10209. function to obtain a pointer to the required function (or functions). The 
  10210. application then can use the function.  When the DLL is no longer required, the 
  10211. application can use the DosFreeModule function to remove the DLL from memory. 
  10212. If there are other applications using the DLL, it remains in memory until the 
  10213. last application frees the DLL. 
  10214.  
  10215. An application can specify a full path for the run-time DLL. If you specify the 
  10216. full path name, you can have two DLLs with the same name loaded at the same 
  10217. time, as in C:\OS2\DLLFILE.DLL and C:\OS2\DLL\DLLFILE.DLL. If the path is not 
  10218. specified, OS/2 assumes the DLL has the extension .DLL and looks for the file 
  10219. in the directories specified by the LIBPATH environment variable. 
  10220.  
  10221. The following figure uses the run-time dynamic-linking functions to access the 
  10222. myPuts function in the MYPUTS.DLL dynamic link library. 
  10223.  
  10224. Uses Crt,Dos,Os2Base,Os2Def;
  10225.  
  10226. @VOID (* EXPENTRY myPuts) (PSZ);
  10227.  
  10228. Uses
  10229.   Crt,Dos,Os2Def,Os2Base;
  10230.  
  10231. Var
  10232.   Hmod                              : HMODULE;
  10233.   UlErr                             : ULONG;
  10234.   SzFailName : Array[0..CCHMAXPATH] of UCHAR;
  10235.  
  10236. Begin
  10237.   ulErr := DosLoadModule(szFailName,          (* failed module name *)
  10238.                          sizeof(szFailName),  (* size of buffer     *)
  10239.                          'myputs',            (* name of DLL        *)
  10240.                           hmod);              (* module handle here *)
  10241.  
  10242.   If (ulErr) Then
  10243.     DosExit(EXIT_PROCESS, 1);
  10244.  
  10245.   ulErr := DosQueryProcAddr(hmod,              (* DLL module handle           *)
  10246.                             0,                 (* function ordinal value      *)
  10247.                             'myPuts',          (* function name               *)
  10248.                             myPuts);           (* address of function pointer *)
  10249.  
  10250.   If not ulErr Then Begin
  10251.     (* We can use the function now. *)
  10252.     myPuts('does it work?');
  10253.     DosFreeModule(hmod);                 (* frees the DLL module *)
  10254.   End;
  10255. End.
  10256.  
  10257.  
  10258. ΓòÉΓòÉΓòÉ 5.5. Protected Memory Use ΓòÉΓòÉΓòÉ
  10259.  
  10260. OS/2 provides shared library support in the form of 32-bit DLLs.  All 32-bit 
  10261. dynamic links or APIs are called using near CALL or RET instructions, so the 
  10262. cost of making dynamic-link calls should be significantly less than the cost of 
  10263. making the comparable calls in the 16-bit version of OS/2, where a far CALL is 
  10264. required.  The DLLs execute in the context of the caller. 
  10265.  
  10266. All 32-bit DLLs are mapped into the appropriate shared memory region of the 
  10267. requesting processes at load time and execute at ring 3 without IOPL.  This 
  10268. model's protection characteristics correspond closest to the ring 3 
  10269. dynamic-linking model in the 16-bit version of OS/2. The following figure shows 
  10270. how 32-bit DLLs are implemented in the linear memory model of OS/2. 
  10271.  
  10272.   4GΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10273.     Γöé System Area  Γöé
  10274. 512M@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  10275.  
  10276.     Γöé              Γöé
  10277.     @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  10278.  
  10279.     Γöé  32 Bit DLL  Γöé
  10280.     @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇ
  10281.  
  10282.     Γöé       Γöé     Γöé
  10283.     Γöé     Γöé  Γöé     Γöé
  10284.     Γöé CallΓöé  ΓöéRet  Γöé
  10285.     ΓöéNear Γöé  ΓöéNear Γöé
  10286.     Γöé     Γöé  Γöé     Γöé
  10287.     Γöé     Γöé  Γöé     Γöé
  10288.     Γöé     Γöé       Γöé
  10289.     @>@ΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  10290.  
  10291.     Γöé  32 Bit EXE  Γöé
  10292.     @>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  10293.  
  10294.     Γöé              Γöé
  10295.    0ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10296.  
  10297. A 32-Bit DLL 
  10298.  
  10299. However, since 32-bit EXE programs can address the entire address space with a 
  10300. 32-bit offset, it is easier for a 32-bit application programmer to potentially 
  10301. cast a bad pointer to data in the shared region than in the 16-bit segmented 
  10302. addressing scheme.  Since many subsystems have semaphores and other shared data 
  10303. structures in the shared region, the potential for an inadvertently errant 
  10304. application to affect another process sharing a subsystem becomes an issue in 
  10305. the flat environment.  Therefore, OS/2 provides a mechanism for DLLs to protect 
  10306. their critical shared global data regions from 32-bit EXEs.  This mechanism 
  10307. prevents a thread in one process from potentially affecting other processes 
  10308. using the same resources (subsystems), or potentially taking down the entire 
  10309. workstation if the compromised subsystem is critical (such as PM). 
  10310.  
  10311. OS/2 enables existing 16-bit DLLs and new 32-bit DLLs to get their shared 
  10312. global data allocated into a single protected region that is not accessible by 
  10313. 32-bit EXEs, thereby achieving a level of protection.  There is no provision 
  10314. for protecting DLLs from each other or from threads executing 16-bit EXE 
  10315. modules.  The MEMMAN CONFIG.SYS line supports a "PROTECT/NOPROTECT" option, as 
  10316. follows, for enabling or disabling memory protection: 
  10317.  
  10318. MEMMAN=SWAP,PROTECT
  10319.  
  10320. If neither PROTECT nor NOPROTECT is specified, the default is protection 
  10321. enabled (PROTECT). 
  10322.  
  10323. When protection is enabled, the memory manager reserves a 64M region of the 
  10324. linear address space below the 512MB line; this is called the protected region. 
  10325. Protected objects are allocated within the protected region.  The following 
  10326. types of memory are considered protected: 
  10327.  
  10328.  DLL Global Data          Global data that is part of the DLL image when 
  10329.                           loaded.  This is only global shared data, not 
  10330.                           instance data.  Although DLL code is shared, it is 
  10331.                           not allocated in the protected region since it is 
  10332.                           read-only. 
  10333.  
  10334.  DLL Run-Time Shared Data Global data that is allocated at runtime by a thread 
  10335.                           executing in DLL code that is a protected API.  This 
  10336.                           includes 16- and 32-bit, named and unnamed, shared 
  10337.                           memory, and shared memory allocated with DosAllocSeg 
  10338.                           with the share flag set. 
  10339.  
  10340.  The DS value that is used for the user address space (FlatDS) no longer 
  10341.  references a descriptor with a 512MB limit.  Instead the system exports 
  10342.  another DS value for the user address space called the ProtDS that does have 
  10343.  the 512MB limit-the FlatDS limit is reduced by the size of the protected 
  10344.  region.  When a 32-bit EXE is executing, it runs with the FlatDS and is unable 
  10345.  to access protected objects created by 16-bit, 32-bit, or 16- and 32-bit DLLs. 
  10346.  If the thread calls a 16-bit DLL API entry point, the DLL will have 
  10347.  addressability to the protected region through the LDT.  If the thread calls a 
  10348.  32-bit DLL entry point that is protected, the 32-bit DLL entry point contains 
  10349.  code to switch to the ProtDS so that the protected region is accessible-the 
  10350.  32-bit DLL switches back to the FlatDS before completing service. A switch on 
  10351.  the C compiler is used to generate the code sequence as shown in the following 
  10352.  figure. 
  10353.  
  10354.   DLLAPI  proc
  10355.   push    ds
  10356.   push    es
  10357.   mov     dx, seg FLAT:DGROUP
  10358.   mov     ds, dx
  10359.   mov     es, dx
  10360.  
  10361.   ......
  10362.  
  10363.   pop     es
  10364.   pop     ds
  10365.   ret
  10366.   DLLAPI  endp
  10367.  
  10368.  Although SS is not loaded with the ProtDS, a subsystem that switches stacks to 
  10369.  a protected stack must write some assembler code to change ESP-thus the 
  10370.  subsystem also should set up SS to be the ProtDS when performing the stack 
  10371.  switch. 
  10372.  
  10373.  When protection is not enabled, FlatDS=ProtDS and the code still works the 
  10374.  same. 
  10375.  
  10376.  Note:  The system currently is not sensitive to whether parameters are being 
  10377.  validated relative to the FlatDS or the ProtDS when ring 0 kernel APIs are 
  10378.  called.  Also the 3216 thunks do not probe 32-bit parameters before 
  10379.  converting them and passing them to a 16-bit DLL. 
  10380.  
  10381.  The grouping of protected allocations can be enabled or disabled on a per DLL 
  10382.  basis.  For 32-bit DLLs, the Linker uses the PROTECT parameter in the DEF file 
  10383.  to provide protection information in the DLL's module flags to the loader. 
  10384.  All 16-bit modules requiring protection must be specified with the new 
  10385.  PROTECT16 CONFIG.SYS parameter. 
  10386.  
  10387.   PROTECT16=DLLNAME1,DLLNAME2,...,DLLNAMEX
  10388.  
  10389.  Notice that the DLL suffix is not required.  Only DLL files can get the 
  10390.  protection. 
  10391.  
  10392.  
  10393. ΓòÉΓòÉΓòÉ 5.6. DLL Side Effects ΓòÉΓòÉΓòÉ
  10394.  
  10395. Dynamic link routines are not processes.  They run on the thread of the calling 
  10396. process and therefore do not own resources.  Any resource that they obtain or 
  10397. use is owned by the calling process.  Authors of DLLs should be careful not to 
  10398. needlessly allocate resources until the resource is required by the calling 
  10399. process to perform the requested function. They also should free the resource 
  10400. as soon as that resource is no longer required. 
  10401.  
  10402. A dynamic link routine that obtains and uses resources should attempt to 
  10403. minimize the use of a process's resources.  For example, stack space should be 
  10404. conserved. If an application redirects file handle 5 and calls a DLL entry that 
  10405. expects file handle 5 to be an open handle to an associated device driver, 
  10406. unpredictable results can occur. 
  10407.  
  10408. If the routine opens an abundance of file handles, it might consider increasing 
  10409. the maximum number of file handles, so that the process maximum is not 
  10410. exceeded.  However, increasing the maximum number of file handles for a process 
  10411. also increases the maximum number of file handles for all processes created by 
  10412. the current process.  This will cause additional memory to be consumed and 
  10413. could cause problems for an application that assumes a limit of 20 file 
  10414. handles. Also, it should be noted that applications have the ability to 
  10415. redirect file handles. 
  10416.  
  10417. Dynamic link routines also should not make system calls that affect the calling 
  10418. process environment.  If a DLL changes a process's current directory, another 
  10419. thread running under the same process could fail a file I/O call if it assumes 
  10420. a given working directory. 
  10421.  
  10422. Applications and DLLs should not make calls to other DLLs, including system 
  10423. DLLs, within a critical section.  Since DLLs can use semaphores to synchronize 
  10424. threads within a process or between processes, calling a DLL within a critical 
  10425. section could cause application deadlocks. This would occur if the DLL requests 
  10426. a semaphore on behalf of the calling thread and another thread within the 
  10427. process owns the semaphore.  Because the calling thread is in a critical 
  10428. section and is the only thread within the process that is permitted to execute, 
  10429. the semaphore will never be freed, causing a deadlock. 
  10430.  
  10431.  
  10432. ΓòÉΓòÉΓòÉ 5.7. Summary ΓòÉΓòÉΓòÉ
  10433.  
  10434. There are two types of linking: static and dynamic.  Static linking enables a 
  10435. program's code and data to be contained in a single executable file, enabling 
  10436. the system to load it all into memory at once.  Dynamic linking permits several 
  10437. applications to use a single copy of an executable module, since the executable 
  10438. module is completely separate from the applications that use it. 
  10439.  
  10440. The advantages of dynamic linking are: 
  10441.  
  10442.      Reduced memory requirements 
  10443.      Simplified application modification 
  10444.      Flexible software support 
  10445.      Transparent migration of functions 
  10446.      Multiple programming language support 
  10447.      Application controlled memory usage. 
  10448.  
  10449.  OS/2 provides two types of dynamic linking: load-time and run-time.  In 
  10450.  load-time dynamic linking, an application is linked with a library file that 
  10451.  contains a record that describes where the routine can be found instead of a 
  10452.  file that contains the code for the routine.  The DLL can be loaded as soon as 
  10453.  a process accesses the DLL or when needed.  In run-time dynamic linking, the 
  10454.  EXE for an application does not contain a record describing where the external 
  10455.  routines can be found.  Instead, the application explicitly tells OS/2 when to 
  10456.  load and free the dynamic link module. 
  10457.  
  10458.  DLL data can be shared or not shared by all processes that use it. 
  10459.  
  10460.  
  10461. ΓòÉΓòÉΓòÉ 6. Error Management ΓòÉΓòÉΓòÉ
  10462.  
  10463. Error checking and error handling is extremely important in a multitasking 
  10464. operating system. The conditions in which an application is executing can 
  10465. change at any time due to the activity of other programs executing concurrently 
  10466. with the application. This section describes the functions that an application 
  10467. can use to manage errors that occur during processing. 
  10468.  
  10469. The following topic is related to the information in this scetion: 
  10470.  
  10471.      Exception management 
  10472.  
  10473.  
  10474. ΓòÉΓòÉΓòÉ 6.1. About Error Management ΓòÉΓòÉΓòÉ
  10475.  
  10476. Successful completion of most Control Program functions is indicated by an 
  10477. error return code of 0. In the event of an error, Control Program functions 
  10478. usually return an error code that has a non-zero integer value. The non-zero 
  10479. value equates to a symbolic error identifier in the include file, BSEERR.H. The 
  10480. symbolic identifiers indicate the cause of the error. For example, a return 
  10481. code of 2 from DosOpen equates to the symbolic identifier ERROR_FILE_NOT_FOUND; 
  10482. the cause of the error is that the file being opened cannot be found. 
  10483.  
  10484. DosErrClass and DosError are supplied to assist in error processing. 
  10485.  
  10486.      DosErrClass takes as input a non-zero return value that was received from 
  10487.       any control-program function. (Any return value other than 0 indicates 
  10488.       that an error occurred.) The output is a classification of the error and 
  10489.       a recommended action. Depending on the application, the recommended 
  10490.       action could be followed, or a specific recovery action could be 
  10491.       performed. 
  10492.  
  10493.      DosError enables an application to prevent OS/2 from displaying a default 
  10494.       error message in a pop-up window when either a hard error or a software 
  10495.       exception occurs. 
  10496.  
  10497.  
  10498. ΓòÉΓòÉΓòÉ 6.1.1. Classifying Return Values ΓòÉΓòÉΓòÉ
  10499.  
  10500. When a control-program function has been successfully completed, a return value 
  10501. of 0 is returned to the calling thread. A non-zero return value indicates that 
  10502. an error has occurred. 
  10503.  
  10504. Each non-zero value corresponds to a symbolic error identifier that indicates 
  10505. the cause of the error. For example, a return value of 2 from DosOpen 
  10506. (indicating that the file was not found) corresponds to the symbolic identifier 
  10507. ERROR_FILE_NOT_FOUND. 
  10508.  
  10509. DosErrClass helps applications deal with non-zero return values by taking a 
  10510. return value as input and returning both an error classification and a 
  10511. recommended action. Depending on the application, the recommended action could 
  10512. be followed, or a more specific recovery routine could be executed. 
  10513.  
  10514.  
  10515. ΓòÉΓòÉΓòÉ 6.1.2. Disabling Error Notification ΓòÉΓòÉΓòÉ
  10516.  
  10517. A hard error is typically an error (such as the opening of a disk-drive door 
  10518. while a diskette is being read, or any similar kind of device error) that 
  10519. cannot be resolved by software. When a hard error occurs, the system default 
  10520. action is to prompt for user input by displaying a message in a pop-up window. 
  10521.  
  10522. DosError disables the default action, foregoing the displayed message and 
  10523. causing an appropriate return value to be returned to whichever control-program 
  10524. function was running when the hard error occurred. The application must 
  10525. determine the appropriate response by referring to the return value. 
  10526.  
  10527. DosError also enables the application to disable end-user notification if 
  10528. either a program exception or an untrapped numeric-processor exception occurs. 
  10529. However, if one of these exceptions occurs while user notification is disabled, 
  10530. the application will still be ended. 
  10531.  
  10532. As with hard errors, the system default is that user notification for these 
  10533. exceptions is enabled. 
  10534.  
  10535.  
  10536. ΓòÉΓòÉΓòÉ 6.2. Using Error Management ΓòÉΓòÉΓòÉ
  10537.  
  10538. OS/2 supplies DosErrClass and DosError for error processing. DosErrClass aids 
  10539. in determining the appropriate action that an application should take in 
  10540. response to an error. DosError enables applications to disable the pop-up 
  10541. windows used by OS/2 to inform the user of a hard-error or an exception. 
  10542.  
  10543. Note:  In the example code fragments that follow, error checking was left out 
  10544.        to conserve space. Applications should always check the return code that 
  10545.        the functions return. Control Program functions return an APIRET value. 
  10546.        A return code of 0 indicates success. If a non-zero value is returned, 
  10547.        an error occurred. 
  10548.  
  10549.  
  10550. ΓòÉΓòÉΓòÉ 6.2.1. Classifying Errors ΓòÉΓòÉΓòÉ
  10551.  
  10552. DosErrClass receives a non-zero return value from another control-program 
  10553. function as input. It then classifies the return value, tells where in the 
  10554. system the error occurred, and recommends a corrective action. 
  10555.  
  10556. In the following example, an attempt is made to delete a nonexistent file. The 
  10557. return value is then passed to DosErrClass so that more information about the 
  10558. error can be obtained, including any corrective actions that can be taken. 
  10559.  
  10560.  
  10561.  
  10562. Uses
  10563.   Crt,Dos,Os2Def,Os2Base;
  10564.  
  10565. Var
  10566.   UlError  : ULONG;
  10567.   UlClass  : ULONG;
  10568.   UlAction : ULONG;
  10569.   UlLocus  : ULONG;
  10570.   Ulrc     : APIRET;
  10571.  
  10572. Begin
  10573.  
  10574.   ulError := DosDelete(FILE_DELETE);           (* File name path                *)
  10575.  
  10576.   ulrc := DosErrClass(ulError,                 (* Return value to be analyzed   *)
  10577.                       ulClass,                (* Error classIfication          *)
  10578.                       ulAction,               (* Recommended corrective action *)
  10579.                       ulLocus);               (* Where the error occurred      *)
  10580.  
  10581. End.
  10582.  
  10583. When called by a family-mode application, this function can return a valid 
  10584. error classification only for errors that have actually occurred. Also, the 
  10585. classifications of a given return value might not be the same for family-mode 
  10586. and OS/2-mode applications. 
  10587.  
  10588.  
  10589. ΓòÉΓòÉΓòÉ 6.2.2. Disabling Hard-Error and Exception Messages ΓòÉΓòÉΓòÉ
  10590.  
  10591. DosError disables or enables end-user notification of hard errors, program 
  10592. exceptions, or untrapped, numeric-processor exceptions. 
  10593.  
  10594. In the following example, pop-up windows for hard errors and exceptions are 
  10595. disabled, then enabled again. 
  10596.  
  10597.  
  10598.  
  10599. (*************************************************)
  10600. (* use pre-defined constants                     *)
  10601. (* FERR_DISABLEHARDERR   ($00000000)            *)
  10602. (* FERR_ENABLEHARDERR    ($00000001)            *)
  10603. (* FERR_ENABLEEXCEPTION  ($00000000)            *)
  10604. (* FERR_DISABLEEXCEPTION ($00000002)            *)
  10605. (* to create constants needed for DosError calls *)
  10606. (*************************************************)
  10607.  
  10608.  
  10609. Uses
  10610.   Crt,Dos,Os2Def,Os2Base;
  10611.  
  10612. Var
  10613.   Ulrc : APIRET; (* Return code *)
  10614.  
  10615. Begin
  10616.  
  10617.   ulrc := DosError(DISABLE_ERRORPOPUPS);   (* Action flag for disable *)
  10618.   ulrc := DosError(ENABLE_ERRORPOPUPS);    (* Action flag for enable  *)
  10619.  
  10620. End.
  10621.  
  10622. The action to take is encoded as a binary flag. The following table shows the 
  10623. bit-values and their meanings. 
  10624.  
  10625. Bit Values to Enable and Disable Hard-Error and Exception Pop-up Messages 
  10626.  
  10627. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10628. ΓöéBit  ΓöéValueΓöéMeaning                                           Γöé
  10629. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10630. Γöé0    Γöé1    ΓöéEnables hard-error pop-up messages.               Γöé
  10631. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10632. Γöé0    Γöé0    ΓöéDisables hard-error pop-up messages.              Γöé
  10633. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10634. Γöé1    Γöé0    ΓöéEnables exception pop-up messages.                Γöé
  10635. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10636. Γöé1    Γöé1    ΓöéDisables exception pop-up messages.               Γöé
  10637. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10638. If DosError is not called, user notification for hard errors and exceptions is 
  10639. enabled by default. 
  10640.  
  10641.  
  10642. ΓòÉΓòÉΓòÉ 7. Exception Management ΓòÉΓòÉΓòÉ
  10643.  
  10644. An exception is an abnormal condition that can occur during program execution. 
  10645. Common causes of exceptions include: 
  10646.  
  10647.      I/O errors 
  10648.      Protection violations 
  10649.      Math errors 
  10650.      Intervention by the user or by another process 
  10651.  Activities that can cause exceptions include: 
  10652.  
  10653.      Trying to use memory that you do not have permission to access 
  10654.      Dividing by 0 
  10655.      The user pressing Ctrl+Break 
  10656.  Exceptions include both unexpected errors (such as a memory protection 
  10657.  violation) and expected errors (such as guard-page exceptions). Exceptions can 
  10658.  be a synchronous exception, that is, caused by an action of the executing 
  10659.  thread, or an asynchronous exception, caused by an event external to the 
  10660.  executing thread (such as the user pressing Ctrl+Break). When an exception is 
  10661.  caused by the user pressing Ctrl+Break or Ctrl+C, or by another process 
  10662.  issuing DosKillProcess for your process, the exception is called a signal 
  10663.  exception. 
  10664.  
  10665.  In most cases, the default action taken by OS/2  when an exception occurs is 
  10666.  to terminate the application that caused the exception. Rather than having 
  10667.  OS/2 default action occur, an application can register its own subroutine to 
  10668.  handle exceptions. These routines are called exception handlers. Exception 
  10669.  handlers enable an application to handle some errors itself, allowing the 
  10670.  application to avoid termination (or at least to terminate gracefully). 
  10671.  
  10672.  When exception handlers are registered, they are added to an exception handler 
  10673.  chain. The chain starts empty and each new handler is added to the head of the 
  10674.  chain. Exceptions are passed to the exception handlers in the chain in 
  10675.  Last-In-First-Out order, so the last exception handler to be registered is the 
  10676.  first one to get an opportunity to handle each exception. 
  10677.  
  10678.  Exception handlers have the capability to complete critical code sections 
  10679.  without being interrupted by other asynchronous exceptions; these critical 
  10680.  code sections are called must-complete sections. 
  10681.  
  10682.  Exception handlers can be removed from the exception handler chains with 
  10683.  DosUnsetExceptionHandler. Another way that exception handlers can be removed 
  10684.  from the chain is with an unwind operation. When unwinding an exception 
  10685.  handler, the exception handler is first called, then removed from the 
  10686.  exception handler chain. 
  10687.  
  10688.  The following topics are related to the information in this chapter: 
  10689.  
  10690.      Memory 
  10691.      Program execution and control 
  10692.  
  10693.  
  10694. ΓòÉΓòÉΓòÉ 7.1. About Exception Management ΓòÉΓòÉΓòÉ
  10695.  
  10696. A multitasking operating system must manage applications carefully. A serious 
  10697. error (such as an attempt to access protected memory) occurring in one 
  10698. application cannot be permitted to damage any other application in the system. 
  10699. To manage errors that might damage other applications, OS/2 defines a class of 
  10700. error conditions called exceptions and defines default actions for those 
  10701. errors. 
  10702.  
  10703. When an exception occurs, the default action taken by OS/2 is usually to 
  10704. terminate the application causing the exception (unless the application has 
  10705. registered its own exception handling routines). In some cases, when the 
  10706. exception can safely be ignored, execution is allowed to continue. 
  10707.  
  10708. Rather than having OS/2 default action occur, an application can register its 
  10709. own exception handlers routines. An exception handler routine could be written 
  10710. to correct certain error conditions-when these error conditions occur, the 
  10711. thread's exception handler gets the exception, corrects the condition, and the 
  10712. thread continues executing rather than being terminated immediately by OS/2. 
  10713. OS/2's default action is taken if there are no user-defined exception handling 
  10714. routines or if all user-defined routines return without handling the exception. 
  10715.  
  10716. An application can use DosSetExceptionHandler to register an exception handling 
  10717. routine. DosSetExceptionHandler takes a pointer to an 
  10718. EXCEPTIONREGISTRATIONRECORD data structure as its only argument. The first 
  10719. field in this data structure is a pointer to the previous exception handler in 
  10720. the chain. This field is maintained by OS/2 and must never be modified by an 
  10721. application. The second field is a pointer to the exception handling routine 
  10722. that will be registered by OS/2. 
  10723.  
  10724. A single exception handler can be used to handle all the exceptions that you 
  10725. choose to handle. It is not necessary to have a separate exception handler for 
  10726. each exception. 
  10727.  
  10728. Once an exception handling routine is registered, the system will notify it 
  10729. when an exception occurs. OS/2 sends synchronous exceptions only to the thread 
  10730. causing the exception. An application must register an exception handler for 
  10731. each thread that is handling exceptions. When OS/2 terminates an application, 
  10732. however, a process-termination exception is sent to all threads used by the 
  10733. application to be terminated. When the user presses Ctrl+Break, an asynchronous 
  10734. signal exception is sent only to Thread 1, the main thread, of the executing 
  10735. process. 
  10736.  
  10737. The exception handling routine is passed the following four parameters that 
  10738. provide exception-specific information: 
  10739.  
  10740.  EXCEPTIONREPORTRECORD 
  10741.     Describes the exception and its parameters. The first field of this data 
  10742.     structure contains the number of the exception that occurred. 
  10743.  
  10744.  EXCEPTIONREGISTRATIONRECORD 
  10745.     The EXCEPTIONREGISTRATIONRECORD data structure used to initially register 
  10746.     the exception handler. This is a microprocessor-specific value. 
  10747.  
  10748.  ContextRecord 
  10749.     Describes the machine state at the time the exception occurred. 
  10750.  
  10751.  DispatcherContext 
  10752.     Contains state information on nested exception and collided unwinds. This 
  10753.     information must not be modified by the application. 
  10754.  Details of the parameters and data structures can be found in Exception 
  10755.  Handler Interface. 
  10756.  
  10757.  OS/2 places the exception handlers for each thread in an exception handler 
  10758.  chain. Registering an exception handler adds it to the head of the chain. 
  10759.  
  10760.  When an application registers an exception handler, the exception handler is 
  10761.  added to the head of the chain. If the application calls a routine in a 
  10762.  dynamic link library (DLL), the DLL might register an exception handler in 
  10763.  case there is an exception while its code is executing; the DLL deregisters 
  10764.  the exception handler before returning control to the application. The DLL's 
  10765.  exception handler would be ahead of the application's exception handler in the 
  10766.  chain. 
  10767.  
  10768.  Exception handlers in the chain are notified of an exception in 
  10769.  Last-In-First-Out (LIFO) order. Thus, if an exception occurs while your thread 
  10770.  is executing, the exception handler for your thread is notified of the 
  10771.  exception first. If your exception handler chooses to handle the exception, 
  10772.  the earlier exception handlers in the chain never see the exception. If your 
  10773.  exception handler chooses not to handle the exception, it is passed along to 
  10774.  the next earlier exception handler in the chain. If no exception handler in 
  10775.  the chain chooses to handle the exception, OS/2 takes the default action for 
  10776.  the exception. 
  10777.  
  10778.  If an exception happens while DLL code is executing, and if the DLL's 
  10779.  exception handler chooses to handle the exception, your application's 
  10780.  exception handlers will never be aware it. 
  10781.  
  10782.  
  10783. ΓòÉΓòÉΓòÉ 7.1.1. System Exceptions ΓòÉΓòÉΓòÉ
  10784.  
  10785. OS/2 defines a class of error conditions called system exceptions, and 
  10786. specifies the default actions that are taken when these system exceptions 
  10787. occur. The default action taken by OS/2 in most cases is to terminate the 
  10788. thread that caused the system exception. 
  10789.  
  10790. System exceptions include both synchronous and asynchronous exceptions. 
  10791. Synchronous exceptions are caused by events that are internal to the execution 
  10792. of a thread. For example, synchronous exceptions could be caused by invalid 
  10793. parameters, or by the request of a thread to end its own execution. 
  10794.  
  10795. Asynchronous exceptions are caused by events that are external to the execution 
  10796. of a thread. For example, an asynchronous exception can be caused by a user 
  10797. entering a Ctrl+C or Ctrl+Break key sequence, or by a process calling 
  10798. DosKillProcess to end the execution of another process. 
  10799.  
  10800. The Ctrl+Break, Ctrl+C, and DosKillProcess-generated exceptions are also known 
  10801. as signals, or as signal exceptions. 
  10802.  
  10803. OS/2 delivers exceptions that occur in 16-bit as well as 32-bit code. The 
  10804. sequence or hierarchy for delivering exceptions is as follows: 
  10805.  
  10806.      When an exception occurs in 32-bit code, the system gives control only to 
  10807.       the 32-bit exception handlers registered for the current thread. If the 
  10808.       thread has not registered any 32-bit handlers, the system default action 
  10809.       occurs. 
  10810.  
  10811.      When an exception occurs in 16-bit code, the system first gives control 
  10812.       to the 32-bit exception handlers registered for the current thread. If 
  10813.       the exception is not handled by one of these handlers, control is passed 
  10814.       to the 16-bit handler, if one exists for the given exception. If there is 
  10815.       no 16-bit handler for the exception, the system default action occurs. 
  10816.  
  10817.  Notification of an exception is usually sent only to the thread that caused 
  10818.  the exception. However, if a thread uses DosExit to terminate all the threads 
  10819.  in the process, notification of the process-termination exception is sent to 
  10820.  every thread in the process. The thread that used DosExit gets a 
  10821.  XCPT_PROCESS_TERMINATE exception, all the other threads in the process get a 
  10822.  XCPT_ASYNC_PROCESS_TERMINATE exception. 
  10823.  
  10824.  Exit-list processing occurs on a per-process basis after a process-termination 
  10825.  exception has been delivered to each thread in the process and each thread has 
  10826.  finally ended except Thread 1 (the main thread). Therefore, any thread that 
  10827.  handles a process-termination exception must eventually end its own execution 
  10828.  voluntarily. Otherwise, the process-termination sequence will not conclude 
  10829.  properly. 
  10830.  
  10831.  The following tables briefly list the possible exceptions. For more detailed 
  10832.  information about the system exceptions, including default system action, 
  10833.  parameters, and related trap numbers, see the Control Program Programming 
  10834.  Reference. 
  10835.  
  10836.  Non-Fatal, Software-Generated Exceptions 
  10837.  
  10838.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10839.   ΓöéException Symbolic Constant           ΓöéDescription           Γöé
  10840.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10841.   ΓöéXCPT_GUARD_PAGE_VIOLATION             ΓöéA guard page has been Γöé
  10842.   Γöé                                      Γöéaccessed.             Γöé
  10843.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10844.   ΓöéXCPT_UNABLE_TO_GROW_STACK             ΓöéThe system is unable  Γöé
  10845.   Γöé                                      Γöéto allocate the memoryΓöé
  10846.   Γöé                                      Γöépage directly below   Γöé
  10847.   Γöé                                      Γöéthe guard page just   Γöé
  10848.   Γöé                                      Γöéaccessed.             Γöé
  10849.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10850.  
  10851.  Fatal, Software-Generated Exceptions 
  10852.  
  10853.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10854.   ΓöéException Symbolic Constant           ΓöéDescription           Γöé
  10855.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10856.   ΓöéXCPT_IN_PAGE_ERROR                    ΓöéAn I/O error occurred Γöé
  10857.   Γöé                                      Γöéwhile reading a memoryΓöé
  10858.   Γöé                                      Γöépage into memory.     Γöé
  10859.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10860.   ΓöéXCPT_PROCESS_TERMINATE                ΓöéThe thread has        Γöé
  10861.   Γöé                                      Γöéterminated itself withΓöé
  10862.   Γöé                                      ΓöéDosExit.              Γöé
  10863.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10864.   ΓöéXCPT_ASYNC_PROCESS_TERMINATE          ΓöéAnother thread in the Γöé
  10865.   Γöé                                      Γöéprocess has caused theΓöé
  10866.   Γöé                                      Γöéthread to terminate.  Γöé
  10867.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10868.   ΓöéXCPT_NONCONTINUABLE_EXCEPTION         ΓöéAn exception handler  Γöé
  10869.   Γöé                                      Γöéhas attempted to      Γöé
  10870.   Γöé                                      Γöécontinue execution in Γöé
  10871.   Γöé                                      Γöéresponse to a         Γöé
  10872.   Γöé                                      Γöénon-continuable       Γöé
  10873.   Γöé                                      Γöéexception.            Γöé
  10874.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10875.   ΓöéXCPT_INVALID_DISPOSITION              ΓöéAn exception handler  Γöé
  10876.   Γöé                                      Γöéhas returned an       Γöé
  10877.   Γöé                                      Γöéinvalid value.        Γöé
  10878.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10879.  
  10880.  Fatal, Hardware-Generated Exceptions 
  10881.  
  10882.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10883.   ΓöéException Symbolic Constant           ΓöéDescription           Γöé
  10884.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10885.   ΓöéXCPT_ACCESS_VIOLATION                 ΓöéAn access violation orΓöé
  10886.   Γöé                                      Γöépage fault has        Γöé
  10887.   Γöé                                      Γöéoccurred.             Γöé
  10888.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10889.   ΓöéXCPT_INTEGER_DIVIDE_BY_ZERO           ΓöéAn attempt to divide  Γöé
  10890.   Γöé                                      Γöéby 0 has occurred in  Γöé
  10891.   Γöé                                      Γöéan integer operation. Γöé
  10892.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10893.   ΓöéXCPT_FLOAT_DIVIDE_BY_ZERO             ΓöéAn attempt to divide  Γöé
  10894.   Γöé                                      Γöéby 0 has occurred in aΓöé
  10895.   Γöé                                      Γöéfloating point        Γöé
  10896.   Γöé                                      Γöéoperation.            Γöé
  10897.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10898.   ΓöéXCPT_FLOAT_INVALID_OPERATION          ΓöéAn invalid floating   Γöé
  10899.   Γöé                                      Γöépoint operation was   Γöé
  10900.   Γöé                                      Γöéattempted.            Γöé
  10901.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10902.   ΓöéXCPT_ILLEGAL_INSTRUCTION              ΓöéAn attempt was made toΓöé
  10903.   Γöé                                      Γöéexecute an instructionΓöé
  10904.   Γöé                                      Γöéthat is not defined onΓöé
  10905.   Γöé                                      Γöéthe host machine's    Γöé
  10906.   Γöé                                      Γöéarchitecture.         Γöé
  10907.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10908.   ΓöéXCPT_PRIVILEGED_INSTRUCTION           ΓöéAn attempt was made toΓöé
  10909.   Γöé                                      Γöéexecute an instructionΓöé
  10910.   Γöé                                      Γöéthat is not permitted Γöé
  10911.   Γöé                                      Γöéin the current machineΓöé
  10912.   Γöé                                      Γöémode or that the      Γöé
  10913.   Γöé                                      Γöéapplication does not  Γöé
  10914.   Γöé                                      Γöéhave permission to    Γöé
  10915.   Γöé                                      Γöéexecute.              Γöé
  10916.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10917.   ΓöéXCPT_INTEGER_OVERFLOW                 ΓöéAn integer operation  Γöé
  10918.   Γöé                                      Γöégenerated a carry-out Γöé
  10919.   Γöé                                      Γöéof the most           Γöé
  10920.   Γöé                                      Γöésignificant bit.      Γöé
  10921.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10922.   ΓöéXCPT_FLOAT_OVERFLOW                   ΓöéA floating point      Γöé
  10923.   Γöé                                      Γöéoperation generated a Γöé
  10924.   Γöé                                      Γöéresulting exponent    Γöé
  10925.   Γöé                                      Γöéthat is greater than  Γöé
  10926.   Γöé                                      Γöéthe magnitude         Γöé
  10927.   Γöé                                      Γöépermitted for the     Γöé
  10928.   Γöé                                      Γöéoperands.             Γöé
  10929.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10930.   ΓöéXCPT_FLOAT_UNDERFLOW                  ΓöéA floating point      Γöé
  10931.   Γöé                                      Γöéoperation generated a Γöé
  10932.   Γöé                                      Γöéresulting exponent    Γöé
  10933.   Γöé                                      Γöéthat is less than the Γöé
  10934.   Γöé                                      Γöémagnitude provided forΓöé
  10935.   Γöé                                      Γöéthe operands.         Γöé
  10936.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10937.   ΓöéXCPT_FLOAT_DENORMAL_OPERAND           ΓöéAn attempt was made toΓöé
  10938.   Γöé                                      Γöéperform an arithmetic Γöé
  10939.   Γöé                                      Γöéoperation on a        Γöé
  10940.   Γöé                                      Γöédenormal operand.     Γöé
  10941.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10942.   ΓöéXCPT_FLOAT_INEXACT_RESULT             ΓöéThe result of an      Γöé
  10943.   Γöé                                      Γöéoperation is not      Γöé
  10944.   Γöé                                      Γöéexactly representable Γöé
  10945.   Γöé                                      Γöéin the target format. Γöé
  10946.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10947.   ΓöéXCPT_FLOAT_STACK_CHECK                ΓöéAn illegal stack      Γöé
  10948.   Γöé                                      Γöéoperation was         Γöé
  10949.   Γöé                                      Γöéattempted by the      Γöé
  10950.   Γöé                                      Γöéfloating point        Γöé
  10951.   Γöé                                      Γöécoprocessor.          Γöé
  10952.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10953.   ΓöéXCPT_DATATYPE_MISALIGNMENT            ΓöéAn attempt was made toΓöé
  10954.   Γöé                                      Γöéstore a data in an    Γöé
  10955.   Γöé                                      Γöéaddress that is not   Γöé
  10956.   Γöé                                      Γöénaturally aligned on aΓöé
  10957.   Γöé                                      Γöéhardware architecture Γöé
  10958.   Γöé                                      Γöéthat does not provide Γöé
  10959.   Γöé                                      Γöéalignment hardware.   Γöé
  10960.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10961.   ΓöéXCPT_BREAKPOINT                       ΓöéA breakpoint          Γöé
  10962.   Γöé                                      Γöéinstruction was       Γöé
  10963.   Γöé                                      Γöéexecuted.             Γöé
  10964.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10965.   ΓöéXCPT_SINGLE_STEP                      ΓöéOne instruction has   Γöé
  10966.   Γöé                                      Γöébeen executed in      Γöé
  10967.   Γöé                                      Γöésingle-step mode.     Γöé
  10968.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10969.  
  10970.  Fatal Exceptions 
  10971.  
  10972.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10973.   ΓöéException Symbolic Constant           ΓöéDescription           Γöé
  10974.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10975.   ΓöéXCPT_INVALID_LOCK_SEQUENCE            ΓöéAn invalid operation  Γöé
  10976.   Γöé                                      Γöéwas attempted within  Γöé
  10977.   Γöé                                      Γöéan interlocked sectionΓöé
  10978.   Γöé                                      Γöéof code.              Γöé
  10979.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10980.   ΓöéXCPT_ARRAY_BOUNDS_EXCEEDED            ΓöéAn array index outsideΓöé
  10981.   Γöé                                      Γöéits upper and lower   Γöé
  10982.   Γöé                                      Γöéboundary was detected.Γöé
  10983.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10984.  
  10985.  Unwind Operation Exceptions 
  10986.  
  10987.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10988.   ΓöéException Symbolic Constant           ΓöéDescription                 Γöé
  10989.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10990.   ΓöéXCPT_UNWIND                           ΓöéAn unwind operation is in   Γöé
  10991.   Γöé                                      Γöéprocess.                    Γöé
  10992.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10993.   ΓöéXCPT_BAD_STACK                        ΓöéAn                          Γöé
  10994.   Γöé                                      ΓöéEXCEPTIONREGISTRATIONRECORD Γöé
  10995.   Γöé                                      Γöédata structure was reached  Γöé
  10996.   Γöé                                      Γöéthat is not properly alignedΓöé
  10997.   Γöé                                      Γöéor that is not within the   Γöé
  10998.   Γöé                                      Γöécurrent stack boundaries.   Γöé
  10999.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11000.   ΓöéXCPT_INVALID_UNWIND_TARGET            ΓöéThe address of the target   Γöé
  11001.   Γöé                                      ΓöéEXCEPTIONREGISTRATIONRECORD Γöé
  11002.   Γöé                                      Γöéis below the current stack  Γöé
  11003.   Γöé                                      Γöépointer or not in the       Γöé
  11004.   Γöé                                      Γöéexception handler chain.    Γöé
  11005.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11006.  
  11007.  Fatal Signal Exceptions 
  11008.  
  11009.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11010.   ΓöéException Symbolic Constant           ΓöéDescription           Γöé
  11011.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11012.   ΓöéXCPT_SIGNAL                           ΓöéA signal was made to  Γöé
  11013.   Γöé                                      Γöéyour process (usually Γöé
  11014.   Γöé                                      Γöéto stop). All the     Γöé
  11015.   Γöé                                      Γöésignal exceptions     Γöé
  11016.   Γöé                                      Γöé(Ctrl+Break, Ctrl+C,  Γöé
  11017.   Γöé                                      Γöéand                   Γöé
  11018.   Γöé                                      ΓöéXCPT_SIGNAL_KILLPROC) Γöé
  11019.   Γöé                                      Γöécome under this       Γöé
  11020.   Γöé                                      Γöéexception.            Γöé
  11021.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11022.  
  11023.  
  11024. ΓòÉΓòÉΓòÉ 7.1.2. Signal Exceptions ΓòÉΓòÉΓòÉ
  11025.  
  11026. Signal exceptions are special events sent to a thread when the user presses 
  11027. certain key sequences or when another thread or process explicitly initiates 
  11028. the exception. There are three types of signal exceptions: 
  11029.  
  11030.  XCPT_SIGNAL_BREAK When the user presses Ctrl+Break 
  11031.  XCPT_SIGNAL_INTR When the user presses Ctrl+C 
  11032.  XCPT_SIGNAL_KILLPROC When another process uses DosKillProcess to send a 
  11033.       XCPT_SIGNAL_KILLPROC exception to your process. 
  11034.  
  11035.  Signal exceptions are sent only to Thread 1 (the main thread) in the process 
  11036.  receiving the exception. If an exception handler is registered on Thread 1, it 
  11037.  must be prepared to receive signal exceptions. The thread 1 exception handler 
  11038.  can always ignore the signal exception by returning XCPT_CONTINUE_SEARCH. 
  11039.  
  11040.  If the thread 1 exception handler is to receive signal exceptions, it must use 
  11041.  DosSetSignalExceptionFocus to notify OS/2 that it wants to receive the 
  11042.  XCPT_SIGNAL_INTR (Ctrl+C) and XCPT_SIGNAL_BREAK (Ctrl+Break) signals. 
  11043.  Otherwise, these exceptions are not passed to the exception handler and the 
  11044.  default action-to terminate the process-is taken by OS/2. The thread will get 
  11045.  XCPT_SIGNAL_KILLPROC signals whether it uses DosSetSignalExceptionFocus or 
  11046.  not. 
  11047.  
  11048.  All three of these signals are delivered by a single exception-XCPT_SIGNAL-and 
  11049.  the exception handler for Thread 1 can choose to handle none, some, or all of 
  11050.  the signals. The signal being sent can be determined by examining the 
  11051.  exception information in EXCEPTIONREPORTRECORD. 
  11052.  
  11053.  The following table provides information about each type of signal. 
  11054.  
  11055.  Signal Exceptions 
  11056.  
  11057.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11058.   ΓöéSignal      ΓöéSymbolic Constant         ΓöéDescription                Γöé
  11059.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11060.   ΓöéCtrl+Break  ΓöéXCPT_SIGNAL_BREAK         ΓöéThis exception is sent to  Γöé
  11061.   Γöé            Γöé                          ΓöéThread 1 in the current    Γöé
  11062.   Γöé            Γöé                          Γöékeyboard-focus process whenΓöé
  11063.   Γöé            Γöé                          Γöéa Ctrl+Break key sequence  Γöé
  11064.   Γöé            Γöé                          Γöéis received from the       Γöé
  11065.   Γöé            Γöé                          Γöékeyboard. The default      Γöé
  11066.   Γöé            Γöé                          Γöéaction taken by OS/2 for   Γöé
  11067.   Γöé            Γöé                          Γöéthis exception is forced   Γöé
  11068.   Γöé            Γöé                          Γöéprocess termination.       Γöé
  11069.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11070.   ΓöéCtrl+C      ΓöéXCPT_SIGNAL_INTR          ΓöéThis exception is sent to  Γöé
  11071.   Γöé            Γöé                          ΓöéThread 1 in the current    Γöé
  11072.   Γöé            Γöé                          Γöékeyboard-focus process whenΓöé
  11073.   Γöé            Γöé                          Γöéa Ctrl+C key sequence is   Γöé
  11074.   Γöé            Γöé                          Γöéreceived from the keyboard.Γöé
  11075.   Γöé            Γöé                          ΓöéThe default action taken byΓöé
  11076.   Γöé            Γöé                          ΓöéOS/2 for this exception is Γöé
  11077.   Γöé            Γöé                          Γöéforced process termination.Γöé
  11078.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11079.   ΓöéKill ProcessΓöéXCPT_SIGNAL_KILLPROC      ΓöéThis exception is sent to  Γöé
  11080.   ΓöéSignal      Γöé                          ΓöéThread 1 in the process    Γöé
  11081.   Γöé            Γöé                          Γöéspecified when an          Γöé
  11082.   Γöé            Γöé                          Γöéapplication uses           Γöé
  11083.   Γöé            Γöé                          ΓöéDosKillProcess. The        Γöé
  11084.   Γöé            Γöé                          ΓöéXCPT_SIGNAL_KILLPROC signalΓöé
  11085.   Γöé            Γöé                          Γöéexception results from an  Γöé
  11086.   Γöé            Γöé                          Γöéaction external to the     Γöé
  11087.   Γöé            Γöé                          Γöéprocess. The default actionΓöé
  11088.   Γöé            Γöé                          Γöétaken by OS/2 for this     Γöé
  11089.   Γöé            Γöé                          Γöéexception is forced processΓöé
  11090.   Γöé            Γöé                          Γöétermination.               Γöé
  11091.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11092.  
  11093.  
  11094. ΓòÉΓòÉΓòÉ 7.1.2.1. Handling Signal Exceptions ΓòÉΓòÉΓòÉ
  11095.  
  11096. To handle signal exceptions, a process must first call DosSetExceptionHandler 
  11097. to register a handler for the exceptions. Next, the process must call 
  11098. DosSetSignalExceptionFocus, with the Flag parameter set to ON, in order to 
  11099. receive signal exceptions. 
  11100.  
  11101. After a process calls DosSetSignalExceptionFocus, it remains the signal focus 
  11102. for its screen group until it calls DosSetSignalExceptionFocus again with the 
  11103. Flag parameter set to OFF, or until another process in the screen group makes a 
  11104. call to the same function with Flag set to ON. 
  11105.  
  11106. Each call to DosSetSignalExceptionFocus with Flag set to ON increments a 
  11107. counter in the per-task data area of the process. Each call with Flag set to 
  11108. OFF decrements the counter. When a signal exception occurs, the system checks 
  11109. to see whether the value of the counter is greater than 0. If it is, the signal 
  11110. is sent. 
  11111.  
  11112. DosSetSignalExceptionFocus returns ERROR_NESTED_TOO_DEEP if the value of the 
  11113. counter exceeds 65535. If a thread tries to turn off the signal focus when the 
  11114. value of the counter is 0, ERROR_ALREADY_RESET is returned. 
  11115.  
  11116. All 32-bit exception handlers that are attached to thread 1 of the process will 
  11117. be given an opportunity to handle the signal. If no 32-bit exception handler 
  11118. returns XCPT_CONTINUE_EXECUTION in response to the signal, and if a 16-bit 
  11119. exception handler is registered, then the 16-bit handler for the signal will be 
  11120. executed. If none exists, then the process will be terminated. 
  11121.  
  11122. In order to continue receiving signals, the process must either return 
  11123. XCPT_CONTINUE_EXECUTION from a 32-bit exception handler, or it must call the 
  11124. 16-bit DosSetSigHandler function, specifying SIG_ACKNOWLEDGE as the value of 
  11125. the Action parameter to acknowledge the signal, or it must call 
  11126. DosAcknowledgeSignalException. 
  11127.  
  11128. The typematic facility of the keyboard could cause a Ctrl+C or Ctrl+Break 
  11129. signal exception to repeat. For this reason, the system holds these exceptions 
  11130. until an exception handler returns XCPT_CONTINUE_EXECUTION, or calls 
  11131. DosAcknowledgeSignalException. However, only one signal exception is actually 
  11132. held; they are not queued by the system. 
  11133.  
  11134. See Must-Complete Sections for information about how a process can defer the 
  11135. handling of signal exceptions. 
  11136.  
  11137.  
  11138. ΓòÉΓòÉΓòÉ 7.1.2.2. Sending Signal Exceptions ΓòÉΓòÉΓòÉ
  11139.  
  11140. A process can send the XCPT_SIGNAL signal exception to another process by 
  11141. calling DosSendSignalException. 
  11142.  
  11143. In order for the specified process to receive the exception, it must have an 
  11144. exception handler registered for Thread 1, and it must designate itself as the 
  11145. signal focus for its screen group by calling DosSetSignalExceptionFocus. 
  11146.  
  11147. Presentation Manager applications cannot request exception focus for Ctrl+C and 
  11148. Ctrl+Break. However, establishing an exception handler for Ctrl+C and 
  11149. Ctrl+Break is supported for Vio-Window and full-screen applications. 
  11150.  
  11151.  
  11152. ΓòÉΓòÉΓòÉ 7.1.3. Raising Exceptions ΓòÉΓòÉΓòÉ
  11153.  
  11154. Asynchronous exceptions that have been deferred in a must-complete section are 
  11155. dispatched automatically by the system when the thread exits the must-complete 
  11156. section. However, a synchronous exception that has been deferred must be raised 
  11157. by calling DosRaiseException. 
  11158.  
  11159. DosRaiseException can also be used to simulate either an asynchronous or 
  11160. synchronous exception. For example, a floating point emulator (a program that 
  11161. emulates a numeric coprocessor) can use this function to simulate an NPX 
  11162. exception. 
  11163.  
  11164. Raising a software exception captures the machine state of the current thread 
  11165. in a ContextRecord data structure. The ExceptionAddress field of 
  11166. EXCEPTIONREPORTRECORD is set to the return address of the caller, as are the 
  11167. corresponding fields of the ContextRecord data structure. The system then calls 
  11168. each exception handler on the list, passing each a pointer to 
  11169. EXCEPTIONREPORTRECORD and the created ContextRecord data structures. In the 
  11170. case of a continuable exception for which XCPT_CONTINUE_EXECUTION is returned, 
  11171. DosRaiseException restores the potentially modified context back into the 
  11172. machine before returning. Note that control cannot return to the caller of 
  11173. DosRaiseException if the instruction pointer in ContextRecord has been 
  11174. modified. 
  11175.  
  11176. The caller of DosRaiseException can set the EH_NONCONTINUABLE bit in the flags 
  11177. field of the EXCEPTIONREPORTRECORD data structure. By doing so, the caller 
  11178. guarantees that it is never returned to after the call to DosRaiseException. 
  11179. Note that once set, the EH_NONCONTINUABLE bit cannot be modified by any 
  11180. exception handler. The system will enforce this. 
  11181.  
  11182. Following are some possible scenarios that might occur after a call to 
  11183. DosRaiseException has been made: 
  11184.  
  11185.      If one of the exception handlers returns from a continuable exception 
  11186.       with a status of XCPT_CONTINUE_EXECUTION, DosRaiseException returns 
  11187.       NO_ERROR to the caller, and the thread resumes execution. 
  11188.  
  11189.      If one of the exception handlers returns from a noncontinuable exception 
  11190.       with a status of XCPT_CONTINUE_EXECUTION, the process is terminated, 
  11191.       because it is illegal to return XCPT_CONTINUE_EXECUTION from a 
  11192.       noncontinuable exception. 
  11193.  
  11194.      If none of the exception handlers in the thread's chain of handlers 
  11195.       returns with a status of XCPT_CONTINUE_EXECUTION, then the action taken 
  11196.       depends on the exception number: 
  11197.  
  11198.         -  If the exception number indicates a user-assigned exception or an 
  11199.            unassigned system exception, the process is terminated. 
  11200.  
  11201.         -  If the exception number is assigned to a system exception, and 
  11202.            CS:EIP points to 32-bit code, no 16-bit handlers are called and the 
  11203.            system default action is taken. Depending on which system exception 
  11204.            has been raised, the default action is either to terminate the 
  11205.            process, or to continue execution of the thread with NO_ERROR 
  11206.            returned to the caller. 
  11207.  
  11208.         -  If the exception number is assigned to a system exception that maps 
  11209.            to a 16-bit exception and CS:EIP points to 16-bit code, a 16-bit 
  11210.            exception handler is called, if one is registered. Otherwise OS/2 
  11211.            takes the default action. 
  11212.  
  11213.  
  11214. ΓòÉΓòÉΓòÉ 7.1.4. User-Defined Exceptions ΓòÉΓòÉΓòÉ
  11215.  
  11216. Exceptions can also be defined by the application. These are called 
  11217. user-defined exceptions (as opposed to system-defined exceptions, which are 
  11218. those exceptions defined by OS/2). Applications can define an exception in the 
  11219. following fashion: 
  11220.  
  11221. The application then raises the exception, using DosRaiseException: 
  11222.  
  11223. Uses
  11224.   Crt,Dos,Os2Def,Os2Base;
  11225.  
  11226. Var
  11227.   ERepRec : EXCEPTIONREPORTRECORD;
  11228.  
  11229. Begin
  11230.  
  11231.   ERepRec.ExceptionNum                := XCPT_YOUR_EXCEPTION;
  11232.   ERepRec.fHandlerFlags               := 0;
  11233.   ERepRec.NestedExceptionReportRecord := nil;
  11234.   ERepRec.ExceptionAddress            := nil;
  11235.   ERepRec.cParameters                 := 0;
  11236.  
  11237.   DosRaiseException(ERepRec);
  11238.  
  11239. End.
  11240. The exception handlers in the exception handler chain that are ahead of the 
  11241. application's exception handler will see the exception, but they will not 
  11242. recognize it, so they will return XCPT_CONTINUE_SEARCH. Only the application's 
  11243. exception handler will recognize the exception. 
  11244.  
  11245. The application's exception handler must return XCPT_CONTINUE_EXECUTION so that 
  11246. the exception will not continue to be passed down the exception handler chain. 
  11247.  
  11248.  
  11249. ΓòÉΓòÉΓòÉ 7.1.5. Must-Complete Sections ΓòÉΓòÉΓòÉ
  11250.  
  11251. A thread can defer the handling of asynchronous exceptions by creating a 
  11252. must-complete section. A must-complete section is a section of code that cannot 
  11253. be safely interrupted; it must be allowed to complete its execution even if an 
  11254. asynchronous exception occurs while within its boundaries. For example, a 
  11255. must-complete section can be used: 
  11256.  
  11257.      When modifying shared-memory data structures that cannot be modified 
  11258.       through an atomic operation 
  11259.      Across database update operations 
  11260.      During a remote communications operation. 
  11261.  
  11262.  Creating a must-complete section ensures that the execution of critical 
  11263.  instructions will be completed and that resources will be cleaned up before 
  11264.  the thread ends. When used in conjunction with a mutual exclusion (mutex) 
  11265.  semaphore, a must-complete section also ensures that a thread will have 
  11266.  exclusive access to a resource. 
  11267.  
  11268.  The boundaries of the must-complete section are defined by 
  11269.  DosEnterMustComplete and DosExitMustComplete requests. While a thread is 
  11270.  executing instructions in a must-complete section, the system will hold 
  11271.  asynchronous exceptions, which include signal exceptions and asynchronous 
  11272.  process terminations. 
  11273.  
  11274.  The system increments a counter each time DosEnterMustComplete is called, and 
  11275.  decrements the counter when DosExitMustComplete is called.  Any asynchronous 
  11276.  exceptions that have been held are dispatched when the counter reaches 0.  A 
  11277.  count greater than 1 indicates the degree of nesting of the must-complete 
  11278.  section. If DosExitMustComplete is called when the count is already 0, 
  11279.  ERROR_ALREADY_RESET is returned. 
  11280.  
  11281.  The handling of synchronous system exceptions and user-defined exceptions is 
  11282.  not deferred by the system. To defer the handling of these exceptions, a 
  11283.  procedure typically registers an exception handler (by calling 
  11284.  DosSetExceptionHandler) and initializes a local Raise Exception flag to 0 
  11285.  before entering the must-complete section. The flag is set to 1, and the 
  11286.  information is stored, if the exception handler receives a synchronous 
  11287.  exception that it wants to reraise later. 
  11288.  
  11289.  If the value of the raise exception flag is 0 after the thread exits from the 
  11290.  must-complete section, then no exceptions occurred, and the thread continues 
  11291.  its normal operation. 
  11292.  
  11293.  If the value of the flag is 1 after the must-complete section has been 
  11294.  completed, then an exception occurred, and the thread must call 
  11295.  DosRaiseException to raise the deferred exception for handling. 
  11296.  
  11297.  Note:  A thread must not call a function that is outside the scope of the 
  11298.         must-complete section (for example, a DLL routine), because an error in 
  11299.         the called routine could cause the process to end without returning. 
  11300.         Keep must-complete sections as short as possible. 
  11301.  
  11302.  
  11303. ΓòÉΓòÉΓòÉ 7.1.6. Unwinding Exception Handlers ΓòÉΓòÉΓòÉ
  11304.  
  11305. In addition to handling exceptions, exception handlers are used to clean up 
  11306. resources during the execution of a nonlocal GOTO instruction or during thread 
  11307. termination. (A nonlocal GOTO instruction jumps to a label outside the current 
  11308. procedure. The label is a procedure address or an address within a procedure 
  11309. that is on the stack, higher in the call frame chain.) 
  11310.  
  11311. DosUnwindException calls and removes exception handlers from a thread's chain 
  11312. of registered exception handlers up to, but not including, a specified 
  11313. exception handler. This is known as an unwind operation. DosUnwindException can 
  11314. also be used to unwind all exception handlers from the thread's exception 
  11315. handler chain and to terminate the thread. 
  11316.  
  11317. For example, with the C language setjmp() and longjmp() routines, the setjmp() 
  11318. would save the address of the current exception handler structure, along with 
  11319. any other information that is necessary to perform the longjmp() routine.  (The 
  11320. address of the current exception handler structure is obtained from the head of 
  11321. the exception handler chain. A pointer to the head of the chain is located in 
  11322. the Thread Information Block.) 
  11323.  
  11324. The longjmp() routine would initiate the unwind of procedure call frames by 
  11325. calling DosUnwindException and passing to it the saved address of the 
  11326. EXCEPTIONREGISTRATIONRECORD data structure. If the address of the 
  11327. EXCEPTIONREGISTRATIONRECORD data structure is not found in the chain, then the 
  11328. XCPT_INVALID_UNWIND_TARGET exception is raised, and the chain is not unwound. 
  11329.  
  11330. The machine state at the time of the call to DosUnwindException is captured in 
  11331. ContextRecord. The EH_UNWINDING flag is set in the exception flags field of the 
  11332. EXCEPTIONREPORTRECORD data structure. The EH_EXIT_UNWIND flag is also set if 
  11333. the EXCEPTIONREGISTRATIONRECORD parameter is set to 0 (if the application does 
  11334. not provide its own EXCEPTIONREPORTRECORD parameter OS/2 will construct one). A 
  11335. backward walk through the procedure call frames is then performed to find the 
  11336. target of the unwind operation. 
  11337.  
  11338. Note:  Even though a ContextRecord is used to capture the state of the machine, 
  11339.        unwinding is not considered an exception.  It is simply delivered 
  11340.        through the exception mechanism. 
  11341.  
  11342.  The first parameter to DosUnwindException is the address of an exception 
  11343.  handler's EXCEPTIONREGISTRATIONRECORD. DosUnwindException will unwind 
  11344.  exception handlers up to, but not including that exception handler. If a -1 is 
  11345.  passed to DosUnwindException for this parameter, DosUnwindException will 
  11346.  unwind all the exception handlers on the chain. If a 0 is passed to 
  11347.  DosUnwindException for this parameter, DosUnwindException will unwind all the 
  11348.  exception handlers on the chain and exit. 
  11349.  
  11350.  There is no return from a call to DosUnwindException, unless the stack is 
  11351.  invalid. Control is transferred to the specified instruction pointer address. 
  11352.  If DosUnwindException encounters an error during its processing, it raises 
  11353.  another exception rather than return control to the caller. 
  11354.  
  11355.  If the target call frame is reached and an exit unwind is not being performed 
  11356.  (that is, an EXCEPTIONREGISTRATIONRECORD is not 0), then the computed machine 
  11357.  state is restored from ContextRecord and control is transferred to the address 
  11358.  specified by the target-IP address parameter. Note that the stack pointer is 
  11359.  not restored, making it possible to transfer information on the stack. It is 
  11360.  the responsibility of the code at the target address to reset the stack 
  11361.  pointer as necessary. 
  11362.  
  11363.  DosUnwindException is called with C language calling conventions, which 
  11364.  permits the use of a variable number of arguments. Thus, the caller can pass 
  11365.  any amount of information on the stack, to be picked up at the target-IP 
  11366.  address. 
  11367.  
  11368.  If an exit unwind is being performed (the EXCEPTIONREGISTRATIONRECORD 
  11369.  parameter is 0), then all call frames are unwound until the base of the stack 
  11370.  is reached. 
  11371.  
  11372.  If the EXCEPTIONREPORTRECORD parameter is specified, then each exception 
  11373.  handler encountered during the unwind operation is called, using the specified 
  11374.  record. If this parameter is not specified, then DosUnwindException constructs 
  11375.  an EXCEPTIONREPORTRECORD that specifies the exception XCPT_UNWIND. 
  11376.  
  11377.  Colliding Unwinds 
  11378.  During an unwind operation, it is possible for one unwind to collide with a 
  11379.  previous unwind. This occurs when the scope of the second unwind overlaps the 
  11380.  scope of the first unwind. Following are two situations: 
  11381.  
  11382.      The target frame of the second unwind is a frame that has already been 
  11383.       unwound by the first unwind. 
  11384.  
  11385.      The target frame of the second unwind is a valid frame that is positioned 
  11386.       before or after the target frame of the first unwind. 
  11387.  
  11388.  Either of these situations could occur during the following scenarios: 
  11389.  
  11390.      An unwind handler calls unwind, or 
  11391.  
  11392.      An unwind handler hits an exception that has called unwind. 
  11393.  
  11394.  In the first scenario, the second unwind is attempting to unwind to an invalid 
  11395.  target. This causes the exception XCPT_INVALID_UNWIND_TARGET to be raised. 
  11396.  
  11397.  In the second scenario, the first unwind is abandoned, and the second unwind 
  11398.  continues to its target. The second scenario is far more likely. 
  11399.  
  11400.  Note:  A user program that uses high level language exception mechanisms must 
  11401.         never call DosUnwindException, because this could create conflicts with 
  11402.         the runtime exception strategy of the high level language. Unwind 
  11403.         operations in this case are performed through language-supported 
  11404.         facilities such as the C language longjmp() routine. 
  11405.  
  11406.  
  11407. ΓòÉΓòÉΓòÉ 7.1.7. Nested Exceptions ΓòÉΓòÉΓòÉ
  11408.  
  11409. A nested exception is an exception that occurs while another exception is being 
  11410. handled. 
  11411.  
  11412. OS/2 supports nested exceptions because an unhandled exception that occurs in 
  11413. an exception handler should be handled at a higher level-that is, by an 
  11414. ancestor of the procedure that registered the offending handler. 
  11415.  
  11416. When a nested exception occurs, the EH_NESTED_CALL flag is set in the exception 
  11417. structure to indicate that a nested function call is being made. The normal 
  11418. convention then is for the handler to return immediately without handling the 
  11419. exception if the EH_NESTED_CALL flag is set. Without this flag, it would be 
  11420. easy to create an infinitely recursive situation. 
  11421.  
  11422. For example, suppose we have the following scenario: 
  11423.  
  11424.    1. Procedure main calls procedure PA, which establishes exception handler 
  11425.       HA. 
  11426.    2. Procedure PA calls procedure PB, which establishes exception handler HB. 
  11427.    3. Procedure PB calls procedure PC, which establishes exception handler HC. 
  11428.    4. Procedure PC calls procedure PD. 
  11429.  
  11430.  Now suppose that procedure PD causes an exception. The system refers to the 
  11431.  current thread's chain of exception handlers. 
  11432.  
  11433.  Because procedure PD has no handler, the system calls HC, the handler for 
  11434.  procedure PC, with the EH_NESTED_CALL flag clear. If handler HC returns 
  11435.  CONTINUE_SEARCH, the system calls the next handler in the chain, handler HB, 
  11436.  again with the EH_NESTED_CALL flag clear. 
  11437.  
  11438.  Now suppose that exception handler HB causes an exception while it is 
  11439.  processing the original exception. The call frames for the procedures are 
  11440.  arranged in the following order on the stack: 
  11441.  
  11442.    1. Procedure main 
  11443.    2. Procedure PA 
  11444.    3. Procedure PB 
  11445.    4. Procedure PC 
  11446.    5. Procedure PD 
  11447.    6. OS/2's exception dispatcher 
  11448.    7. Procedure HB, which is the exception handler procedure 
  11449.    8. OS/2's exception dispatcher 
  11450.  
  11451.  The system will now start traversing the exception handler chain again. 
  11452.  Exception handler HB could have registered an exception handler, which would 
  11453.  be the first handler in the chain. If it had registered a handler, it would be 
  11454.  called with the EH_NESTED_CALL flag clear. 
  11455.  
  11456.  The range of the nested exception is exception handlers HC and HB. The end of 
  11457.  this range can be determined by the fact that exception handler HB is the 
  11458.  currently active handler. 
  11459.  
  11460.  These exception handlers have already been given a chance to handle the 
  11461.  original exception.  They are now about to be called again in a nested range. 
  11462.  Therefore, when handlers HC and HB are called again, they will be called with 
  11463.  the EH_NESTED_CALL flag set.  If they do not handle the exception, then 
  11464.  exception handler HA will be called with the EH_NESTED_CALL flag clear, 
  11465.  because it is outside the nested range. 
  11466.  
  11467.  
  11468. ΓòÉΓòÉΓòÉ 7.1.8. Process Exit Lists ΓòÉΓòÉΓòÉ
  11469.  
  11470. A process executes any routines registered in its exit list (with DosExitList) 
  11471. after the Process Termination exception has been delivered to each thread in 
  11472. the process and after each thread except Thread 1 has finally been terminated. 
  11473. If a thread handles the process termination exception, it must eventually 
  11474. voluntarily terminate, or the exit-list sequence will not finish running 
  11475. properly. Threads must not use DosCreateThread, DosExecPgm, DosStartSession, or 
  11476. DosExit when they are delivered a process termination exception. 
  11477.  
  11478.  
  11479. ΓòÉΓòÉΓòÉ 7.1.9. Error Pop-Up Screens ΓòÉΓòÉΓòÉ
  11480.  
  11481. Some error conditions, such as general protection violations, cause OS/2 to 
  11482. display a pop-up screen containing information about the error. An application 
  11483. can use DosError to disable error pop-up screens. Typically, a Presentation 
  11484. Manager application would disable error pop-up screens if it sets up its own 
  11485. routines to handle errors that would ordinarily generate pop-up screens. 
  11486.  
  11487. DosError is also used to control and disable hard errors, which usually have to 
  11488. do with reading from and writing to disks. 
  11489.  
  11490.  
  11491. ΓòÉΓòÉΓòÉ 7.2. Exception Handler Interface ΓòÉΓòÉΓòÉ
  11492.  
  11493. Exception handlers are passed four parameters. The interface for writing a 
  11494. 32-bit exception handler is: 
  11495.  
  11496.     ExceptionHandler (ExceptionReportRecord,
  11497.                       ExceptionRegistrationRecord,
  11498.                       ContextRecord,
  11499.                       DispatcherContext);
  11500.  
  11501. The exception handler returns XCPT_CONTINUE_EXECUTION to indicate that the 
  11502. exception has been handled and is to be dismissed, or XCPT_CONTINUE_SEARCH to 
  11503. indicate that the exception has not been handled and is to be passed to the 
  11504. next exception handler on the chain. 
  11505.  
  11506. Note that there are no invalid exception numbers; if a handler does not 
  11507. recognize an exception number, it simply returns XCPT_CONTINUE_SEARCH. 
  11508.  
  11509. In addition to handling exceptions, exception handlers are used in unwind 
  11510. operations. An unwind operation simply calls and removes exception handlers 
  11511. from the exception handler chain of the thread. Unwind exceptions are not 
  11512. actually being delivered to the handlers, so the individual return codes are 
  11513. irrelevant, and they do not affect the unwind operation. 
  11514.  
  11515. A single exception handler can be used to handle all the exceptions that you 
  11516. choose to handle. It is not necessary to have a separate exception handler for 
  11517. each exception. 
  11518.  
  11519. A handler is not required to return to the system; it can handle the exception, 
  11520. and then continue thread execution directly. For example, when an application 
  11521. executes a longjmp(), the C language compiler adds code that essentially 
  11522. performs an unwind operation to clean up the stack. Execution then resumes at 
  11523. the point where the target setjmp() occurred. 
  11524.  
  11525. For synchronous exceptions, an exception handler can alter the contents of the 
  11526. interrupted thread's context, except for the fields that cannot normally be 
  11527. altered during thread execution. For asynchronous exceptions (signal and 
  11528. termination) changes made to the context of the thread are ignored. 
  11529.  
  11530. Some exceptions are continuable; if the thread's exception handler handles the 
  11531. exception, execution can continue. If the exception condition is such that 
  11532. execution cannot be continued safely, the exception is said to be 
  11533. noncontinuable. If an exception is noncontinuable the EH_NONCONTINUABLE bit is 
  11534. set in the exception structure, and it is an error to indicate the exception 
  11535. has been handled. Returning XCPT_CONTINUE_EXECUTION causes an 
  11536. XCPT_NONCONTINUABLE_EXCEPTION exception to be raised. 
  11537.  
  11538. Generally, exception handlers can use any function while they are handling an 
  11539. exception. However, while handling a process-termination exception, an 
  11540. exception handler must not call DosCreateThread, DosExecPgm, or 
  11541. DosStartSession, because unpredictable results can occur. A handler also must 
  11542. not call DosExit while handling a process-termination exception, because this 
  11543. request will cause the exception to be dispatched as a nested exception to the 
  11544. current thread's entire chain of handlers. 
  11545.  
  11546.  
  11547. ΓòÉΓòÉΓòÉ 7.2.1. Exception Handler Parameters ΓòÉΓòÉΓòÉ
  11548.  
  11549.  EXCEPTIONREPORTRECORD (EXCEPTIONREPORTRECORD) - input/output 
  11550.     A pointer to the exception report record, which describes the exception and 
  11551.     its parameters. 
  11552.  
  11553.  EXCEPTIONREGISTRATIONRECORD ( EXCEPTIONREGISTRATIONRECORD) - input/output 
  11554.     This is a microprocessor-specific value.  For the 80386 microprocessor, 
  11555.     this is a pointer to the exception registration record data structure that 
  11556.     was used to register the current exception handler. 
  11557.  
  11558.  ContextRecord (CONTEXTRECORD) - input/output 
  11559.     A pointer to a context record, which describes the machine state at the 
  11560.     time the exception occurred. 
  11561.  
  11562.  DispatcherContext (DISPATCHERCONTEXT) - output 
  11563.     A pointer to a reserved field that receives state information on nested 
  11564.     exceptions and collided unwinds. This field returns information to either 
  11565.     the exception dispatcher (in the case of nested exceptions) or to the 
  11566.     unwind  routine (in the case of collided unwinds). User code must not 
  11567.     modify the DispatcherContext field at any time. 
  11568.  
  11569.     When the system's exception handler is called (it is already registered by 
  11570.     the exception dispatcher), the exception handler returns NESTED and fills 
  11571.     in the DispatcherContext field with the address of the 
  11572.     EXCEPTIONREGISTRATIONRECORD corresponding to the exception handler most 
  11573.     recently called by the exception dispatcher. This indicates how far the 
  11574.     exception dispatcher progressed through the call chain before the nesting 
  11575.     occurred. The EH_NESTED_CALL bit is set in the EXCEPTIONREPORTRECORD flags 
  11576.     field for each exception handler that is called between handler of the 
  11577.     exception dispatcher and the establisher of the most recently called 
  11578.     handler. 
  11579.  
  11580.     In the case of a collided unwind, the exception handler registered by the 
  11581.     unwind dispatcher will  return COLLIDED_UNWIND and the DispatcherContext 
  11582.     field will contain a pointer to the target frame of the current unwind. 
  11583.  
  11584.  
  11585. ΓòÉΓòÉΓòÉ 7.2.2. Exception Management Data Structures ΓòÉΓòÉΓòÉ
  11586.  
  11587. Applications use three data structures for exception management (the 
  11588. DispatcherContext parameter is for system use). 
  11589.  
  11590.      EXCEPTIONREPORTRECORD data structure 
  11591.      ExceptionRegistrationRecord data structure 
  11592.      ContextRecord data structure. 
  11593.  An overview of each of these data structures is presented below. 
  11594.  
  11595.  
  11596. ΓòÉΓòÉΓòÉ 7.2.2.1. ExceptionReportRecord Data Structure ΓòÉΓòÉΓòÉ
  11597.  
  11598. The EXCEPTIONREPORTRECORD data structure describes an exception and any 
  11599. additional parameters associated with the exception. The data structure 
  11600. contains fields for the following information: 
  11601.  
  11602.      Exception number 
  11603.      Exception flags, describing exception attributes 
  11604.      A pointer to a nested exception report record, if any 
  11605.      The address where the exception occurred 
  11606.      Information for any additional parameters. 
  11607.  
  11608.  For descriptions of the system exceptions see the Control Program Programming 
  11609.  Reference. 
  11610.  
  11611.  Following are the flags that are set to indicate exception attributes. Only 
  11612.  the EH_NONCONTINUABLE flag can be set (but not cleared) by the user. All other 
  11613.  flags are set by the system. 
  11614.  
  11615.  EH_NONCONTINUABLE (0x1) 
  11616.     The exception is not continuable, and any attempt to continue causes the 
  11617.     exception XCPT_NONCONTINUABLE_EXCEPTION to be raised. 
  11618.  
  11619.  EH_UNWINDING (0x2) 
  11620.     The EXCEPTIONREPORTRECORD data structure describes an exception for which 
  11621.     an unwind is in progress. 
  11622.  
  11623.  EH_EXIT_UNWIND (0x4) 
  11624.     An exit unwind operation implies that call frames are being unwound until 
  11625.     the base of the stack is reached. Note that EH_UNWINDING is also set. 
  11626.  
  11627.  EH_STACK_INVALID (0x8) 
  11628.     Following are causes for this flag to be set: 
  11629.  
  11630.         The user stack exceeds the limits specified by the Thread Information 
  11631.          Block. Applications can get the Thread Information Block by calling 
  11632.          DosGetInfoBlocks. 
  11633.  
  11634.         A call frame exceeds the stack limits specified by the Thread 
  11635.          Information Block. 
  11636.  
  11637.         A call frame is not aligned on the stack. 
  11638.  
  11639.     This flag is set only when the EXCEPTIONREPORTRECORD is passed to an 
  11640.     associated debugger. It is not possible to build exception information on 
  11641.     the user's stack when the stack is invalid. 
  11642.  
  11643.  EH_NESTED_CALL (0x10) 
  11644.     EXCEPTIONREPORTRECORD describes an exception raised while the current 
  11645.     exception handler was active. That is, a nested exception is in progress, 
  11646.     and the current handler was also called to handle the previous exception. 
  11647.  
  11648.  EXCEPTIONREPORTRECORD data structures can be chained together to provide 
  11649.  additional information when nested exceptions are raised. 
  11650.  
  11651.  
  11652. ΓòÉΓòÉΓòÉ 7.2.2.2. ExceptionRegisterRecord Data Structure ΓòÉΓòÉΓòÉ
  11653.  
  11654. The application is responsible for the creation and registration of the 
  11655. EXCEPTIONREGISTRATIONRECORD data structure. This is the data structure used by 
  11656. the application when it established the exception handler on the chain. 
  11657.  
  11658. The only restrictions are that each pointer in the linked list must either 
  11659. point directly to the next pointer in the list or contain END_OF_CHAIN (-1), 
  11660. and the field immediately following the pointer field must be the pointer to 
  11661. the exception handler code. No fields other than these two will be examined by 
  11662. OS/2. The application can keep any state information that it chooses in this 
  11663. data structure, as long as it does not alter either of the fields used by the 
  11664. system. 
  11665.  
  11666. When a procedure begins, it must create an EXCEPTIONREGISTRATIONRECORD on the 
  11667. stack, fill in the pointer to the exception handler routine, and link the data 
  11668. structure to the front of the exception handler chain by calling 
  11669. DosSetExceptionHandler. 
  11670.  
  11671. Similarly, when the procedure ends, it must remove EXCEPTIONREGISTRATIONRECORD 
  11672. from the chain by calling DosUnsetExceptionHandler. This maintains the 
  11673. necessary frame-exception handler correspondence. 
  11674.  
  11675. Note: 
  11676.  
  11677. For the benefit of assembly language programmers, the Thread Information Block 
  11678. (TIB) is located at FS:[0]. This speeds access to the TIB data structure. 
  11679.  
  11680. Because the FS is used to point to the TIB, applications that use the FS 
  11681. register must restore the original value when they are finished. Exception 
  11682. handling depends on the FS register pointing to the TIB. 
  11683.  
  11684. EXCEPTIONREGISTRATIONRECORD data structure must be created on the stack of the 
  11685. application. That is, it must be a data structure that is local to the routine 
  11686. that registers the exception handler. It cannot be stored in the application's 
  11687. data segment. The reason for this is that OS/2 must be able to determine the 
  11688. relative ordering of ExceptionRegistration records by examining their 
  11689. addresses. 
  11690.  
  11691.  
  11692. ΓòÉΓòÉΓòÉ 7.2.2.3. ContextRecord Data Structure ΓòÉΓòÉΓòÉ
  11693.  
  11694. The ContextRecord data structure describes the machine state at the time of an 
  11695. exception. This data structure is hardware dependent and is not portable. 
  11696. Therefore, as a rule, software should not use the information contained in this 
  11697. data structure. However, hardware dependent code, such as math libraries, can 
  11698. make use of this information to optimize certain operations. 
  11699.  
  11700. For a hardware-initiated exception, ContextRecord contains the complete machine 
  11701. state at the time of the exception. For a software-initiated exception, 
  11702. ContextRecord contains the machine state at the time the software raised the 
  11703. exception. 
  11704.  
  11705. The ContextRecord data structure consists of fields for the following: 
  11706.  
  11707.      General purpose registers 
  11708.      Segment registers 
  11709.      The flags register 
  11710.      The floating point environment and stack. 
  11711.  
  11712.  Note:  With asynchronous exceptions (signal and termination exceptions), the 
  11713.         context in ContextRecord is read-only. The exception handler can modify 
  11714.         it, but the changes with be ignored. 
  11715.  
  11716.  With synchronous exceptions, changes to ContextRecord will be used when the 
  11717.  context is restored. 
  11718.  
  11719.  
  11720. ΓòÉΓòÉΓòÉ 7.2.3. Exception Handler Return Values ΓòÉΓòÉΓòÉ
  11721.  
  11722. Exception handlers can return one of the following values: 
  11723.  
  11724.  XCPT_CONTINUE_SEARCH (0x00000000) 
  11725.            Indicates that the exception has not been handled. The system 
  11726.            responds by passing the exception to the previously installed 
  11727.            handler in the thread's chain of exception handlers. 
  11728.  
  11729.  XCPT_CONTINUE_EXECUTION (0xFFFFFFFF) 
  11730.            Indicates that the exception has been handled. OS/2 responds by 
  11731.            dismissing the exception, restoring the context of the thread, and 
  11732.            continuing the execution of the thread. 
  11733.  
  11734.  
  11735. ΓòÉΓòÉΓòÉ 7.3. Using Exception Management ΓòÉΓòÉΓòÉ
  11736.  
  11737. When an exception occurs, the system default action in most cases is to end the 
  11738. application that caused the exception. Instead of having the system default 
  11739. action occur, an application can register its own exception handling routines. 
  11740. Exception handlers can be written to take corrective action so that a thread 
  11741. can continue running rather than being terminated by the system. 
  11742.  
  11743. If an exception is handled by the application's exception handler, the 
  11744. exception handler must return XCPT_CONTINUE_EXECUTION. If the application's 
  11745. exception handler does not handle the exception, the exception handler must 
  11746. return XCPT_CONTINUE_SEARCH. If all the exception handlers in the exception 
  11747. handler chain return XCPT_CONTINUE_SEARCH, OS/2 takes the default action, which 
  11748. is usually to terminate the process that caused the exception. 
  11749.  
  11750. Note:  In the example code fragments that follow, error checking was left out 
  11751.        to conserve space. Applications should always check the return code that 
  11752.        the functions return. Control Program functions return an APIRET value. 
  11753.        A return code of 0 indicates success. If a non-zero value is returned, 
  11754.        an error occurred. 
  11755.  
  11756.  
  11757. ΓòÉΓòÉΓòÉ 7.3.1. Example Exception Handler ΓòÉΓòÉΓòÉ
  11758.  
  11759. This section of the chapter will present a simple exception handler. Because 
  11760. exception handlers are commonly used to handle memory faults, the example will 
  11761. show the exception handler working with a memory fault. 
  11762.  
  11763. Memory exceptions can occur when an application attempts to access a guard 
  11764. page, attempts to use memory that has been allocated but not committed (a 
  11765. sparse memory object), or when an application attempts to write to memory that 
  11766. has read-only access. Without an application-registered exception handler, some 
  11767. of these exceptions might cause the application to terminate. If the 
  11768. application registers its own exception handler, it can correct the cause of 
  11769. the memory fault and continue to run. 
  11770.  
  11771. If the application's exception handler handles the exception, it returns 
  11772. XCPT_CONTINUE_EXECUTION. If the routine does not handle the exception, it 
  11773. returns XCPT_CONTINUE_SEARCH so that the exception will be passed to the next 
  11774. handler in the chain. 
  11775.  
  11776. The following code fragment shows an exception handling routine set up to deal 
  11777. with memory errors: 
  11778.  
  11779. Uses
  11780.   Crt,Dos,Os2Def,Os2Base;
  11781. Const
  11782.   HF_STDERR = 2    (* Standard error handle *)
  11783.  
  11784. Function MyHandler(PEXCEPTIONREPORTRECORD pERepRec,
  11785.                    PEXCEPTIONREGISTRATIONRECORD pERegRec,
  11786.                    PCONTEXTRECORD pCtxRec,
  11787.                    PVOID p):ULONG; cdecl;
  11788. Var
  11789.   UlWritten  : ULONG;
  11790.   UlMemSize  : ULONG;
  11791.   FlMemAttrs : ULONG;
  11792.   Ulrc       : APIRET;
  11793.  
  11794. Begin
  11795.  
  11796.   (* Access violation at a known location *)
  11797.   If (pERepRec^.ExceptionNum = XCPT_ACCESS_VIOLATION) AND
  11798.      (pERepRec^.ExceptionAddress <> XCPT_DATA_UNKNOWN) Then Begin
  11799.  
  11800.     (* Page fault *)
  11801.     If (pERepRec^.ExceptionInfo[0] = XCPT_READ_ACCESS) OR
  11802.       ((pERepRec^.ExceptionInfo[0] = XCPT_WRITE_ACCESS) AND
  11803.       (pERepRec^.ExceptionInfo[1] <> XCPT_DATA_UNKNOWN)) Then Begin
  11804.  
  11805.       DosWrite(HF_STDERR,#13#10'Page Fault'#13#10,15,ulWritten);
  11806.  
  11807.       (* Now query the memory to find out why we faulted. *)
  11808.       ulMemSize := 1;
  11809.  
  11810.       DosQueryMem(pERepRec^.pExceptionInfo[1],ulMemSize,flMemAttrs);
  11811.  
  11812.       (* If the memory is free or committed,            *)
  11813.       (* we have some other problem.                    *)
  11814.       (* If it is not free or not committed, commit it. *)
  11815.       If (not(flMemAttrs)) AND ( (PAG_FREE) OR (PAG_COMMIT) ) Then Begin
  11816.         DosWrite(HF_STDERR,#13#10'Attempt to access uncommitted memory'#13#10,
  11817.                  40,ulWritten);
  11818.         ulrc := DosSetMem(pERepRec^.ExceptionInfo[1],4096,
  11819.                          PAG_DEFAULT OR PAG_COMMIT);
  11820.  
  11821.         If (ulrc) Then Begin
  11822.           DosWrite(HF_STDERR,#13#10'Error committing memory'#13#10,
  11823.                    27,ulWritten);
  11824.           MyHandler := XCPT_CONTINUE_SEARCH;
  11825.           Exit;
  11826.         End
  11827.         Else Begin
  11828.           MyHandler := XCPT_CONTINUE_EXECUTION;
  11829.           Exit;
  11830.         End;
  11831.       End;
  11832.     End;
  11833.   End;
  11834.   MyHandler := XCPT_CONTINUE_SEARCH;
  11835. End;
  11836.  
  11837.  
  11838. ΓòÉΓòÉΓòÉ 7.3.2. Registering an Exception Handler ΓòÉΓòÉΓòÉ
  11839.  
  11840. An application uses DosSetExceptionHandler to register its own exception 
  11841. handling routines. More than one routine can be registered; the last routine 
  11842. registered will be called first. 
  11843.  
  11844. One or more exception handlers can be registered for each thread in a process. 
  11845. Moreover, exception handlers can be specified not only for system exceptions, 
  11846. but also for user-defined exceptions that are anticipated for a particular 
  11847. thread. 
  11848.  
  11849. Only Process Termination exceptions are sent to all threads in a process. Other 
  11850. exceptions (synchronous exceptions) are sent only to the exception handler 
  11851. registered for the thread where the exception occurred. The application must 
  11852. register an exception handler for each thread that is handling exceptions. 
  11853.  
  11854. The following code fragment shows how an application registers an exception 
  11855. handling routine: 
  11856.  
  11857. Uses
  11858.   Crt,Dos,Os2Def,Os2Base;
  11859.  
  11860.   ULONG _System myHandler(PEXCEPTIONREPORTRECORD,
  11861.                           PEXCEPTIONREGISTRATIONRECORD,
  11862.                           PCONTEXTRECORD,
  11863.                           PVOID);
  11864. Begin
  11865. @error@        EXCEPTIONREGISTRATIONRECORD xcpthand = { 0, myHandler };
  11866.  
  11867.   DosError(FERR_DISABLEEXCEPTION OR FERR_DISABLEHARDERR);
  11868.   DosSetExceptionHandler(xcpthand);
  11869.  
  11870.   (*
  11871.   .
  11872.   . Other processing occurs here; myHandler will handle the exceptions.
  11873.   .
  11874.   *)
  11875.   DosUnsetExceptionHandler(xcpthand);
  11876. End.
  11877.  
  11878. If a procedure registers an exception handler, it must deregister the handler 
  11879. by calling DosUnsetExceptionHandler before returning. 
  11880.  
  11881. Note: 
  11882.  
  11883.       A procedure must not call DosSetExceptionHandler if it performs 
  11884.       language-specific exception or unwind handling. This restriction is not 
  11885.       enforced, but unpredictable results could occur if it is violated. 
  11886.  
  11887.       DosSetExceptionHandler and DosUnsetExceptionHandler provide the portable 
  11888.       means of implementing exception handlers. The non-portable approach is 
  11889.       taken by directly manipulating the exception handler chain. High level 
  11890.       languages generate code that abides by this restriction. Assembly 
  11891.       language programmers must assume responsibility for verifying that 
  11892.       handler registration and deregistration occur correctly. 
  11893.  
  11894.       EXCEPTIONREGISTRATIONRECORD must be created on the application's stack. 
  11895.       That is, it must be local to the routine that registers the exception 
  11896.       handler, rather than a global variable. It cannot be stored in the data 
  11897.       segment of the program. 
  11898.  
  11899.       Note that in the code fragment above, the declaration is placed inside 
  11900.       the braces (see figure below).  Therefore xcpthand is local to the main() 
  11901.       routine and is stored on the program's stack. 
  11902.  
  11903.             @error@
  11904.                 EXCEPTIONREGISTRATIONRECORD xcpthand = { 0, myHandler };
  11905.  
  11906.  
  11907. ΓòÉΓòÉΓòÉ 7.4. System Exceptions ΓòÉΓòÉΓòÉ
  11908.  
  11909. The operating system defines a class of error conditions called exceptions, and 
  11910. specifies the default actions that are taken when these exceptions occur. The 
  11911. system default action in most cases is to terminate the thread that caused the 
  11912. exception. 
  11913.  
  11914. Exception values have the following 32-bit format: 
  11915.  
  11916.  3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  11917.  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
  11918. ΓöîΓöÇΓöÇΓöÇ@>@ΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11919. ΓöéSevΓöéCΓöé       Facility          Γöé               Code            Γöé
  11920. ΓööΓöÇΓöÇΓöÇ@>@ΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ@>@ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11921.  
  11922.  Sev       Severity code. Possible values are described in the following list: 
  11923.  
  11924.            00             Success 
  11925.            01             Informational 
  11926.            10             Warning 
  11927.            11             Error 
  11928.  
  11929.  C         Customer code flag. 
  11930.  
  11931.  Facility  Facility code. 
  11932.  
  11933.  Code      Facility's status code. 
  11934.  
  11935.  Exceptions that are specific to OS/2 Version 2.X (for example, XCPT_SIGNAL) 
  11936.  have a facility code of 1. 
  11937.  
  11938.  System exceptions include both synchronous and asynchronous exceptions. 
  11939.  Synchronous exceptions are caused by events that are internal to a thread's 
  11940.  execution. For example, synchronous exceptions could be caused by invalid 
  11941.  parameters, or by a thread's request to end its own execution. 
  11942.  
  11943.  Asynchronous exceptions are caused by events that are external to a thread's 
  11944.  execution. For example, an asynchronous exception can be caused by a user's 
  11945.  entering a Ctrl+C or Ctrl+Break key sequence, or by a process' issuing 
  11946.  DosKillProcess to end the execution of another process. 
  11947.  
  11948.  The Ctrl+Break and Ctrl+C exceptions are also known as signals, or as signal 
  11949.  exceptions. 
  11950.  
  11951.  The following tables show the symbolic names of system exceptions, their 
  11952.  numerical values, and related information fields. 
  11953.  
  11954.  Portable, Non-Fatal, Software-Generated Exceptions 
  11955.  
  11956.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11957.   ΓöéException Name                       ΓöéValue     Γöé
  11958.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11959.   ΓöéXCPT_GUARD_PAGE_VIOLATION            Γöé0x80000001Γöé
  11960.   Γöé  ExceptionInfo[0] - R/W flag        Γöé          Γöé
  11961.   Γöé  ExceptionInfo[1] - FaultAddr       Γöé          Γöé
  11962.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11963.   ΓöéXCPT_UNABLE_TO_GROW_STACK            Γöé0x80010001Γöé
  11964.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11965.  
  11966.  Portable, Fatal, Hardware-Generated Exceptions 
  11967.  
  11968.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11969.   ΓöéException Name                       ΓöéValue     ΓöéRelated Trap Γöé
  11970.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11971.   ΓöéXCPT_ACCESS_VIOLATION                Γöé0xC0000005Γöé0x09, 0x0B,  Γöé
  11972.   Γöé  ExceptionInfo[0] - Flags           Γöé          Γöé0x0C, 0x0D,  Γöé
  11973.   Γöé    XCPT_UNKNOWN_ACCESS  0x0         Γöé          Γöé0x0E         Γöé
  11974.   Γöé    XCPT_READ_ACCESS     0x1         Γöé          Γöé             Γöé
  11975.   Γöé    XCPT_WRITE_ACCESS    0x2         Γöé          Γöé             Γöé
  11976.   Γöé    XCPT_EXECUTE_ACCESS  0x4         Γöé          Γöé             Γöé
  11977.   Γöé    XCPT_SPACE_ACCESS    0x8         Γöé          Γöé             Γöé
  11978.   Γöé    XCPT_LIMIT_ACCESS    0x10        Γöé          Γöé             Γöé
  11979.   Γöé  ExceptionInfo[1] - FaultAddr       Γöé          Γöé             Γöé
  11980.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11981.   ΓöéXCPT_INTEGER_DIVIDE_BY_ZERO          Γöé0xC000009BΓöé0            Γöé
  11982.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11983.   ΓöéXCPT_FLOAT_DIVIDE_BY_ZERO            Γöé0xC0000095Γöé0x10         Γöé
  11984.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11985.   ΓöéXCPT_FLOAT_INVALID_OPERATION         Γöé0xC0000097Γöé0x10         Γöé
  11986.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11987.   ΓöéXCPT_ILLEGAL_INSTRUCTION             Γöé0xC000001CΓöé0x06         Γöé
  11988.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11989.   ΓöéXCPT_PRIVILEGED_INSTRUCTION          Γöé0xC000009DΓöé0x0D         Γöé
  11990.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11991.   ΓöéXCPT_INTEGER_OVERFLOW                Γöé0xC000009CΓöé0x04         Γöé
  11992.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11993.   ΓöéXCPT_FLOAT_OVERFLOW                  Γöé0xC0000098Γöé0x10         Γöé
  11994.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11995.   ΓöéXCPT_FLOAT_UNDERFLOW                 Γöé0xC000009AΓöé0x10         Γöé
  11996.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11997.   ΓöéXCPT_FLOAT_DENORMAL_OPERAND          Γöé0xC0000094Γöé0x10         Γöé
  11998.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11999.   ΓöéXCPT_FLOAT_INEXACT_RESULT            Γöé0xC0000096Γöé0x10         Γöé
  12000.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12001.   ΓöéXCPT_FLOAT_STACK_CHECK               Γöé0xC0000099Γöé0x10         Γöé
  12002.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12003.   ΓöéXCPT_DATATYPE_MISALIGNMENT           Γöé0xC000009EΓöé0x11         Γöé
  12004.   Γöé  ExceptionInfo[0] - R/W flag        Γöé          Γöé             Γöé
  12005.   Γöé  ExceptionInfo[1] - Alignment       Γöé          Γöé             Γöé
  12006.   Γöé  ExceptionInfo[2] - FaultAddr       Γöé          Γöé             Γöé
  12007.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12008.   ΓöéXCPT_BREAKPOINT                      Γöé0xC000009FΓöé0x03         Γöé
  12009.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12010.   ΓöéXCPT_SINGLE_STEP                     Γöé0xC00000A0Γöé0x01         Γöé
  12011.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12012.  
  12013.  Portable, Fatal, Software-Generated Exceptions 
  12014.  
  12015.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12016.   ΓöéException Name                       ΓöéValue     ΓöéRelated Trap Γöé
  12017.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12018.   ΓöéXCPT_IN_PAGE_ERROR                   Γöé0xC0000006Γöé0x0E         Γöé
  12019.   Γöé  ExceptionInfo[0] - FaultAddr       Γöé          Γöé             Γöé
  12020.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12021.   ΓöéXCPT_PROCESS_TERMINATE               Γöé0xC0010001Γöé             Γöé
  12022.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12023.   ΓöéXCPT_ASYNC_PROCESS_TERMINATE         Γöé0xC0010002Γöé             Γöé
  12024.   Γöé  ExceptionInfo[0] - TID of          Γöé          Γöé             Γöé
  12025.   Γöé      terminating thread             Γöé          Γöé             Γöé
  12026.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12027.   ΓöéXCPT_NONCONTINUABLE_EXCEPTION        Γöé0xC0000024Γöé             Γöé
  12028.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12029.   ΓöéXCPT_INVALID_DISPOSITION             Γöé0xC0000025Γöé             Γöé
  12030.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12031.  
  12032.  Non-Portable, Fatal Exceptions 
  12033.  
  12034.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12035.   ΓöéException Name                       ΓöéValue     ΓöéRelated Trap Γöé
  12036.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12037.   ΓöéXCPT_INVALID_LOCK_SEQUENCE           Γöé0xC000001DΓöé             Γöé
  12038.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12039.   ΓöéXCPT_ARRAY_BOUNDS_EXCEEDED           Γöé0xC0000093Γöé0x05         Γöé
  12040.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12041.  
  12042.  Unwind Operation Exceptions 
  12043.  
  12044.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12045.   ΓöéException Name                       ΓöéValue     Γöé
  12046.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12047.   ΓöéXCPT_UNWIND                          Γöé0xC0000026Γöé
  12048.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12049.   ΓöéXCPT_BAD_STACK                       Γöé0xC0000027Γöé
  12050.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12051.   ΓöéXCPT_INVALID_UNWIND_TARGET           Γöé0xC0000028Γöé
  12052.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12053.  
  12054.  Fatal Signal Exceptions 
  12055.  
  12056.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12057.   ΓöéException Name                       ΓöéValue     Γöé
  12058.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12059.   ΓöéXCPT_SIGNAL                          Γöé0xC0010003Γöé
  12060.   Γöé  ExceptionInfo[ 0 ] - Signal        Γöé          Γöé
  12061.   Γöé      Number                         Γöé          Γöé
  12062.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12063.  
  12064.  
  12065. ΓòÉΓòÉΓòÉ 7.4.1. XCPT_ACCESS_VIOLATION ΓòÉΓòÉΓòÉ
  12066.  
  12067. Access Violation 
  12068.  
  12069. An access violation exception is generated when an attempt is made either to 
  12070. load or store data in an inaccessible location, or to execute an inaccessible 
  12071. instruction. This exception corresponds to both the Intel 80386 general 
  12072. protection fault (#13), caused by an invalid access attempt; and the page fault 
  12073. (#14), caused by an attempt to access an uncommitted page or a page with 
  12074. incorrect attributes for the desired operation. 
  12075.  
  12076.  Exception Code: 
  12077.     XCPT_ACCESS_VIOLATION (0xC0000005) 
  12078.  
  12079.  Handler Information: 
  12080.     The ExceptionAddress field in the ExceptionReportRecord points to the 
  12081.     instruction that caused the exception. This exception is continuable. 
  12082.  
  12083.  Default Action: 
  12084.     The process is ended. 
  12085.  
  12086.  Additional Parameters (2): 
  12087.  
  12088.     Exception Info[ 0 ]        Flags 
  12089.  
  12090.                                XCPT_UNKNOWN_ACCESS             (0x00) 
  12091.                                XCPT_READ_ACCESS                (0x01) 
  12092.                                XCPT_WRITE_ACCESS               (0x02) 
  12093.                                XCPT_EXECUTE_ACCESS             (0x04) 
  12094.                                XCPT_SPACE_ACCESS               (0x08) 
  12095.                                XCPT_LIMIT_ACCESS               (0x10) 
  12096.  
  12097.     Exception Info[ 1 ]        FaultAddr The virtual address (if available) of 
  12098.                                the data that is not accessible, or 
  12099.                                XCPT_DATA_UNKNOWN. 
  12100.  
  12101.  
  12102. ΓòÉΓòÉΓòÉ 7.4.2. XCPT_BREAKPOINT ΓòÉΓòÉΓòÉ
  12103.  
  12104. Breakpoint 
  12105.  
  12106. A breakpoint exception occurs when a breakpoint instruction is executed. This 
  12107. exception is intended for use by debuggers. This exception is continuable. 
  12108.  
  12109.  Exception Code: 
  12110.     XCPT_BREAKPOINT (0xC0000006) 
  12111.  
  12112.  Default Action: 
  12113.     The process is ended. 
  12114.  
  12115.  Additional Parameters: 
  12116.     None. 
  12117.  
  12118.  
  12119. ΓòÉΓòÉΓòÉ 7.4.3. XCPT_ARRAY_BOUNDS_EXCEEDED ΓòÉΓòÉΓòÉ
  12120.  
  12121. Bounds Check 
  12122.  
  12123. The bounds check exception corresponds to the Intel 80386 bounds check fault 
  12124. (#5), caused by a BOUND instruction that fails. 
  12125.  
  12126.  Exception Code: 
  12127.     XCPT_ARRAY_BOUNDS_EXCEEDED (0xC0000093) 
  12128.  
  12129.  Handler Information: 
  12130.     The CS:EIP in the exception context structure points to the instruction 
  12131.     that caused the exception. This exception is continuable. 
  12132.  
  12133.  Default Action: 
  12134.     The process is ended. 
  12135.  
  12136.  Additional Parameters: 
  12137.     None. 
  12138.  
  12139.  
  12140. ΓòÉΓòÉΓòÉ 7.4.4. XCPT_DATATYPE_MISALIGNMENT ΓòÉΓòÉΓòÉ
  12141.  
  12142. Data-Type Misalignment 
  12143.  
  12144. A data-type misalignment exception is generated when an attempt is made to load 
  12145. or store data in an address that is not naturally aligned on a hardware 
  12146. architecture that does not provide alignment hardware. For example, 16-bit 
  12147. entities must be aligned on two-byte boundaries, and 32-bit entities must be 
  12148. aligned on four-byte boundaries. This exception does not occur on the Intel 
  12149. 80386 processor. This exception is continuable. 
  12150.  
  12151.  Exception Code: 
  12152.     XCPT_DATATYPE_MISALIGNMENT (0xC000009E) 
  12153.  
  12154.  Default Action: 
  12155.     The process is ended. 
  12156.  
  12157.  Additional Parameters (3): 
  12158.  
  12159.     Exception Info[ 0 ]        Read/Write Flag 
  12160.  
  12161.                                                               XCPT_READ_ACCESS, or
  12162.                                                               XCPT_WRITE_ACCESS.
  12163.  
  12164.     Exception Info[ 1 ]        Data-type Mask 
  12165.  
  12166.                                A data-type mask that specifies how many 
  12167.                                low-address bits must be zero. For example, the 
  12168.                                data-type mask for a 16-bit entity is one, a 
  12169.                                32-bit entity three, and so on. 
  12170.  
  12171.     Exception Info[ 2 ]        Virtual Address 
  12172.  
  12173.                                The virtual address of the misaligned data. 
  12174.  
  12175.  
  12176. ΓòÉΓòÉΓòÉ 7.4.5. XCPT_FLOAT_DIVIDE_BY_ZERO ΓòÉΓòÉΓòÉ
  12177.  
  12178. Floating Divide-by-Zero 
  12179.  
  12180. A floating divide-by-zero exception is generated when an attempt is made to 
  12181. divide a floating-point dividend by a floating-point divisor of zero. This 
  12182. exception is continuable. 
  12183.  
  12184.  Exception Code: 
  12185.     XCPT_FLOAT_DIVIDE_BY_ZERO (0xC0000095) 
  12186.  
  12187.  Default Action: 
  12188.     The process is ended. 
  12189.  
  12190.  Additional Parameters: 
  12191.     None. 
  12192.  
  12193.  
  12194. ΓòÉΓòÉΓòÉ 7.4.6. XCPT_FLOAT_OVERFLOW ΓòÉΓòÉΓòÉ
  12195.  
  12196. Floating Overflow 
  12197.  
  12198. A floating overflow exception is generated when the resulting exponent of a 
  12199. floating-point operation is greater than the magnitude allowed for the 
  12200. respective floating point data type. This exception is continuable. 
  12201.  
  12202.  Exception Code: 
  12203.     XCPT_FLOAT_OVERFLOW (0xC0000098) 
  12204.  
  12205.  Default Action: 
  12206.     The process is ended. 
  12207.  
  12208.  Additional Parameters: 
  12209.     None. 
  12210.  
  12211.  
  12212. ΓòÉΓòÉΓòÉ 7.4.7. XCPT_FLOAT_UNDERFLOW ΓòÉΓòÉΓòÉ
  12213.  
  12214. Floating Underflow 
  12215.  
  12216. A floating underflow exception is generated when the resulting exponent of a 
  12217. floating-point operation is less than the magnitude provided for the respective 
  12218. floating-point data type. This exception is continuable. 
  12219.  
  12220.  Exception Code: 
  12221.     XCPT_FLOAT_UNDERFLOW (0xC000009A) 
  12222.  
  12223.  Default Action: 
  12224.     The process is ended. 
  12225.  
  12226.  Additional Parameters: 
  12227.     None. 
  12228.  
  12229.  
  12230. ΓòÉΓòÉΓòÉ 7.4.8. XCPT_FLOAT_INVALID_OPERATION ΓòÉΓòÉΓòÉ
  12231.  
  12232. Invalid Floating-Point Operation 
  12233.  
  12234. This exception usually indicates a programming error corresponding to the 
  12235. invalid floating-point operations defined in IEEE Standard 754. The Intel 80386 
  12236. processor raises trap #16. This exception is continuable. 
  12237.  
  12238.  Default Action: 
  12239.     The process is ended. 
  12240.  
  12241.  Exception Code: 
  12242.     XCPT_FLOAT_INVALID_OPERATION (0xC0000097) 
  12243.  
  12244.  Additional Parameters: 
  12245.     None. 
  12246.  
  12247.  
  12248. ΓòÉΓòÉΓòÉ 7.4.9. XCPT_FLOAT_DENORMAL_OPERAND ΓòÉΓòÉΓòÉ
  12249.  
  12250. Denormalized Operand 
  12251.  
  12252. A denormalized operand exception occurs when the 80387 NPX processor attempts 
  12253. an arithmetic operation on a denormal operand, and the user has not masked off 
  12254. denormal operations. This exception is continuable. 
  12255.  
  12256.  Exception Code: 
  12257.     XCPT_FLOAT_DENORMAL_OPERAND (0xC0000094) 
  12258.  
  12259.  Default Action: 
  12260.     The process is ended. 
  12261.  
  12262.  Additional Parameters: 
  12263.     None. 
  12264.  
  12265.  
  12266. ΓòÉΓòÉΓòÉ 7.4.10. XCPT_FLOAT_INEXACT_RESULT ΓòÉΓòÉΓòÉ
  12267.  
  12268. Loss of Precision 
  12269.  
  12270. A loss of precision exception occurs when the result of an operation is not 
  12271. exactly representable in the destination format. For example, the fraction 1/3 
  12272. cannot be exactly represented in binary form. For the Intel 80386 and 80387 
  12273. processors, this corresponds to one of the class of exceptions for which the 
  12274. 80387 processor signals the 80386 processor to raise trap #16. This exception 
  12275. is continuable. 
  12276.  
  12277.  Default Action: 
  12278.     The process is ended. 
  12279.  
  12280.  Exception Code: 
  12281.     XCPT_FLOAT_INEXACT_RESULT (0xC0000096) 
  12282.  
  12283.  Additional Parameters: 
  12284.     None. 
  12285.  
  12286.  
  12287. ΓòÉΓòÉΓòÉ 7.4.11. XCPT_FLOAT_STACK_CHECK ΓòÉΓòÉΓòÉ
  12288.  
  12289. Invalid Floating-Point Stack Operation 
  12290.  
  12291. An invalid floating-point stack check is raised when a floating-point processor 
  12292. attempts an illegal operation on a private stack. The Intel 80387 processor 
  12293. maintains eight internal 10-byte "registers" that are individually addressable 
  12294. and yet behave as a push-down stack under the influence of the FLD (push real) 
  12295. and FST (pop real to destination) instructions. Overflow and underflow are 
  12296. checked with each instruction, and this exception is raised when appropriate. 
  12297. This is one of the class of exceptions for which the Intel 80387 processor 
  12298. signals the Intel 80386 processor to raise trap #16. This exception is 
  12299. continuable. 
  12300.  
  12301.  Exception Code: 
  12302.     XCPT_FLOAT_STACK_CHECK (0xC0000099) 
  12303.  
  12304.  Default Action: 
  12305.     The process is ended. 
  12306.  
  12307.  Additional Parameters: 
  12308.     None. 
  12309.  
  12310.  
  12311. ΓòÉΓòÉΓòÉ 7.4.12. XCPT_ILLEGAL_INSTRUCTION ΓòÉΓòÉΓòÉ
  12312.  
  12313. Illegal Instruction 
  12314.  
  12315. An illegal instruction exception is generated when an attempt is made to 
  12316. execute an instruction whose operation is not defined for the host machine 
  12317. architecture. On the Intel 80386 processor, this corresponds to the invalid 
  12318. opcode fault (#6), caused by any invalid instruction. This exception is 
  12319. continuable. 
  12320.  
  12321.  Exception Code: 
  12322.     XCPT_ILLEGAL_INSTRUCTION (0xC000001C) 
  12323.  
  12324.  Default action: 
  12325.     The process is ended. 
  12326.  
  12327.  Additional Parameters: 
  12328.     None. 
  12329.  
  12330.  
  12331. ΓòÉΓòÉΓòÉ 7.4.13. XCPT_PRIVILEGED_INSTRUCTION ΓòÉΓòÉΓòÉ
  12332.  
  12333. Privileged Instruction 
  12334.  
  12335. A privileged instruction exception is generated when an attempt is made to 
  12336. execute an instruction whose operation is not allowed in the current machine 
  12337. mode. For example, an attempt is made to execute an instruction in user mode 
  12338. that is only allowed in kernel mode. This exception is continuable. 
  12339.  
  12340.  Exception Code: 
  12341.     XCPT_PRIVILEGED_INSTRUCTION (0xC000009D) 
  12342.  
  12343.  Default Action: 
  12344.     The process is ended. 
  12345.  
  12346.  Additional Parameters: 
  12347.     None. 
  12348.  
  12349.  
  12350. ΓòÉΓòÉΓòÉ 7.4.14. XCPT_INVALID_LOCK_SEQUENCE ΓòÉΓòÉΓòÉ
  12351.  
  12352. Invalid Lock Sequence 
  12353.  
  12354. An invalid lock sequence exception is generated when an attempt is made to 
  12355. execute an operation within an interlocked section of code, and the sequence is 
  12356. invalid for the host machine architecture. This exception is continuable. 
  12357.  
  12358.  Exception Code: 
  12359.     XCPT_INVALID_LOCK_SEQUENCE (0xC000001D) 
  12360.  
  12361.  Default Action: 
  12362.     The process is ended. 
  12363.  
  12364.  Additional Parameters: 
  12365.     None. 
  12366.  
  12367.  
  12368. ΓòÉΓòÉΓòÉ 7.4.15. XCPT_INTEGER_DIVIDE_BY_ZERO ΓòÉΓòÉΓòÉ
  12369.  
  12370. Integer Divide-by-Zero 
  12371.  
  12372. An integer divide-by-zero exception is generated when an attempt is made to 
  12373. divide an integer dividend by an integer divisor of zero. On the Intel 80387 
  12374. processor, this is a divide by zero fault (#0), caused by a DIV or IDIV by zero 
  12375. operation. This exception is continuable. 
  12376.  
  12377.  Exception Code: 
  12378.     XCPT_INTEGER_DIVIDE_BY_ZERO (0xC000009B) 
  12379.  
  12380.  Default action: 
  12381.     The process is ended. 
  12382.  
  12383.  Additional Parameters: 
  12384.     None. 
  12385.  
  12386.  
  12387. ΓòÉΓòÉΓòÉ 7.4.16. XCPT_INTEGER_OVERFLOW ΓòÉΓòÉΓòÉ
  12388.  
  12389. Integer Overflow 
  12390.  
  12391. An integer overflow exception is generated when the result of an integer 
  12392. operation causes a carry-out of the most significant bit of the result, which 
  12393. is not the same as the carry-into of the most significant bit of the result. 
  12394. For example, the addition of two positive integers produces a negative result. 
  12395. On the Intel 80387 processor, this corresponds to overflow trap (#4), caused by 
  12396. executing an INTO instruction with the OF flag set. This exception is 
  12397. continuable. 
  12398.  
  12399.  Exception Code: 
  12400.     XCPT_INTEGER_OVERFLOW (0xC000009C) 
  12401.  
  12402.  Default action: 
  12403.     The process is ended. 
  12404.  
  12405.  Additional Parameters: 
  12406.     None. 
  12407.  
  12408.  
  12409. ΓòÉΓòÉΓòÉ 7.4.17. XCPT_SINGLE_STEP ΓòÉΓòÉΓòÉ
  12410.  
  12411. Single Step 
  12412.  
  12413. A single-step exception is generated when a trace trap or other single 
  12414. instruction execution mechanism signals that one instruction has been executed. 
  12415. This exception is intended for use by debuggers. This exception is continuable. 
  12416.  
  12417.  Default Action: 
  12418.     The process is ended 
  12419.  
  12420.  Exception Code: 
  12421.     XCPT_SINGLE_STEP (0xC00000A0) 
  12422.  
  12423.  Additional Parameters: 
  12424.     None. 
  12425.  
  12426.  
  12427. ΓòÉΓòÉΓòÉ 7.4.18. XCPT_GUARD_PAGE_VIOLATION ΓòÉΓòÉΓòÉ
  12428.  
  12429. Guard Page Violation 
  12430.  
  12431. A guard page violation exception is generated when an attempt is made to load 
  12432. or store data in a location that is contained within a guard page. Memory 
  12433. management software immediately turns the guard page into a demand zero page 
  12434. and initiates a guard page violation exception. 
  12435.  
  12436.  Exception Code: 
  12437.     XCPT_GUARD_PAGE_VIOLATION (0x800001) 
  12438.  
  12439.  Default Action: 
  12440.     Execution continues. If possible, the memory page immediately below the 
  12441.     guard page is allocated and marked as a guard page. The higher guard page 
  12442.     is marked to no longer be a guard page, and the instruction is restarted. 
  12443.     This allows for dynamic stack growth. If it is not possible to  allocate 
  12444.     another page below the faulting page, an XCPT_UNABLE_TO_GROW_STACK 
  12445.     exception is raised. This exception is continuable. 
  12446.  
  12447.  Additional Parameters (2): 
  12448.  
  12449.     ExceptionInfo[ 0 ]         Read/Write Flag 
  12450.  
  12451.                                                               XCPT_READ_ACCESS, or
  12452.                                                               XCPT_WRITE_ACCESS.
  12453.  
  12454.     ExceptionInfo[ 1 ]         Virtual Address 
  12455.  
  12456.                                The virtual address of the data within a guard 
  12457.                                page. 
  12458.  
  12459.  
  12460. ΓòÉΓòÉΓòÉ 7.4.19. XCPT_UNABLE_TO_GROW_STACK ΓòÉΓòÉΓòÉ
  12461.  
  12462. Unable to Grow Stack 
  12463.  
  12464. The default action for a guard page violation is to attempt to allocate another 
  12465. page of memory immediately below the page on which the fault occurred, thereby 
  12466. implementing dynamic stack growth. If this attempt fails, 
  12467. XCPT_UNABLE_TO_GROW_STACK is generated, indicating that the thread has, at 
  12468. most, one more page of stack space available. This exception is continuable. 
  12469.  
  12470.  Exception Code: 
  12471.     XCPT_UNABLE_TO_GROW_STACK (0x80010001) 
  12472.  
  12473.  Default Action: 
  12474.     Execution continues. 
  12475.  
  12476.  Additional Parameters: 
  12477.     None. 
  12478.  
  12479.  
  12480. ΓòÉΓòÉΓòÉ 7.4.20. XCPT_BAD_STACK ΓòÉΓòÉΓòÉ
  12481.  
  12482. Bad Stack 
  12483.  
  12484. This exception is raised when an ExceptionRegistrationRecord is reached that is 
  12485. not properly aligned or is not within the current stack boundaries. It is also 
  12486. raised if an unwind target is specified that does not point to an 
  12487. ExceptionRegistrationRecord. This exception is noncontinuable. 
  12488.  
  12489.  Exception Code: 
  12490.     XCPT_BAD_STACK (0xC0000027) 
  12491.  
  12492.  Default Action: 
  12493.     The process is ended. 
  12494.  
  12495.  Additional Parameters: 
  12496.     None. 
  12497.  
  12498.  
  12499. ΓòÉΓòÉΓòÉ 7.4.21. XCPT_INVALID_UNWIND_TARGET ΓòÉΓòÉΓòÉ
  12500.  
  12501. Invalid Unwind Target 
  12502.  
  12503. This exception is raised when the address of the target 
  12504. ExceptionRegistrationRecord is below the current stack pointer. This exception 
  12505. is noncontinuable. 
  12506.  
  12507.  Exception Code: 
  12508.     XCPT_INVALID_UNWIND_TARGET 
  12509.  
  12510.  Default Action: 
  12511.     The process is ended. 
  12512.  
  12513.  Additional Parameters: 
  12514.     None. 
  12515.  
  12516.  
  12517. ΓòÉΓòÉΓòÉ 7.4.22. XCPT_IN_PAGE_ERROR ΓòÉΓòÉΓòÉ
  12518.  
  12519. Page Read Error 
  12520.  
  12521. A page read error exception is generated when an attempt is made to read a page 
  12522. into memory and an I/O error is encountered. This exception is continuable. 
  12523.  
  12524.  Exception Code: 
  12525.     XCPT_IN_PAGE_ERROR (0xC0000006) 
  12526.  
  12527.  Default Action: 
  12528.     The process is ended. 
  12529.  
  12530.  Additional Parameters (1): 
  12531.  
  12532.     ExceptionInfo[ 0 ]         Virtual Address 
  12533.  
  12534.                                A virtual address within the page that was being 
  12535.                                read. 
  12536.  
  12537.  
  12538. ΓòÉΓòÉΓòÉ 7.4.23. XCPT_INVALID_DISPOSITION ΓòÉΓòÉΓòÉ
  12539.  
  12540. Invalid Disposition 
  12541.  
  12542. This exception is raised when an exception handler returns anything except 
  12543. XCPT_CONTINUE_EXECUTION or XCPT_CONTINUE_SEARCH. This exception is not 
  12544. continuable. 
  12545.  
  12546.  Execution Code: 
  12547.     XCPT_INVALID_DISPOSITION (0xC0000025) 
  12548.  
  12549.  Default Action: 
  12550.     The process is ended. 
  12551.  
  12552.  Additional Parameters: 
  12553.     None. 
  12554.  
  12555.  
  12556. ΓòÉΓòÉΓòÉ 7.4.24. XCPT_NONCONTINUABLE_EXCEPTION ΓòÉΓòÉΓòÉ
  12557.  
  12558. Continuing a Noncontinuable Exception 
  12559.  
  12560. This exception is raised when an exception handler returns 
  12561. XCPT_CONTINUE_EXECUTION in response to a noncontinuable exception. This 
  12562. exception is not continuable. 
  12563.  
  12564.  Execution Code: 
  12565.     XCPT_NONCONTINUABLE_EXCEPTION (0xC0000024) 
  12566.  
  12567.  Default Action: 
  12568.     The process is ended. 
  12569.  
  12570.  Additional Parameters: 
  12571.     None. 
  12572.  
  12573.  
  12574. ΓòÉΓòÉΓòÉ 7.4.25. XCPT_PROCESS_TERMINATE ΓòÉΓòÉΓòÉ
  12575.  
  12576. Process Termination 
  12577.  
  12578. There are two exceptions a thread may receive when it is about to end: 
  12579.  
  12580.       XCPT_PROCESS_TERMINATE, and 
  12581.       XCPT_ASYNC_PROCESS_TERMINATE. 
  12582.  
  12583.  A thread receives XCPT_PROCESS_TERMINATE after it calls DosExit to end itself 
  12584.  or the entire process. This exception is not continuable. 
  12585.  
  12586.  Additional Parameters: 
  12587.     None. 
  12588.  
  12589.  
  12590. ΓòÉΓòÉΓòÉ 7.4.26. XCPT_ASYNC_PROCESS_TERMINATE ΓòÉΓòÉΓòÉ
  12591.  
  12592. Asynchronous Process Termination 
  12593.  
  12594. There are two exceptions a thread may receive when it is about to end: 
  12595.  
  12596.       XCPT_PROCESS_TERMINATE, and 
  12597.       XCPT_ASYNC_PROCESS_TERMINATE. 
  12598.  
  12599.  A thread receives XCPT_ASYNC_PROCESS_TERMINATE when another thread in the 
  12600.  process has caused it to end. For example, another thread has called DosExit 
  12601.  to end the process, or has not handled a fatal exception, and so on. This 
  12602.  exception is continuable. 
  12603.  
  12604.  Additional Parameters (1): 
  12605.  
  12606.     ExceptionInfo[ 0 ]         TID 
  12607.  
  12608.                                The thread identification of the terminating 
  12609.                                thread. 
  12610.  
  12611.  
  12612. ΓòÉΓòÉΓòÉ 7.4.27. XCPT_UNWIND ΓòÉΓòÉΓòÉ
  12613.  
  12614. Unwinding 
  12615.  
  12616. The system fills in an exception number for an unwind if the user chooses not 
  12617. to do so. Note that an ExceptionReportRecord containing XCPT_UNWIND does not 
  12618. indicate that an exception has occurred,  but rather that an unwind is in 
  12619. progress. 
  12620.  
  12621.  Exception Code: 
  12622.     XCPT_UNWIND (0xC0000026) 
  12623.  
  12624.  Default Action: 
  12625.     Does not apply. 
  12626.  
  12627.  Additional Parameters: 
  12628.     None. 
  12629.  
  12630.  
  12631. ΓòÉΓòÉΓòÉ 7.4.28. XCPT_SIGNAL ΓòÉΓòÉΓòÉ
  12632.  
  12633. Signal Exceptions 
  12634.  
  12635. An OS/2 Version 2.X application may receive three signals: 
  12636.  
  12637.       XCPT_SIGNAL_INTR (Ctrl+C) 
  12638.       XCPT_SIGNAL_KILLPROC (DosKillProcess) 
  12639.       XCPT_SIGNAL_BREAK (Ctrl+Break). 
  12640.  
  12641.  The signal being sent may be determined by examining the exception information 
  12642.  in the ExceptionReportRecord. 
  12643.  
  12644.  Exception Code: 
  12645.     XCPT_SIGNAL (0xC0010003) 
  12646.  
  12647.  Default Action: 
  12648.     The process is ended. 
  12649.  
  12650.  Additional Parameters (1): 
  12651.  
  12652.     ExceptionInfo[ 0 ]         Signal Number 
  12653.  
  12654.                                Number         Signal 
  12655.                                1              XCPT_SIGNAL_INTR 
  12656.                                3              XCPT_SIGNAL_KILLPROC 
  12657.                                4              XCPT_SIGNAL_BREAK 
  12658.  
  12659.  XCPT_SIGNAL is called a "signal exception" and is sent only to thread 1 in the 
  12660.  process receiving the exception. This is consistent with 16-bit signals, and 
  12661.  provides greater consistency in the environment of the process for handling 
  12662.  the various asynchronous exceptions. For example, since a repeated typematic 
  12663.  Ctrl+C could possibly cause the thread to recursively process the exception 
  12664.  and consume stack space without ever being able to handle the first "signal", 
  12665.  the exception dispatcher "holds" each exception of the same type until a 
  12666.  handler either returns XCPT_CONTINUE_EXECUTION to the exception dispatcher, or 
  12667.  the process calls DosAcknowledgeSignalException for that signal. Only one 
  12668.  signal or exception is actually held (they are not queued by the system). 
  12669.  
  12670.  DosAcknowledgeSignalException indicates to the system that the process wants 
  12671.  to receive the XCPT_SIGNAL_INTR and XCPT_SIGNAL_BREAK signals. Previously, 
  12672.  when a process called DosAcknowledgeSignalException the system noted that the 
  12673.  process was aware of the particular signal for which it was registering the 
  12674.  handler. When a process called DosAcknowledgeSignalException, it became a 
  12675.  candidate for the "signal focus" for its session. At any point in time, the 
  12676.  focus for a session is the last process to register a signal handler for that 
  12677.  signal. When the user presses Ctrl+C on the keyboard, the system delivers an 
  12678.  XCPT_SIGNAL_INTR signal to the current keyboard focus. The user could also 
  12679.  press Ctrl+Break to deliver an XCPT_SIGNAL_BREAK signal, but this would only 
  12680.  work if input were in raw mode. 
  12681.  
  12682.  Note that all exception handlers (on thread 1) must be prepared to "see" 
  12683.  signal exceptions. It is always possible that a previous handler has issued 
  12684.  DosSetSignalExceptionFocus, or that a Dos16SetSigHandler has been issued by 
  12685.  some 16-bit code in the path. They can always be ignored by returning 
  12686.  XCPT_CONTINUE_SEARCH to the exception dispatcher. Note that signals result in 
  12687.  a call to the 16-bit signal handler (if installed) if all the 32-bit exception 
  12688.  handlers return XCPT_CONTINUE_SEARCH. 
  12689.  
  12690.  DosSetSession performs the function of assigning the signal focus exactly as 
  12691.  if the application had called DosAcknowledgeSignalException twice, once for 
  12692.  each signal. The process calls DosSetSession when it wants to indicate that it 
  12693.  expects to receive XCPT_SIGNAL_INTR or XCPT_SIGNAL_BREAK after it has 
  12694.  registered an exception handler to process the signal when it comes. Each call 
  12695.  to DosSetSession increments a counter in the PTDA of the process. When the 
  12696.  system attempts to send XCPT_SIGNAL_INTR or XCPT_SIGNAL_BREAK to a process, it 
  12697.  first checks to see if either this counter is greater than zero, or if the 
  12698.  process has registered a 16-bit signal handler for that signal. If either of 
  12699.  these is true, the signal will be sent. If the process has registered both 
  12700.  16-bit and 32-bit handlers, the 32-bit handlers are called first. If they do 
  12701.  not handle the signal, the 16-bit handlers are called. If the 32-bit handlers 
  12702.  are called and do not handle the signal, and there are no 16-bit handlers, the 
  12703.  process is terminated. 
  12704.  
  12705.  
  12706. ΓòÉΓòÉΓòÉ 8. Extended Attributes ΓòÉΓòÉΓòÉ
  12707.  
  12708. OS/2 file systems maintain a standard set of information on file objects. This 
  12709. standard set of information is referred to as Level 1 file information. Level 1 
  12710. file information includes the name and size of the file object, and the date 
  12711. and time the file object was created, last accessed, and last written to. 
  12712.  
  12713. Applications can attach additional information to a file object in the form of 
  12714. an extended attribute (EA). There can be many EAs associated with a file object 
  12715. and, because of their flexibility, almost any information about the file can be 
  12716. stored in one. 
  12717.  
  12718. The following topics are related to the information in this chapter: 
  12719.  
  12720.      File Systems 
  12721.      File Names 
  12722.      File Management 
  12723.  
  12724.  
  12725. ΓòÉΓòÉΓòÉ 8.1. About Extended Attributes ΓòÉΓòÉΓòÉ
  12726.  
  12727. Level 1 file information is the basic information describing files that is 
  12728. stored by the file system. Level 1 file information includes the size of the 
  12729. file, and the date and time it was created, last written, and last accessed. A 
  12730. subset of this information is typically displayed by entering the DIR command 
  12731. on the OS/2 command line. Applications can obtain Level 1 file information by 
  12732. calling DosQueryPathInfo and DosQueryFileInfo. Applications can set Level 1 
  12733. File Information by calling DosSetPathInfo and DosSetFileInfo. 
  12734.  
  12735. Applications can attach additional information to a file object in the form of 
  12736. an extended attribute (EA). Extended attributes can be used to describe the 
  12737. file object to another application, to OS/2, and to the file system that is 
  12738. managing that object. 
  12739.  
  12740. This information can be used to: 
  12741.  
  12742.      Store notes on file objects (for example, the name of the file creator) 
  12743.      Categorize file objects (for example, source, samples, icons, bit maps) 
  12744.      Describe the format of data contained in the file object (for example, a 
  12745.       data record) 
  12746.      Append additional data to the file object. 
  12747.  
  12748.  An application uses extended attributes to provide a description of a file or 
  12749.  directory but the application does not place the description in the file or 
  12750.  directory itself. Extended attributes associated with a file object are not 
  12751.  part of the file object or its data. They are stored separately from the file 
  12752.  they are linked to and the file system manages the storage and maintenance of 
  12753.  the EA. 
  12754.  
  12755.  Each extended attribute has two parts, a name and a value. The name is a 
  12756.  nil-terminated string; any convenient name can be chosen. EA names are 
  12757.  restricted to the same character set as file names. 
  12758.  
  12759.  The value of the EA can be text, a bit map, binary data, anything at all. OS/2 
  12760.  does not check data that is associated with an EA. The application that 
  12761.  creates the extended attributes and the applications that read them must 
  12762.  recognize the format and meaning of the data associated with a given EA name. 
  12763.  
  12764.  Applications can examine, add, and replace extended attributes at any time. 
  12765.  Any application can read the extended attributes by using the DosQueryFileInfo 
  12766.  or DosQueryPathInfo function. Applications can use DosFindFirst and 
  12767.  DosFindNext to search for files that have specific extended attributes. 
  12768.  
  12769.  A file can have any number of extended attributes. Each extended attribute can 
  12770.  be up to 64KB  in size. The sum of all extended attributes for a file must not 
  12771.  exceed 64KB. 
  12772.  
  12773.  So that extended attribute data can be understood by other applications, 
  12774.  conventions have been established for naming EAs and indicating the type of 
  12775.  data they contain. 
  12776.  
  12777.  In addition, a set of Standard Extended Attributes (SEAs) have been defined. 
  12778.  SEAs define a common set of information that can be associated with most files 
  12779.  (for example, file type and file purpose). Through SEAs, many applications can 
  12780.  access the same, useful information associated with files. 
  12781.  
  12782.  Applications are not limited to using SEAs to associate information with 
  12783.  files. They can define their own application-specific extended attributes. 
  12784.  
  12785.  Extended attributes associated with a file object are not part of the file 
  12786.  object or its data. 
  12787.  
  12788.  Extended attributes are supported by the OS/2 High Performance File System 
  12789.  (HPFS) and by the OS/2 FAT file system. 
  12790.  
  12791.  Applications define and associate extended attributes with a file object 
  12792.  through file system functions. The file system functions that use and 
  12793.  manipulate EAs are: 
  12794.  
  12795.      DosOpen 
  12796.      DosFindFirst 
  12797.      DosQueryFileInfo 
  12798.      DosQueryPathInfo 
  12799.      DosSetFileInfo 
  12800.      DosSetPathInfo 
  12801.  
  12802.  
  12803. ΓòÉΓòÉΓòÉ 8.1.1. Extended Attribute Data Type Conventions ΓòÉΓòÉΓòÉ
  12804.  
  12805. Extended attributes (EAs) can contain any type of data. So that applications 
  12806. can understand the type of information stored in an EA, the first WORD of EA 
  12807. data must specify one of the following data types: 
  12808.  
  12809. Extended Attribute Data Types 
  12810.  
  12811. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12812. ΓöéData Type      ΓöéValue ΓöéDescription                             Γöé
  12813. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12814. ΓöéEAT_BINARY     ΓöéFFFE  ΓöéBinary (non-text) data; the first WORD  Γöé
  12815. Γöé               Γöé      Γöéfollowing the data type specifies the   Γöé
  12816. Γöé               Γöé      Γöélength of the data.                     Γöé
  12817. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12818. ΓöéEAT_ASCII      ΓöéFFFD  ΓöéASCII text; the first WORD following theΓöé
  12819. Γöé               Γöé      Γöédata type specifies the length of the   Γöé
  12820. Γöé               Γöé      Γöédata.                                   Γöé
  12821. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12822. ΓöéEAT_BITMAP     ΓöéFFFB  ΓöéBit map data; the first WORD following  Γöé
  12823. Γöé               Γöé      Γöéthe data type specifies the length of   Γöé
  12824. Γöé               Γöé      Γöéthe data.                               Γöé
  12825. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12826. ΓöéEAT_METAFILE   ΓöéFFFA  ΓöéMetafile data; the first WORD following Γöé
  12827. Γöé               Γöé      Γöéthe data type specifies the length of   Γöé
  12828. Γöé               Γöé      Γöéthe data.                               Γöé
  12829. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12830. ΓöéEAT_ICON       ΓöéFFF9  ΓöéIcon data; the first WORD following the Γöé
  12831. Γöé               Γöé      Γöédata type specifies the length of the   Γöé
  12832. Γöé               Γöé      Γöédata.                                   Γöé
  12833. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12834. ΓöéEAT_EA         ΓöéFFEE  ΓöéASCII name of another EA that is        Γöé
  12835. Γöé               Γöé      Γöéassociated with the file. The contents  Γöé
  12836. Γöé               Γöé      Γöéof that EA are to be included into the  Γöé
  12837. Γöé               Γöé      Γöécurrent EA. The first WORD following theΓöé
  12838. Γöé               Γöé      Γöédata type specifies the length of the   Γöé
  12839. Γöé               Γöé      Γöédata.                                   Γöé
  12840. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12841. ΓöéEAT_MVMT       ΓöéFFDF  ΓöéMulti-Valued, Multi-Typed data-two or   Γöé
  12842. Γöé               Γöé      Γöémore consecutive extended attribute     Γöé
  12843. Γöé               Γöé      Γöévalues. Each value has an explicitly    Γöé
  12844. Γöé               Γöé      Γöéspecified type.                         Γöé
  12845. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12846. ΓöéEAT_MVST       ΓöéFFDE  ΓöéMulti-Valued, Single-Typed data-two or  Γöé
  12847. Γöé               Γöé      Γöémore consecutive extended attribute     Γöé
  12848. Γöé               Γöé      Γöévalues. All values have the same type.  Γöé
  12849. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12850. ΓöéEAT_ASN1       ΓöéFFDD  ΓöéASN.1 field data; an ISO standard for   Γöé
  12851. Γöé               Γöé      Γöédescribing multivalue data streams.     Γöé
  12852. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12853. Values of hex 8000 and up are reserved. Values between hex 0000 and hex 7FFF 
  12854. can be defined by the user. 
  12855.  
  12856. Symbolic constants are defined in BSEDOS.H and BSEDOS.INC. 
  12857.  
  12858. In all cases, the length specifies the number of bytes of data. Other values 
  12859. for data types, in the range hex 0000 through hex 7FFF, can be used for 
  12860. user-defined extended attributes. 
  12861.  
  12862. All user-defined data types should be length-preceded, meaning that a WORD 
  12863. indicating the length of the data (in bytes) precedes the data. 
  12864.  
  12865. For example, here is how to represent the string "Hello": 
  12866.  
  12867.     EAT_ASCII    0005    Hello
  12868.  
  12869.  
  12870. ΓòÉΓòÉΓòÉ 8.1.1.1. Multi-Value Data Type Fields ΓòÉΓòÉΓòÉ
  12871.  
  12872. In many cases, it is desirable for extended attributes (EAs) to store more than 
  12873. a single piece of information. For example, an extended attribute can store a 
  12874. list of names to which a document was sent. The multi-value formats specify how 
  12875. individual pieces of data are stored. 
  12876.  
  12877. Data entries are length-preceded, making it easy to traverse a multi-valued 
  12878. list. 
  12879.  
  12880. In order to allow EAs of different code pages, multi-valued EAs include a field 
  12881. in which the EA's code page is specified. For example, the code page field 
  12882. could be used to indicate that the comments for a Kanji file are written in 
  12883. Spanish. If this value is 0, the file default is assumed. (Code page data is 
  12884. for use by applications. OS/2 does not examine or use EA code page 
  12885. information.) 
  12886.  
  12887. When the concept of a default applies to a multi-valued EA, the first entry in 
  12888. the list is assumed to be the default. For example, suppose an EA entry 
  12889. contains the strings "Text" and "C Code". "Text" is considered the default 
  12890. type. If "C Code" were the first entry in the list ("C Code" then "Text"), then 
  12891. "C Code" would be considered the default type. 
  12892.  
  12893. There are three multi-valued EA data types: 
  12894.  
  12895.      Multi-Valued, Multi-Typed Data 
  12896.      Multi-Valued, Single-Type Data 
  12897.      ASN.1 Data 
  12898.  
  12899.  
  12900. ΓòÉΓòÉΓòÉ 8.1.1.2. Multi-Valued, Multi-Typed Data Type ΓòÉΓòÉΓòÉ
  12901.  
  12902. This data type indicates that the value of a single extended attribute (EA) 
  12903. contains several pieces of information, each of a different data type. It is 
  12904. formatted as follows: 
  12905.  
  12906.     EAT_MVMT  Codepage  NumEntries  [DataType Data] ...
  12907.     WORD      WORD      WORD         WORD
  12908.  
  12909. The first word indicates that the EA value is multi-valued, multi-typed. The 
  12910. second word indicates the code page associated with the language in which the 
  12911. EA value is written. The third word indicates the number of entries contained 
  12912. in this EA value. The next word indicates the data type for the first entry in 
  12913. this EA value, followed by the data for the first entry. The next word, if any, 
  12914. indicates the data type for the second entry in this EA value, followed by the 
  12915. data for the second entry. The pattern repeats- data type, followed by data-for 
  12916. any remaining entries. 
  12917.  
  12918. For example, an extended attribute can have the following value: 
  12919.  
  12920.     EAT_MVMT  0000  0002  EAT_ASCII   000A Hello John
  12921.                           EAT_BINARY  0003 $12  $21  $34
  12922.  
  12923. This is a multi-valued extended attribute with two entries, using the default 
  12924. code page. The first entry is the string "Hello John", and the second is the 
  12925. binary data 0x12 0x21 0x34. 
  12926.  
  12927. Whether or not the data is length-preceded is a function of the data type. 
  12928.  
  12929.  
  12930. ΓòÉΓòÉΓòÉ 8.1.1.3. Multi-Valued, Single-Type Data Type ΓòÉΓòÉΓòÉ
  12931.  
  12932. This data type indicates that the value of a single extended attribute (EA) 
  12933. contains several pieces of information, each of the same data type.  For 
  12934. example: 
  12935.  
  12936.     EAT_MVST  Codepage  NumEntries  Data_Type  [data] ...
  12937.     WORD      WORD      WORD        WORD
  12938.  
  12939. The first word indicates that the EA value is multi-valued, single-typed. The 
  12940. second word indicates the code page associated with the language in which the 
  12941. EA value is written. The third word indicates the number of entries contained 
  12942. in this EA value. The next word indicates the data type of all the entries 
  12943. contained in this EA value, followed by the data for all entries. 
  12944.  
  12945. For example, the following EA value contains three ASCII names: 
  12946.  
  12947.     EAT_MVST 0000 0003 EAT_ASCII 0004 Mark
  12948.                                  0005 Ellen
  12949.                                  0003 Liz
  12950.  
  12951. Each name string is preceded by the length of the string. Whether or not the 
  12952. data is length-preceded is a function of the data type. 
  12953.  
  12954.  
  12955. ΓòÉΓòÉΓòÉ 8.1.1.4. ASN.1 Data Type ΓòÉΓòÉΓòÉ
  12956.  
  12957. This data type indicates that the extended attribute uses the ASN.1 ISO 
  12958. standard to describe a multi-valued data stream. 
  12959.  
  12960.  
  12961. ΓòÉΓòÉΓòÉ 8.1.2. Including One Extended Attribute in Another ΓòÉΓòÉΓòÉ
  12962.  
  12963. Extended attributes (EA) can contain pointers to data stored in other places. 
  12964.  
  12965. This data type indicates that the data contained in another EA associated with 
  12966. the file object should be included into the current EA. 
  12967.  
  12968. For example, the following EA value contains the string "Hello", followed by 
  12969. the data in the EA named AB.STUFF, followed by the string "Bye". 
  12970.  
  12971.     EA_MVMT 0000 0003 EAT_ASCII 0005  Hello
  12972.                       EAT_EA    0008  AB.STUFF
  12973.                       EAT_ASCII 0003  Bye
  12974.  
  12975.  
  12976. ΓòÉΓòÉΓòÉ 8.1.3. Extended Attribute Naming Conventions ΓòÉΓòÉΓòÉ
  12977.  
  12978. Because many applications use text, bit maps, and other binary data in extended 
  12979. attributes, standard names have been adopted to help identify these formats. An 
  12980. application is not limited to these Standard Extended Attributes but should use 
  12981. them when many applications will be accessing the same data. 
  12982.  
  12983. Standard Extended Attributes (SEAs) have a dot (.) as a prefix. This identifies 
  12984. the extended attribute as a SEA. The leading dot is reserved, so applications 
  12985. should not define extended attributes that start with a dot. Also, extended 
  12986. attributes that start with the characters $, @,  or + are reserved for system 
  12987. use. 
  12988.  
  12989. To ensure that its extended attributes are unique, an application should use 
  12990. the name of the company and the name of the application (or suitable 
  12991. abbreviations of each) as a prefix for application-specific extended 
  12992. attributes. 
  12993.  
  12994. For example, Company A has an OS/2 Application, B, that defines extended 
  12995. attributes STUFF, MORE_STUFF, and STILL_MORE_STUFF for its file objects. The 
  12996. names of these extended attributes could be represented by the following entry: 
  12997.  
  12998.     AB.STUFF   AB.MORE_STUFF   AB.STILL_MORE_STUFF
  12999.  
  13000.  
  13001. ΓòÉΓòÉΓòÉ 8.1.4. Standard Extended Attributes ΓòÉΓòÉΓòÉ
  13002.  
  13003. There are nine OS/2 Standard Extended Attributes (SEAs). The name of a SEA has 
  13004. a dot (.) as a prefix. This identifies the extended attribute as a SEA. 
  13005.  
  13006. The values of Standard Extended Attributes can be multi- or single-valued, with 
  13007. formats following the data type conventions discussed previously. 
  13008.  
  13009. Where entries for Standard EAs consist of ASCII characters, case is important. 
  13010.  
  13011.  The Standard EAs that have been defined are: 
  13012.  
  13013.       .ASSOCTABLE 
  13014.       .CODEPAGE 
  13015.       .COMMENTS 
  13016.       .HISTORY 
  13017.       .ICON 
  13018.       .KEYPHRASES 
  13019.       .LONGNAME 
  13020.       .SUBJECT 
  13021.       .TYPE 
  13022.       .VERSION 
  13023.  
  13024.  The .TYPE and .ASSOCTABLE extended attributes (EA) are two of the most useful 
  13025.  SEAs. 
  13026.  
  13027.  The .TYPE extended attribute indicates what type of data is in a file. It also 
  13028.  implies what programs can edit the file, and what icon is to be used for the 
  13029.  file. OS/2 can use the .TYPE EA to determine a default application to run and 
  13030.  a default icon for a file of a particular type (if there is a .ICON EA, it 
  13031.  will be used instead of the icon associated with a particular data type). 
  13032.  
  13033.  The .ASSOCTABLE extended attribute allows an application to indicate the type, 
  13034.  extension, and icon for data files that it recognizes. It also contains an 
  13035.  ownership flag. This data can be automatically installed by OS/2. When your 
  13036.  program recognizes files created by other programs, you might want to install 
  13037.  .ASSOCTABLE EA entries for those other programs. 
  13038.  
  13039.  
  13040. ΓòÉΓòÉΓòÉ 8.1.4.1. The .ASSOCTABLE Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13041.  
  13042. The .ASSOCTABLE extended attribute (EA) contains information that associates 
  13043. data files with the applications that create them or that know how to use them. 
  13044. The .ASSOCTABLE extended attribute enables an application to indicate the type, 
  13045. extension, and icon for the data files it recognizes. The .ASSOCTABLE EA also 
  13046. contains an ownership flag. This tells OS/2 which application to run when the 
  13047. user double-clicks the mouse on a given data file. 
  13048.  
  13049. Because programs can understand and reference data files generated by other 
  13050. programs, this EA can be used to link a program with those files. 
  13051.  
  13052. The name of this EA consists of the string ".ASSOCTABLE". The value of this EA 
  13053. contains application information and consists of multi-valued, multi-typed 
  13054. fields that link the application with: 
  13055.  
  13056.      the file type (that is, the value of a .TYPE EA), 
  13057.      the file extension, 
  13058.      and icon data for data files that it generates or references. The 
  13059.       .ASSOCTABLE EA associates icons by file-type. The data file's file-type 
  13060.       is indicated in the .TYPE EA, or, if the data file does not have a .TYPE 
  13061.       EA, by the extension. 
  13062.  
  13063.  This data can be installed automatically by OS/2. 
  13064.  
  13065.  The format of the EA is as follows. 
  13066.  
  13067.       EAT_MVMT 0000 0004 EAT_ASCII  .TYPE name
  13068.                          EAT_ASCII   file extension
  13069.                          EAT_BINARY  flags
  13070.                          EAT_ICON    icon data
  13071.  
  13072.  The source for the .ASSOCTABLE EA is contained in the resource file for an 
  13073.  application. The .ASSOCTABLE EA is created using the Resource Compiler from a 
  13074.  table with the following form: 
  13075.  
  13076.       ASSOCTABLE  assoctable -id
  13077.       BEGIN
  13078.       association_name,[extension],[flags], [icon_filename]
  13079.       association_name,[extension],[flags], [icon_filename]
  13080.        .
  13081.        .
  13082.        .
  13083.       END
  13084.  
  13085.  The association_name is the name of a file type that the Resource Compiler 
  13086.  understands. (This is the same name found in the .TYPE field of data files.) 
  13087.  
  13088.  The extension is the three letter file extension that is used to identify 
  13089.  files of this type, if they have no .TYPE EA entry. (Three letter extensions 
  13090.  should be used so that FAT file systems can make use of this EA). This field 
  13091.  can be empty. 
  13092.  
  13093.  The icon_filename is the name of the file that contains the icon that is to be 
  13094.  used to represent this file type.  (This field can also be empty.) 
  13095.  
  13096.  The .ASSOCTABLE flag indicates that the program is the default application for 
  13097.  data files with the specified type. This determines the program OS/2 will 
  13098.  start when the file is double-clicked with the mouse. 
  13099.  
  13100.  If more than one program has marked itself as the EAF_DEFAULTOWNER for a 
  13101.  particular data file .TYPE, OS/2 will not know which program to run when the 
  13102.  file of this .TYPE is double-clicked on with the mouse. If no program is 
  13103.  marked as the EAF_DEFAULTOWNER for a particular data file .TYPE, OS/2 will be 
  13104.  similarly confused. In both cases, OS/2 provides the user with a list of 
  13105.  applications that understand the file .TYPE, regardless of whether the 
  13106.  application is the owner or not.  The user selects the program to run from 
  13107.  this list. 
  13108.  
  13109.  The flag entry indicates whether the application owns the file or merely 
  13110.  recognizes the .TYPE. If this flag is set, the entry describing data files of 
  13111.  this type cannot be edited. This flag is specified if a previously defined 
  13112.  icon in the ASSOCTABLE is to be reused. Entries with this flag set have no 
  13113.  icon data defined. The icon used for this entry will be the icon used for the 
  13114.  previous entry. 
  13115.  
  13116.  EAF_ flags can be ORed together when specified in the ASSOCTABLE. The EAF_ 
  13117.  flags are defined in PMWIN.H and PMWIN.INC. 
  13118.  
  13119.  .ASSOCTABLE Example 
  13120.  For example, My_Company's application, My_Application, generates or references 
  13121.  data files that have the following .TYPE names: 
  13122.  
  13123.       My_Company My_Application documentation
  13124.       My_Company My_Application macros
  13125.       My_Company My_Application spreadsheet
  13126.       My_Company My_Application chart
  13127.       Your_Company Your_Application forecast
  13128.  
  13129.  The source for the .ASSOCTABLE extended attribute in the resource file for 
  13130.  My_Application could look like the following. 
  13131.  
  13132.       ASSOCTABLE
  13133.       BEGIN
  13134.       'My_Company My_Application documentation', 'DOC', EAF_DEFAULTOWNER, My_App.ICO
  13135.       'My_Company My_Application macros', 'MAC', EAF_DEFAULTOWNER+EAF_REUSEICON
  13136.       'My_Company My_Application spreadsheet', 'SPR', EAF_DEFAULTOWNER+EAF_REUSEICON
  13137.       'My_Company My_Application chart', 'CHT', EAF_DEFAULTOWNER+EAF_REUSEICON
  13138.       'Your_Company Your_Application forecast', 'FOR', 0
  13139.       END
  13140.  
  13141.  My_Application can load and use some files generated by Your_Application. 
  13142.  However, because My_Application is not the default owner of those files, OS/2 
  13143.  does not run My_Application when the user double-clicks on the files with the 
  13144.  mouse. 
  13145.  
  13146.  The following example illustrates how the value of the .ASSOCTABLE EA for 
  13147.  My_Application might look. It is a multi-valued, multi-typed EA with five 
  13148.  multi-valued, multi-typed entries (one for each file type referenced or 
  13149.  generated by the application). 
  13150.  
  13151.       EAT_MVMT   0000 0005          ; There are 5 associated file types
  13152.  
  13153.       EAT_MVMT   0000 0004          ; Description of 1st associated file type
  13154.       EAT_ASCII  0027 My_Company My_Application documentation  ; File type
  13155.       EAT_ASCII  0003 DOC           ; File extension
  13156.       EAT_BINARY flags              ; Flags
  13157.       EAT_ASCII  icon data          ; Physical icon data
  13158.  
  13159.       EAT_MVMT   0000 0004          ; Description of 2nd associated file type
  13160.       EAT_ASCII  0020 My_Company My_Application macros
  13161.       EAT_ASCII  0003 MAC
  13162.       EAT_BINARY flags
  13163.       EAT_ICON   icon data
  13164.  
  13165.       EAT_MVMT   0000 0004          ; Description of 3rd associated file type
  13166.       EAT_ASCII  0025 My_Company My_Application spreadsheet
  13167.       EAT_ASCII  0003 SPR
  13168.       EAT_BINARY flags
  13169.       EAT_ICON   icon data
  13170.  
  13171.       EAT_MVMT   0000 0004          ; Description of 4th associated file type
  13172.       EAT_ASCII  001F My_Company My_Application chart
  13173.       EAT_ASCII  0003 CHT
  13174.       EAT_BINARY flags
  13175.       EAT_ICON   icon data
  13176.  
  13177.       EAT_MVMT   0000 0004          ; Description of 5th associated file type
  13178.       EAT_ASCII  001F Your_Company Your_Application forecast
  13179.       EAT_ASCII  0003 FOR
  13180.       EAT_BINARY flags
  13181.       EAT_ICON   icon data
  13182.  
  13183.  
  13184. ΓòÉΓòÉΓòÉ 8.1.4.2. The .CODEPAGE Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13185.  
  13186. The .CODEPAGE extended attribute (EA) contains the code page for the file. If 
  13187. this extended attribute is not provided, the code page of the file is the 
  13188. system default or is defined by the application. 
  13189.  
  13190. The code page of the EA data associated with the file is assumed to be that of 
  13191. the file, unless the EA entry is specifically overridden in the code page field 
  13192. in the multi-valued extended attribute data type. 
  13193.  
  13194.  
  13195. ΓòÉΓòÉΓòÉ 8.1.4.3. The .COMMENTS Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13196.  
  13197. The .COMMENTS extended attribute (EA) contains miscellaneous notes or reminders 
  13198. about the file (for example, peculiarities, restrictions, or requirements). 
  13199.  
  13200. The name of this EA consists of the string ".COMMENT". The value of this EA 
  13201. consists of miscellaneous notes and can be multi-valued and of any type. 
  13202.  
  13203.  
  13204. ΓòÉΓòÉΓòÉ 8.1.4.4. The .HISTORY Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13205.  
  13206. The .HISTORY extended attribute (EA) contains the modification history for a 
  13207. file object, indicating the author of the file and all subsequent changes. Each 
  13208. entry is separate field in a multi-value field and consists of be ASCII 
  13209. characters only. 
  13210.  
  13211. The name of this EA consists of the string ".HISTORY". The value of this EA 
  13212. contains the modification history for a file object and can be multi-valued, 
  13213. with each action entry described in a separate field. 
  13214.  
  13215. Each entry in the .HISTORY field has the following format: 
  13216.  
  13217.     PERSON  ACTION(created, changed or printed)  DATE
  13218.  
  13219. For example, the following .HISTORY extended attribute contains two entries: 
  13220.  
  13221.     EAT_MVMT 0000 0002
  13222.              EAT_ASCII 0017 Joe    Created  2/10/88
  13223.              EAT_ASCII 0017 Harry  Changed  2/11/88
  13224.  
  13225. This extended attribute can potentially become quite large. To avoid unwanted 
  13226. growth, an application can let the user decide when an entry should be added to 
  13227. this extended attribute. For example, there are some cases when it is important 
  13228. to note when a document is printed. However, it is probably unnecessary to note 
  13229. it every time the file is printed. 
  13230.  
  13231.  
  13232. ΓòÉΓòÉΓòÉ 8.1.4.5. The .ICON Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13233.  
  13234. The .ICON extended attribute (EA) specifies the icon to be used for the file 
  13235. representation, for example when the application is minimized. This extended 
  13236. attribute contains the physical icon data used to represent the file object. 
  13237.  
  13238. If there is no .ICON EA, OS/2 can use the .TYPE entry to determine a default 
  13239. icon to use for the particular file. If there is an .ICON entry, however, it is 
  13240. used instead of the default icon. 
  13241.  
  13242. The name of this EA consists of the string ".ICON". The value of this EA 
  13243. contains the physical icon data and has the following format: 
  13244.  
  13245.     EAT_ICON  data_length  data
  13246.     WORD      DWORD
  13247.  
  13248. The data is of type BITMAPARRAYFILEHEADER and is used to specify an array of 
  13249. one device-dependent and one device-independent icon bit maps. The 
  13250. GpiLoadBitmap and WinLoadPointer functions support this icon file format. 
  13251.  
  13252. It is best to provide as much icon information as possible. Ideally, an icon 
  13253. should be 64-by-64 bits in 8-color, device-independent format. 
  13254.  
  13255. The Icon Editor is used to create the icon, which is saved in an icon file. The 
  13256. .ICON extended attribute for an application is created by the Resource Compiler 
  13257. as part of the compile process by specifying the DEFAULTICON keyword, as in: 
  13258.  
  13259.   DEFAULTICON <filename.ico>
  13260. This keyword uses the icon definition contained in the specified icon file 
  13261. (FILENAME.ICO) to create the .ICON EA for the application. 
  13262.  
  13263. Applications store the binary icon data in this extended attribute. To install 
  13264. icons for data files, the applications can use the .ASSOCTABLE extended 
  13265. attribute, or DosSetPathInfo. 
  13266.  
  13267.  
  13268. ΓòÉΓòÉΓòÉ 8.1.4.6. The .KEYPHRASES Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13269.  
  13270. The .KEYPHRASES extended attribute (EA) contains key text phrases for the file. 
  13271. Such phrases can be used in performing a database-type search or in helping the 
  13272. user understand the nature of the file. 
  13273.  
  13274. The name of this EA consists of the string ".KEYPHRASES". The value of this EA 
  13275. consists of key phrases in ASCII. 
  13276.  
  13277. Key phrases are represented as ASCII characters. Multiple key phrases can be 
  13278. stored in the value of this extended attribute, each stored in a separate entry 
  13279. in a multi-valued field. 
  13280.  
  13281. For example, the following extended attribute contains three key phrases: 
  13282.  
  13283.     EAT_MVST 0000 0003 EAT_ASCII 0008 ABC Inc.
  13284.                        EAT_ASCII 000A Salesman A
  13285.                        EAT_ASCII 000F Product X sales
  13286.  
  13287. If there is more than one key phrase, each should be stored in a separate entry 
  13288. in a multi-value field. 
  13289.  
  13290.  
  13291. ΓòÉΓòÉΓòÉ 8.1.4.7. The .LONGNAME Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13292.  
  13293. When an application attempts to write a file with a long name to a file system 
  13294. that does not support long names, it must generate a short name for the file. 
  13295. The application should notify the user of the new short name and save the 
  13296. original (long) name in the .LONGNAME extended attribute. 
  13297.  
  13298. When a file is copied from a system that uses short names to a system that uses 
  13299. long names, the application should check the .LONGNAME extended attribute. If a 
  13300. value is present, the application should rename the file to the long name, then 
  13301. remove the .LONGNAME extended attribute. 
  13302.  
  13303.  
  13304. ΓòÉΓòÉΓòÉ 8.1.4.8. The .SUBJECT Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13305.  
  13306. The .SUBJECT extended attribute (EA) contains a brief summary of the content or 
  13307. purpose of the file object it is associated with. 
  13308.  
  13309. The name of this EA consists of the string ".SUBJECT". The value of this EA 
  13310. consists of a single-valued ASCII string that contains the purpose of the file 
  13311. object. 
  13312.  
  13313. The length of this field must be less than 40 characters. 
  13314.  
  13315.  
  13316. ΓòÉΓòÉΓòÉ 8.1.4.9. The .TYPE Standard Extended Attribute ΓòÉΓòÉΓòÉ
  13317.  
  13318. The .TYPE extended attribute (EA) indicates the file-type of the file object it 
  13319. is associated with. It is similar to a file name extension. 
  13320.  
  13321. The name of this EA consists of the string ".TYPE". The value of this EA 
  13322. contains the file object's file-type. The following file types are predefined: 
  13323.  
  13324.       Plain text 
  13325.       OS/2 command file 
  13326.       DOS command file 
  13327.       Executable 
  13328.       Metafile 
  13329.       Bit map 
  13330.       Icon 
  13331.       Binary data 
  13332.       Dynamic link library 
  13333.       C code 
  13334.       Pascal code 
  13335.       BASIC code 
  13336.       COBOL code 
  13337.       FORTRAN code 
  13338.       Assembler code 
  13339.       Library 
  13340.       Resource file 
  13341.       Object code 
  13342.  
  13343.  Data files only require identification of the file type. For data files 
  13344.  without EAs, the file type is derived from the file extension, if there is 
  13345.  one. 
  13346.  
  13347.  File object types are represented as length-preceded ASCII strings, uniquely 
  13348.  identifying the file object's type. This identifier is referenced within the 
  13349.  application's .ASSOCTABLE EA in order to bind the data file type to the 
  13350.  application. It is important that this name be a unique identifier because all 
  13351.  file type names are public data. For example, if application A and application 
  13352.  B both had a type name of SPREADSHEET, the filing system would not be able to 
  13353.  identify A's SPREADSHEET from B's SPREADSHEET. 
  13354.  
  13355.  The recommended convention for defining file object types is: 
  13356.  
  13357.      Company_name 
  13358.      Application_name 
  13359.      Application-specific_name 
  13360.  
  13361.  For example, spreadsheet files generated by My_Application written by 
  13362.  My_Company might have a file object type of the following. 
  13363.  
  13364.       My_Company My_Application Spreadsheet
  13365.  
  13366.  Type names must be ASCII characters and case is significant. 
  13367.  
  13368.  Note:  The performance of extended attributes is dependent on the file system. 
  13369.         Because some file systems store extended attributes in 
  13370.         first-in/first-out (FIFO) order, it is important to write the .TYPE 
  13371.         entry first so OS/2 can access that information quickly. 
  13372.  
  13373.  
  13374. ΓòÉΓòÉΓòÉ 8.1.4.10. The .VERSION Extended Attribute ΓòÉΓòÉΓòÉ
  13375.  
  13376. The .VERSION extended attribute (EA) contains the version number of the file 
  13377. format, as shown below. 
  13378.  
  13379.     My_Application 1.0
  13380.  
  13381. The name of this EA consists of the string ".VERSION". The value of this EA 
  13382. contains the file object version number. This attribute can be ASCII or binary. 
  13383. Only the application that created the file object should modify the value of 
  13384. this EA. It can also be used to indicate an application or dynamic link library 
  13385. version number. 
  13386.  
  13387.  
  13388. ΓòÉΓòÉΓòÉ 8.1.5. Managing Extended Attributes ΓòÉΓòÉΓòÉ
  13389.  
  13390. An application can create, query, and set extended attributes (EAs) for any 
  13391. file object. 
  13392.  
  13393. The application can define extended attributes for a file when the file is 
  13394. created with DosOpen. Similarly, the application can define EAs for a directory 
  13395. when the directory is created using DosCreateDir. 
  13396.  
  13397. An application can define EAs for existing file objects by referencing the file 
  13398. object by its handle and calling DosSetFileInfo, or by referencing the file 
  13399. object by its name and calling DosSetPathInfo. 
  13400.  
  13401. An application can examine the EAs for a file object by referencing the file 
  13402. object by its handle and calling DosQueryFileInfo, or by referencing the file 
  13403. object by its name and calling DosQueryPathInfo. The application can also call 
  13404. DosEnumAttribute, using either the file object's handle or its name, to get 
  13405. information about the file object's EAs. 
  13406.  
  13407. In addition, an application can search for file objects and specify that 
  13408. certain EAs be returned by calling DosFindFirst. 
  13409.  
  13410.  
  13411. ΓòÉΓòÉΓòÉ 8.1.5.1. Controlling Access to Extended Attributes ΓòÉΓòÉΓòÉ
  13412.  
  13413. Like the file objects they are associated with, extended attributes (EAs) can 
  13414. have more than one process accessing them at the same time. This means that one 
  13415. process could be querying EAs for a file object, while another is setting EAs 
  13416. for the same file object. 
  13417.  
  13418. In addition, operations on EAs are not atomic. That is, a query or set 
  13419. operation might not complete before another query or set operation is performed 
  13420. on the same object. If an error occurs before an entire list of EAs has been 
  13421. set, all, some, or none of them may actually remain set on the file object. 
  13422. This means that EAs may not remain in a consistent state unless the order in 
  13423. which the operations are performed can be guaranteed. 
  13424.  
  13425. Sharing protection is provided so that unpredictable results do not occur 
  13426. during multiple simultaneous operations on extended attributes. EA manipulation 
  13427. is associated with the access permission to the related file object (file or 
  13428. directory). 
  13429.  
  13430. Handle-based access permission is controlled by the sharing/access mode of the 
  13431. associated file object: 
  13432.  
  13433.      If the file object is open for read access, querying EAs (using 
  13434.       DosQueryFileInfo) is permitted. 
  13435.  
  13436.      If the file object is open for write access, setting EAs (using 
  13437.       DosSetFileInfo) is permitted. 
  13438.  
  13439.  Path-based access permission is controlled by adding the file object to the 
  13440.  sharing set for the duration of the call: an application requires read access 
  13441.  and file-sharing permission must be set to deny-write. 
  13442.  
  13443.      For setting EAs (using DosSetPathInfo), an application requires write 
  13444.       access and file-sharing permission must be deny-read-write. 
  13445.  
  13446.  Note:  The functions that set and query EAs fail if another process holds 
  13447.         conflicting sharing rights to the file object. 
  13448.  
  13449.  No explicit EA sharing is performed for DosEnumAttribute. Implicit sharing 
  13450.  exists if the caller passes the handle of an open file, since sharing access 
  13451.  to the associated file is required to modify its EA. No sharing is performed 
  13452.  if the caller passes the path name. This means that if some other process is 
  13453.  editing the EAs, and changes them between two calls to DosEnumAttribute, 
  13454.  inconsistent results might be returned (for example, the same values might be 
  13455.  returned twice, some values might be missed, and so on). 
  13456.  
  13457.  To prevent the modification of EAs for the handle case, the file should be 
  13458.  opened in deny-write mode before calling DosEnumAttribute. To prevent the 
  13459.  modification of EAs for the path name case, the file should be open in 
  13460.  deny-write mode before calling DosEnumAttribute. For the directory name case, 
  13461.  no sharing is possible. 
  13462.  
  13463.  
  13464. ΓòÉΓòÉΓòÉ 8.1.5.2. Extended Attribute Data Structures ΓòÉΓòÉΓòÉ
  13465.  
  13466. There are a series of data structures through which OS/2 functions manipulate 
  13467. extended attributes (EAs) for applications: 
  13468.  
  13469.      Full EAs (FEA2s) 
  13470.      A list of full EAs (FEA2LIST) 
  13471.      Get EAs (GEA2) 
  13472.      A list of get EAs (GEA2LIST) 
  13473.      EAOP2s 
  13474.  
  13475.  Full Extended Attribute (FEA2) Data Structure 
  13476.  A full EA (FEA2) data structure contains the extended attribute name and 
  13477.  value. The name length does not include the trailing nil. The characters that 
  13478.  form the name are legal file name characters. 
  13479.  
  13480.  An FEA2LIST is a list of FEA2 structures, preceded by the length of the list 
  13481.  (including the length itself). FEA2Lists are used for querying, adding, 
  13482.  deleting, or changing EAs. They are required input parameters for the 
  13483.  functions that create or set extended attributes (DosSetFileInfo and 
  13484.  DosSetPathInfo). They are required output parameters for the functions that 
  13485.  query extended attributes (DosQueryFileInfo, DosQueryPathInfo, and 
  13486.  DosEnumAttribute). 
  13487.  
  13488.  FEA2 data structures include the lengths of the extended attribute's names and 
  13489.  values. EA name lengths of 0 are illegal and cause errors to be returned by EA 
  13490.  functions. An EA value length of 0 has special meaning: 
  13491.  
  13492.      Setting an EA with a value length of 0 in the FEA2 data structure causes 
  13493.       that attribute to be deleted, if possible. 
  13494.  
  13495.      Getting an EA with a value length of 0 in the FEA2 data structure 
  13496.       indicates that the attribute is not present. 
  13497.  
  13498.  Get Extended Attribute (GEA2) Data Structure 
  13499.  A Get EA (GEA2) is an extended attribute name. The name length does not 
  13500.  include the trailing nil. 
  13501.  
  13502.  A GEA2LIST is a list of GEA2 structures, preceded by a length of the list 
  13503.  (including the length itself). GEA2Lists are used for retrieving the values 
  13504.  for a particular set of extended attributes. They are required input 
  13505.  parameters for the functions that query extended attributes (DosQueryFileInfo, 
  13506.  DosQueryPathInfo, and DosEnumAttribute). 
  13507.  
  13508.  Note:  GEA2 data structures include the lengths of extended attribute's names 
  13509.         and values. EA name lengths of 0 are illegal and cause errors to be 
  13510.         returned by EA functions. An EA value length of 0 has special meaning. 
  13511.         Setting an EA with a value length of 0 in the FEA2 data structure 
  13512.         causes that attribute to be deleted, if possible. Getting an EA with a 
  13513.         value length of 0 in the FEA2 data structure indicates that the 
  13514.         attribute is not present. 
  13515.  
  13516.  Extended Attribute Operation ( EAOP2) Data Structure 
  13517.  An extended attribute operation (EAOP2) data structure consists of a GEA2LIST, 
  13518.  an FEA2LIST, and an error field. All extended attribute manipulation is 
  13519.  performed using this structure. Before calling an extended attribute function, 
  13520.  an application must define an EAOP2 structure, with the GEA2LIST and FEA2LIST 
  13521.  appropriately defined. 
  13522.  
  13523.  The use of GEA2LIST and FEA2LIST for each function is described further in the 
  13524.  Control Program Programming Reference. 
  13525.  
  13526.  
  13527. ΓòÉΓòÉΓòÉ 8.1.5.3. Preserving Extended Attributes ΓòÉΓòÉΓòÉ
  13528.  
  13529. Extended attributes (EAs) are supported in OS/2's FAT file system and High 
  13530. Performance File System (HPFS). Extended attributes are not supported by the 
  13531. FAT file system used in versions of OS/2 prior to Version 1.2, nor are they 
  13532. supported in the DOS operating system. 
  13533.  
  13534. EAs associated with a file object are not part of a file object or of its data, 
  13535. but are maintained separately and managed by the file system that manages that 
  13536. object. EAs reside on the volume on which the file object resides and are 
  13537. connected to their file object by pointers from the file object. 
  13538.  
  13539. Therefore, EAs belonging to a file object are lost when moving that file object 
  13540. from a storage device managed by an OS/2 FAT or installable file system to a 
  13541. storage device managed by the old FAT file system. 
  13542.  
  13543. EAs can be lost under other circumstances, as well: 
  13544.  
  13545.      When a program that does not recognize EAs (for example, an editor 
  13546.       written for DOS) performs a non-truncating open on the files with which 
  13547.       the EAs are associated 
  13548.  
  13549.      When the files they are associated with are sent over COM links 
  13550.  
  13551.  So that files with EAs can be manipulated under these circumstances, without 
  13552.  losing their EAs, OS/2 provides a utility called EAUTIL EAUTIL enables users 
  13553.  to separate extended attributes from the specified file object, optionally 
  13554.  disassociating them from the file object. The extended attributes are placed 
  13555.  into a specified HoldFile. This utility also enables users to reattach the 
  13556.  separated extended attributes with their file objects. 
  13557.  
  13558.  EAUTIL can be applied to subdirectories, as well as to files. It does not 
  13559.  support global file name characters in parameters; it operates on a single 
  13560.  file object at each invocation. 
  13561.  
  13562.  Users can use EAUTIL to: 
  13563.  
  13564.      Strip EAs off files to be edited with a program that does not recognize 
  13565.       EAs. 
  13566.  
  13567.      Place the EAs into normal files so they can be dealt with by old tools 
  13568.       (such as backup, restore, and so on) or easily transmitted. 
  13569.  
  13570.      Reattach EAs to files after the files have been brought back from the 
  13571.       systems where EAs are not supported. 
  13572.  
  13573.  
  13574. ΓòÉΓòÉΓòÉ 8.1.5.4. Protecting Extended Attributes ΓòÉΓòÉΓòÉ
  13575.  
  13576.  
  13577. Programs written for releases of OS/2 and DOS that do not support extended 
  13578. attributes (EAs) will tend to lose EAs simply because they do not know that 
  13579. they exist. OS/2 provides some controls that prevent old programs from 
  13580. destroying critical data without unduly restricting their activities. This is 
  13581. done by classifying programs and marking the extended attributes that are 
  13582. associated with files. 
  13583.  
  13584. Programs are classified as: 
  13585.  
  13586.      Those that recognize EAs. These include OS/2 Version 1.2 and later 
  13587.       programs. 
  13588.  
  13589.      Those that do not recognize EAs. These include programs written for 
  13590.       releases of OS/2 and DOS that do not support EAs. 
  13591.  
  13592.  EAs associated with files are marked as critical or non-critical. Programs 
  13593.  that do not recognize EAs are not permitted to manipulate files that have 
  13594.  critical EAs associated with them. This protection does not apply to 
  13595.  directories. EAs associated with directories cannot be marked as critical. 
  13596.  
  13597.  Critical Extended Attributes 
  13598.  Extended attributes (EAs) are non-critical by default. A non-critical EA is 
  13599.  one that is not necessary to the functionality of the application. That is, if 
  13600.  a non-critical EA is lost, the system continues to operate correctly. For 
  13601.  example, losing the icons associated with data files does not generally cause 
  13602.  any ill effect other than the inability to show the icon. 
  13603.  
  13604.  A critical extended attribute is one which is necessary to the correct 
  13605.  operation of OS/2 or of a particular application. EAs should be marked as 
  13606.  critical if their loss would cause the system or program to perform 
  13607.  incorrectly. For example, a mail program might store mail headers in EAs. The 
  13608.  loss of the header from a message would normally render the mail program 
  13609.  completely unable to further use that message. This would be unacceptable, so 
  13610.  the mail program should mark this EA as critical. 
  13611.  
  13612.  A file has critical extended attributes (EAs) if at least one EA attached to 
  13613.  the file is marked as critical. 
  13614.  
  13615.  Marking EAs as critical only prevents programs that do not recognize EAs from 
  13616.  losing the EAs from the file. It does not prevent deletion of files by any 
  13617.  application. 
  13618.  
  13619.  Applications must be careful how they mark their EAs. If they are too 
  13620.  aggressive marking EAs as critical, users might be prevented from accessing 
  13621.  files that their application uses. EAs are marked as critical by setting the 
  13622.  critical bit. The critical bit is bit 7 of the flags byte of the FEA2 data 
  13623.  structure. If this bit is 0, the EA is a non-critical EA. If it is 1, it is a 
  13624.  critical EA. The symbolic constant FEA_NEEDEA can be used to indicate a 
  13625.  critical EA. 
  13626.  
  13627.  The creator of the EA determines whether it is critical or not. 
  13628.  
  13629.  Programs that do not recognize extended attributes (EAs) are prevented from 
  13630.  performing certain operations on files that have critical EAs associated with 
  13631.  them. For example, a program that does not recognize EAs is not permitted to 
  13632.  perform a non-truncating open on a file with critical EAs associated with it, 
  13633.  because programs cannot be permitted to read the data and ignore the EAs. 
  13634.  
  13635.  Programs that do not recognize EAs are, however, permitted to perform those 
  13636.  operations that they can do completely. For example, they can delete files 
  13637.  with critical EAs associated with them. Programs that do not recognize EAs are 
  13638.  not prevented from accessing files whose EAs are not critical. 
  13639.  
  13640.  Programs that recognize EAs have no restrictions placed on their actions with 
  13641.  respect to critical EAs. 
  13642.  
  13643.  Programs that recognize extended attributes must identify themselves to OS/2. 
  13644.  This is done by including the NEWFILES declaration in the program's module 
  13645.  definition file. The NEWFILES declaration is also how programs indicate that 
  13646.  they understand and use long file names. 
  13647.  
  13648.  
  13649. ΓòÉΓòÉΓòÉ 8.1.5.5. Searching for Extended Attributes ΓòÉΓòÉΓòÉ
  13650.  
  13651. An application can search for file objects that have specific extended 
  13652. attribute names by calling DosFindFirst twice. The steps involved are: 
  13653.  
  13654.    1. Call DosFindFirst for FileInfoLevel = 2, to get the length of the buffer 
  13655.       required to hold the EAOP2 data associated with a matching file object. 
  13656.  
  13657.    2. Call DosFindFirst for FileInfoLevel = 3, to get the EAOP2 data associated 
  13658.       with the matching file object. 
  13659.  
  13660.  
  13661. ΓòÉΓòÉΓòÉ 8.1.5.6. Supporting Extended Attributes ΓòÉΓòÉΓòÉ
  13662.  
  13663. To support extended attributes, applications should do the following: 
  13664.  
  13665.    1. Fill in the .ASSOCTABLE extended attribute for all major file types that 
  13666.       the application recognizes or uses. 
  13667.  
  13668.    2. Fill in the .ICON extended attribute for executable files. 
  13669.  
  13670.    3. Set the .TYPE extended attribute for data files the application creates. 
  13671.  
  13672.    4. Fill in and use the .LONGNAME extended attribute as appropriate. 
  13673.  
  13674.    5. Support .HISTORY and .VERSION. 
  13675.  
  13676.    6. Support the other Standard Extended Attributes as appropriate. 
  13677.  
  13678.  
  13679. ΓòÉΓòÉΓòÉ 9. File Management ΓòÉΓòÉΓòÉ
  13680.  
  13681. OS/2 provides a standard set of file system functions. This means that 
  13682. applications can create, open, read, write, copy, and delete files and 
  13683. directories by using the same functions, regardless of which file system is 
  13684. used. When an application calls a file system function, OS/2 passes the request 
  13685. to the dynamic link library that supports the file system. The dynamic link 
  13686. library carries out most file system processing, such as validating file names. 
  13687. If an error occurs, the file system returns the error to OS/2, which then 
  13688. passes it back to the calling application. 
  13689.  
  13690. The OS/2 file system functions identify files and directories by their names. 
  13691. These functions store or search for the file or directory in the current 
  13692. directory on the current drive unless the name explicitly specifies a different 
  13693. directory and drive. Occasionally, a file system has control functions in 
  13694. addition to the standard file system functions. The control functions are 
  13695. specific to the given file system. An application can call a control function 
  13696. by using DosFSCtl, which directs OS/2 to pass the control-function information 
  13697. to the corresponding Installable File System (IFS). 
  13698.  
  13699. The following topics are related to the information in this chapter: 
  13700.  
  13701.      Files systems 
  13702.      Files names 
  13703.      Extended attributes 
  13704.      Pipes 
  13705.      Device I/O 
  13706.  
  13707.  
  13708. ΓòÉΓòÉΓòÉ 9.1. About Volumes and Drives ΓòÉΓòÉΓòÉ
  13709.  
  13710. OS/2 allows more than one file system on a single storage device. If the device 
  13711. can have more than one partition (or volume), each partition can be initialized 
  13712. as an OS/2 partition and given a valid OS/2 file system. For each volume, OS/2 
  13713. determines the type of file system the first time the volume is accessed by a 
  13714. function or when the medium in the drive changes. After that, OS/2 manages all 
  13715. input and output to that volume by using the corresponding dynamic link 
  13716. library. 
  13717.  
  13718. OS/2 uses the volume label and serial number to ensure that the medium in the 
  13719. drive does not change while there are outstanding requests for input and 
  13720. output. Each volume has a volume label and a 32-bit volume serial number, 
  13721. stored in a reserved location in logical sector 0 at the time of formatting. If 
  13722. the volume label and serial number do not match, OS/2 signals the critical 
  13723. error handler to prompt the user to insert the volume that has the specified 
  13724. serial number and label. OS/2 maintains the connection between the medium and 
  13725. the volume label and serial number until all open files on the volume are 
  13726. closed and all search references and cache buffer references are removed. The 
  13727. system redetermines the type of file system and the volume label and serial 
  13728. number only when the medium changes. 
  13729.  
  13730. OS/2 enables applications to: 
  13731.  
  13732.      Determine and set the default drive using DosQueryCurrentDisk and 
  13733.       DosSetDefaultDisk, respectively. 
  13734.  
  13735.      Determine and set drive information using DosQueryFSInfo and 
  13736.       DosSetFSInfo. 
  13737.  
  13738.      Determine and set the write verification switch using DosQueryVerify and 
  13739.       DosSetVerify. If the write verification switch is on, each time data is 
  13740.       written to the disk, the data is verified to ensure it has been recorded 
  13741.       correctly. These functions are provided for recording critical data. 
  13742.  
  13743.  
  13744. ΓòÉΓòÉΓòÉ 9.2. About Directories ΓòÉΓòÉΓòÉ
  13745.  
  13746. When an application starts, it inherits the current directory and drive from 
  13747. the application that starts it. An application can determine which directory 
  13748. and drive are current by using DosQueryCurrentDir and DosQueryCurrentDisk. An 
  13749. application can change the current directory and drive of the file system by 
  13750. using DosSetCurrentDir and DosSetDefaultDisk. 
  13751.  
  13752. When an application creates a new file, the system adds a file entry to the 
  13753. specified directory. Each directory can have any number of entries, up to the 
  13754. physical limit of the disk. An application can create new directories and 
  13755. delete existing directories by using DosCreateDir and DosDeleteDir. Before a 
  13756. directory can be deleted, it must be empty; if there are files or directories 
  13757. in that directory, they must be deleted or moved. An application can delete a 
  13758. file by using DosDelete or move a file to another directory by using DosMove. 
  13759.  
  13760.  
  13761. ΓòÉΓòÉΓòÉ 9.2.1. Creating a Subdirectory ΓòÉΓòÉΓòÉ
  13762.  
  13763. To create a new subdirectory, an application calls DosCreateDir and specifies a 
  13764. directory path name. If the call is successful, a new subdirectory is created 
  13765. at the end of the path on the specified disk. If no path name is specified, a 
  13766. new subdirectory is created at the end of the current directory for the 
  13767. process. If any subdirectories in the path do not exist, the subdirectory is 
  13768. not created. 
  13769.  
  13770. Because a subdirectory is a file object, an application also can define an 
  13771. extended attribute for the directory when it is created during this call. See 
  13772. Extended Attributes for more information on extended attributes. 
  13773.  
  13774.  
  13775. ΓòÉΓòÉΓòÉ 9.2.2. Determining and Changing the Current Directory ΓòÉΓòÉΓòÉ
  13776.  
  13777. Calling DosQueryCurrentDir returns the full path name of the current directory 
  13778. for the specified drive. The string does not begin with a back slash (\) and it 
  13779. ends with a byte containing 00H, the nil character. 
  13780.  
  13781. To change the current directory, call DosQueryCurrentDir with the path name of 
  13782. the directory you want to make the current directory. 
  13783.  
  13784.  
  13785. ΓòÉΓòÉΓòÉ 9.2.3. Deleting a Directory ΓòÉΓòÉΓòÉ
  13786.  
  13787. A subdirectory cannot be removed if it is the current subdirectory or if it 
  13788. contains hidden files or subdirectory entries other than the "." and ".." 
  13789. entries. When these requirements for removal are met, DosDeleteDir can be 
  13790. called with a path name to remove the subdirectory from the disk. 
  13791.  
  13792.  
  13793. ΓòÉΓòÉΓòÉ 9.3. About Files ΓòÉΓòÉΓòÉ
  13794.  
  13795. A file is one or more bytes of data, usually stored on a disk. While the 
  13796. application that creates the file determines the format of the file, the file 
  13797. system determines how the file is stored on the disk and what actions can be 
  13798. performed on it. The file system also stores information about the file in file 
  13799. attributes and extended attributes. 
  13800.  
  13801. Files are accessed through the file system using file handles. File handles are 
  13802. returned by DosOpen when the file is opened and are used for all subsequent 
  13803. accesses to the file. Files can be be opened, read from, written to, closed, 
  13804. copied, moved, deleted, renamed, and locked. Files can be searched for based on 
  13805. a metacharacter template. 
  13806.  
  13807. Each open file has a file pointer that indicates the current reading or writing 
  13808. location within the file. The file pointer moves automatically with each read 
  13809. or write operation on the file and can be moved manually by the application. 
  13810.  
  13811.  
  13812. ΓòÉΓòÉΓòÉ 9.3.1. File Attributes ΓòÉΓòÉΓòÉ
  13813.  
  13814. Each directory entry includes a set of file attributes. File attributes specify 
  13815. whether the directory entry is for a file, a directory, or a volume identifier. 
  13816. The attributes also specify if the file is read-only, hidden, archived, or a 
  13817. system file. 
  13818.  
  13819. A read-only file cannot be opened for writing, nor can it be deleted. A hidden 
  13820. file (or directory) cannot be displayed by using an ordinary directory listing. 
  13821. A system file is excluded from normal directory searches. The archived 
  13822. attribute is for use by special purpose applications to mark a file that has 
  13823. been changed since the last time the file was examined. 
  13824.  
  13825. An application can retrieve and set the file attributes by using 
  13826. DosQueryFileInfo  and DosSetFileInfo. 
  13827.  
  13828.  
  13829. ΓòÉΓòÉΓòÉ 9.3.2. File Handles ΓòÉΓòÉΓòÉ
  13830.  
  13831. OS/2 identifies each open file by assigning it a file handle when the 
  13832. application opens or creates the file. The file handle is a unique 32-bit 
  13833. integer. The application can use the handle in functions that read from and 
  13834. write to the file, depending on how the file was opened. The application can 
  13835. continue to use the handle until the file is closed. 
  13836.  
  13837. The default maximum number of file handles for a process is 50. An application 
  13838. can change this maximum by using DosSetMaxFH. When this call is made, all 
  13839. currently open file handles are preserved. 
  13840.  
  13841. In the past, the maximum number of file handles was 20. If you previously had 
  13842. code that increased the maximum file handles from 20 to less than 50, you can 
  13843. now remove this code. 
  13844.  
  13845. When an application starts, it inherits all open file handles from the process 
  13846. that starts it. If the system's command processor starts an application, file 
  13847. handles 0, 1, and 2 represent the standard input, standard output, and standard 
  13848. error files. The standard input file is the keyboard; the standard output and 
  13849. standard error files are the screen. An application can read from the standard 
  13850. input file and write to the standard output and standard error files 
  13851. immediately; it does not have to open the files first. 
  13852.  
  13853. An application can create a duplicate file handle for an open file by using 
  13854. DosDupHandle. A duplicate handle is identical to the original handle. 
  13855. Typically, duplicate handles are used to redirect the standard input and 
  13856. standard output files. For example, an application can open a disk file and 
  13857. duplicate the disk-file handle as handle 0. Thereafter, an application reading 
  13858. from the standard input file (handle 0) takes data from the disk file, not from 
  13859. the keyboard. 
  13860.  
  13861. When devices and pipes are accessed through the file system functions (using 
  13862. DosOpen, DosRead, and so on), the devices and pipes are treated as files and 
  13863. are identified using file handles. The standard file handles can be redirected 
  13864. to a device or pipe. 
  13865.  
  13866.  
  13867. ΓòÉΓòÉΓòÉ 9.3.3. File Pointer ΓòÉΓòÉΓòÉ
  13868.  
  13869. Every open file has a file pointer that specifies the next byte to be read or 
  13870. the location to receive the next byte that is written. When a file is first 
  13871. opened, the system places the file pointer at the beginning of the file. As 
  13872. each byte is read or written, OS/2 advances the pointer. 
  13873.  
  13874. An application can also move the pointer by using DosSetFilePtr. When the 
  13875. pointer reaches the end of the file and the application attempts to read from 
  13876. the file, no bytes are read and no error occurs. Thus, reading 0 bytes without 
  13877. an error means the program has reached the end of the file. 
  13878.  
  13879. When an application writes to a disk file, the data being written is usually 
  13880. collected in an internal buffer. OS/2 writes to the disk only when the amount 
  13881. of data equals (or is a multiple of) the sector size of the disk. If there is 
  13882. data in the internal buffer when the file is closed, the system automatically 
  13883. writes the data to the disk before closing the file. An application can also 
  13884. flush the buffer (that is, write the contents of the buffer to the disk) by 
  13885. using DosResetBuffer. 
  13886.  
  13887.  
  13888. ΓòÉΓòÉΓòÉ 9.3.4. Copying Files ΓòÉΓòÉΓòÉ
  13889.  
  13890. DosCopy is used to copy files and subdirectories. Metacharacters (global file 
  13891. name characters) are not allowed, so only individual files or entire 
  13892. subdirectories can be copied with this function. The source and target can be 
  13893. on different drives. 
  13894.  
  13895. When the source specified is a subdirectory and an I/O error occurs, the file 
  13896. being copied from the source directory to the target directory at the time of 
  13897. the error will be deleted from the target directory and DosCopy will be 
  13898. terminated. 
  13899.  
  13900. When a file is being copied and an I/O error occurs, 
  13901.  
  13902.      if the source file name is that of a file to be replaced, the file is 
  13903.       deleted from the target path. 
  13904.  
  13905.      if the source file name is that of a file to be appended, the target file 
  13906.       is resized to its original size. 
  13907.  
  13908.  DosCopy will copy the attributes of the source file, such as date of creation, 
  13909.  and time of creation to the target file. Additionally, DosCopy will copy the 
  13910.  extended attributes of the source file when creating a new subdirectory or a 
  13911.  new file, or when replacing an existing file. 
  13912.  
  13913.  
  13914. ΓòÉΓòÉΓòÉ 9.3.5. Moving Files ΓòÉΓòÉΓòÉ
  13915.  
  13916. DosMove is used to move a file from one subdirectory to another on the same 
  13917. drive. In the process of moving the file, its name can be changed. 
  13918. Metacharacters (global file name characters) are not permitted. 
  13919.  
  13920.  
  13921. ΓòÉΓòÉΓòÉ 9.3.6. Deleting Files ΓòÉΓòÉΓòÉ
  13922.  
  13923. Calling DosDelete removes the directory  entry associated with a file name. 
  13924. Metacharacters (global file name characters) are not permitted. 
  13925.  
  13926. Files whose read-only attribute is set cannot be deleted. 
  13927.  
  13928.  
  13929. ΓòÉΓòÉΓòÉ 9.3.7. Changing File Sizes ΓòÉΓòÉΓòÉ
  13930.  
  13931. DosSetFileSize is used to extend or truncate  the size of a file that is open 
  13932. for Read/Write or Write-Only access. 
  13933.  
  13934. When a file is extended, for example to reserve disk space, the value of the 
  13935. additional bytes allocated by the system is undefined. 
  13936.  
  13937.  
  13938. ΓòÉΓòÉΓòÉ 9.3.8. Locking and Unlocking File Regions ΓòÉΓòÉΓòÉ
  13939.  
  13940. Because OS/2 permits more than one application to open a file and write to it, 
  13941. it is important that the applications not write over each other's work. An 
  13942. application can protect against this problem by temporarily locking a region in 
  13943. a file. 
  13944.  
  13945. DosSetFileLocks provides a simple mechanism that temporarily prevents access by 
  13946. other processes to regions within a file. DosSetFileLocks specifies a range of 
  13947. bytes in the file that is locked by an application and that can be accessed 
  13948. only by the application locking the region. The application uses the same 
  13949. function to free the locked region. 
  13950.  
  13951. Locking and unlocking regions in a file enables sharing processes to coordinate 
  13952. their efforts. A process can lock a region in a file so the process can read 
  13953. and update the file region. A sharing process that attempts to lock the region 
  13954. before the other process finishes its update and unlocks the region receives an 
  13955. error code. When a lock is unsuccessful because a lock is already in place, 
  13956. ERROR_LOCK_VIOLATION is returned. 
  13957.  
  13958. A lock that extends beyond end-of-file is not considered an error. However, a 
  13959. locked region cannot overlap another locked region, nor can it encompass a 
  13960. locked region. Any such conflicting locks must be cleared before a region can 
  13961. be locked. 
  13962.  
  13963. When a file handle is duplicated, the duplicate handle has access to any locked 
  13964. regions currently being accessed by the original handle. Although a child 
  13965. process created with DosExecPgm can inherit the file handles of its parent 
  13966. process, it does not inherit access to locked regions in effect for a file 
  13967. handle unless the file handle is duplicated and passed to it. 
  13968.  
  13969. Note:  File locks are intended to be in effect for only short periods of time. 
  13970.  
  13971. When a file with locks is closed, the locks are released in no defined order. 
  13972.  
  13973.  
  13974. ΓòÉΓòÉΓòÉ 9.3.9. Searching for Files ΓòÉΓòÉΓòÉ
  13975.  
  13976. An application can use DosFindFirst, DosFindNext, and DosFindClose to search 
  13977. the current directory for all file names that match a given pattern. 
  13978.  
  13979. The pattern must be an OS/2 file name and can include metacharacters (global 
  13980. file name characters). The wildcard characters are the question mark (?) and 
  13981. the asterisk (*). The question mark matches any single character; the asterisk 
  13982. matches any combination of characters. For example, the pattern "A*" matches 
  13983. the names "ABC", "A23", and "ABCD", but the pattern "A?C" matches only the name 
  13984. "ABC". 
  13985.  
  13986.  
  13987. ΓòÉΓòÉΓòÉ 9.3.10. Determining the Maximum Path Length ΓòÉΓòÉΓòÉ
  13988.  
  13989. An application that recognizes long file names might be run on systems with or 
  13990. without installable file systems. Additionally, the maximum length of a file 
  13991. name might vary from one installable file system to another. So that an 
  13992. application can properly handle this variable condition (and, for example, 
  13993. allocate large enough buffers to hold file names), the application should call 
  13994. DosQuerySysInfo to determine the maximum path length supported by the file 
  13995. system. 
  13996.  
  13997. Make this call before calling file system functions that require full path 
  13998. names. 
  13999.  
  14000.  
  14001. ΓòÉΓòÉΓòÉ 9.3.11. Specifying an Extended LIBPATH ΓòÉΓòÉΓòÉ
  14002.  
  14003. The LIBPATH, which is set in CONFIG.SYS, specifies a search path which OS/2 
  14004. uses when searching for dynamic link libraries (DLLs). The LIBPATH is set 
  14005. during system startup and cannot be changed dynamically. 
  14006.  
  14007. OS/2 provides the capability of specifying extensions to the LIBPATH. An 
  14008. Extended LIBPATH is a path which is searched in conjunction with the system 
  14009. LIBPATH, but which can be changed dynamically, either by the user from the 
  14010. command line, or by an application. 
  14011.  
  14012. There are two Extended LIBPATHs: BeginLIBPATH, which is searched before the 
  14013. system LIBPATH, and EndLIBPATH, which is searched after the system LIBPATH. 
  14014.  
  14015. Extended LIBPATHs are ASCIIZ strings which are formatted in the same manner as 
  14016. the system LIBPATH, that is, they contains a list of subdirectory paths 
  14017. separated by semicolons. The maximum size for each Extended LIBPATH is 1024 
  14018. characters. 
  14019.  
  14020. Applications can use DosSetExtLIBPATH to set the Extended LIBPATHs.  Likewise, 
  14021. they can use DosQueryExtLIBPATH to query the value of either of the Extended 
  14022. LIBPATHs. A flag parameter for the function specifies whether the BeginLIBPATH 
  14023. or the EndLIBPATH is being set or queried. The flag allows two values: 
  14024. BEGIN_LIBPATH (1) which will set or query BeginLIBPATH, or END_LIBPATH (2) 
  14025. which will set or query EndLIBPATH. 
  14026.  
  14027. You can call DosSetExtLIBPATH as often as you want. The new Extended LIBPATH 
  14028. that you pass in will replace the current Extended LIBPATH. 
  14029.  
  14030. You can specify the current Extended LIBPATH as part of the argument by using 
  14031. the % symbol before and after the Extended LIBPATH variable name, that is, as 
  14032. %BeginLIBPATH% or %EndLIBPATH%. For example, suppose you set BeginLIBPATH to 
  14033. "D:\MYDLLS", then later you want to add "D:\TOMSDLLS" before the existing 
  14034. BeginLIBPATH, and "D:\JOESDLLS" after the existing BeginLIBPATH (that is, you 
  14035. want to change BeginLIBPATH to "D:\TOMSDLLS;D:\MYDLLS;D:\JOESDLLS"). You could 
  14036. accomplish this by using "D:\TOMSDLLS;%BeginLIBPATH%;D:\JOESDLLS" as the 
  14037. argument for DosSetExtLIBPATH. 
  14038.  
  14039. The string argument can be up to 1024 characters long. However, if the 
  14040. resulting Extended LIBPATH is longer than 1024 characters, the function will 
  14041. return an error. 
  14042.  
  14043.  
  14044. ΓòÉΓòÉΓòÉ 9.3.12. Devices ΓòÉΓòÉΓòÉ
  14045.  
  14046. OS/2 enables you to access peripheral devices using file system commands, and 
  14047. treat those devices as file streams of data. These devices include: 
  14048.  
  14049.  Character devices          COM, clock, console (keyboard and screen), screen, 
  14050.                             keyboard, printer, null, pointer, and mouse 
  14051.                             devices. 
  14052.  
  14053.  Standard I/O devices       Character devices automatically installed by OS/2 
  14054.                             and recognized by the file system as the standard 
  14055.                             input, standard output, and standard error devices. 
  14056.  
  14057.  Pseudocharacter devices    An application can attach a device name to a file 
  14058.                             system and use the file system as a pseudocharacter 
  14059.                             device (also called a single-file device). 
  14060.                             Attaching a device name to a file system allows an 
  14061.                             application to open the device associated with the 
  14062.                             file system as if it were a character device (for 
  14063.                             example, a serial port) and read from and write to 
  14064.                             the device by using DosRead and DosWrite. 
  14065.  
  14066.                             In addition, an application can use DosSetFilePtr 
  14067.                             and DosSetFileLocks with a pseudocharacter device. 
  14068.                             Also, pseudocharacter devices can be redirected. 
  14069.  
  14070.                             A file system that can be attached to a 
  14071.                             pseudocharacter device is typically associated with 
  14072.                             a single disk file or with a special storage 
  14073.                             device, such as a tape drive. The file system 
  14074.                             establishes a connection with the device and 
  14075.                             transfers requests and data between OS/2 and the 
  14076.                             device. The user perceives this file as a device 
  14077.                             name for a nonexistent device. 
  14078.  
  14079.                             This file is seen as a character device because the 
  14080.                             current drive and directory have no effect on the 
  14081.                             name. A pseudocharacter device name is an ASCII 
  14082.                             string with the name of an OS/2 file in the form: 
  14083.  
  14084.                                                             \DEV\DEV_NAME
  14085.  
  14086.                             The "\dev\" is a required part of the name, but 
  14087.                             there is no actual subdirectory named "\dev\". This 
  14088.                             just lets OS/2 know that it is a pseudocharacter 
  14089.                             device name. 
  14090.  
  14091.  Logical file devices       The hard disk or floppy disk drives, or the 
  14092.                             partitions on the hard disk or floppy disk drives. 
  14093.  
  14094.  
  14095. ΓòÉΓòÉΓòÉ 9.4. Using File Commands ΓòÉΓòÉΓòÉ
  14096.  
  14097. Files are accessed through the file system using file handles. File handles are 
  14098. returned by DosOpen when the file is opened and are used for all subsequent 
  14099. accesses to the file. Files can be be created, opened, read from, written to, 
  14100. closed, copied, moved, deleted, renamed, and locked. Files can be searched for 
  14101. based on a metacharacter pattern template. 
  14102.  
  14103. Each open file has a file pointer that indicates the current reading or writing 
  14104. location within the file. The file pointer moves automatically with each read 
  14105. or write operation on the file and can be moved manually by the application. 
  14106.  
  14107. The standard file handles-standard input, standard output, and standard 
  14108. error-provide redirectable input and output to applications. The standard file 
  14109. handles can be used to read input from the keyboard and write output to the 
  14110. display. Alternatively, they can be redirected to read input from and write 
  14111. output to a file. To an application reading and writing the standard file 
  14112. handles, there is no difference between the two. 
  14113.  
  14114. Note:  In the example code fragments that follow, error checking was left out 
  14115.        to conserve space. Applications should always check the return code that 
  14116.        the functions return. Control Program functions return an APIRET value. 
  14117.        A return code of 0 indicates success. If a non-zero value is returned, 
  14118.        an error occurred. 
  14119.  
  14120.  
  14121. ΓòÉΓòÉΓòÉ 9.4.1. Creating Files ΓòÉΓòÉΓòÉ
  14122.  
  14123. DosOpen is used to create files, which  are then read from or written to. To 
  14124. create a file, specify FILE_CREATE as the sixth argument in the call to the 
  14125. function. DosOpen then creates the file, if it does not already exist. If the 
  14126. file already exists, the function returns the error value FILE_EXISTED. 
  14127.  
  14128. The following code fragment shows how to use DosOpen to create the file 
  14129. NEWFILE.TXT: 
  14130.  
  14131.  
  14132. Uses
  14133.   Crt,Dos,Os2Def,Os2Base;
  14134.  
  14135. Var
  14136.   Hf       : HFILE;
  14137.   UlAction : ULONG;
  14138.   Ulrc     : APIRET;
  14139.  
  14140. Begin
  14141.  
  14142.   ulrc := DosOpen('NEWFILE.TXT',       (* Name of file to create and open *)
  14143.                   hf,                  (* Address of file handle          *)
  14144.                   ulAction,            (* Action taken                    *)
  14145.                   0,                   (* Size of new file                *)
  14146.                   FILE_NORMAL,         (* File attributes                 *)
  14147.                   FILE_CREATE,         (* Creates the file                *)
  14148.                   OPEN_ACCESS_WRITEONLY or
  14149.                   OPEN_SHARE_DENYNONE,
  14150.                   nil);                (* No extended attributes          *)
  14151.  
  14152. End.
  14153.  
  14154. In this example, DosOpen creates the file and opens it for writing only. Note 
  14155. that the sharing method chosen permits other processes to open the file for any 
  14156. access. The new file is empty (contains no data). 
  14157.  
  14158. When you use DosOpen to create (or replace) a file, you must specify the 
  14159. attributes the new file is to have. In the preceding example, this value is 
  14160. FILE_NORMAL, so the file is created as a normal file. Other possible file 
  14161. attributes include read-only and hidden, which correspond to FILE_READONLY and 
  14162. FILE_HIDDEN, respectively. The possible file attributes are: 
  14163.  
  14164.  File Attribute      Defined Constant 
  14165.  Normal file         FILE_NORMAL 
  14166.  Read-only file      FILE_READONLY 
  14167.  Hidden file         FILE_HIDDEN 
  14168.  System file         FILE_SYSTEM 
  14169.  Subdirectory        FILE_DIRECTORY 
  14170.  Archived file       FILE_ARCHIVED. 
  14171.  
  14172.  The file attribute affects how other processes access the file. For example, 
  14173.  if the file is read-only, no process can open the file for writing. There is 
  14174.  one exception-the process that creates the read-only file can write to it 
  14175.  immediately after creating it. After closing the file, however, the process 
  14176.  cannot reopen it for writing. 
  14177.  
  14178.  If you are creating a new file object (a new file or a replacement for an 
  14179.  existing one), you must specify the size of the new file in bytes. For 
  14180.  example, if you specify 256, the file size is 256 bytes. However, these 256 
  14181.  bytes are undefined. If the file being opened already exists, the file size 
  14182.  parameter is ignored. It is up to the application to write valid data to the 
  14183.  file. No matter what size you specify, the file pointer is set to point to the 
  14184.  beginning of the file so a subsequent call to DosWrite starts writing data at 
  14185.  the beginning of the file. 
  14186.  
  14187.  Extended attributes can be defined by an application when a file object is 
  14188.  created. An application can define an extended attribute for a file when the 
  14189.  file is created during a DosOpen call. 
  14190.  
  14191.  Applications can also control access to specific regions within a file by 
  14192.  calling DosSetFileLocks. 
  14193.  
  14194.  
  14195. ΓòÉΓòÉΓòÉ 9.4.2. Opening Files ΓòÉΓòÉΓòÉ
  14196.  
  14197. Before performing input or output operations on a file, you must open the file 
  14198. and obtain a file handle. You obtain a file handle by using DosOpen. This 
  14199. function opens the specified file and returns a file handle for it. DosOpen can 
  14200. also be used to create new  files. 
  14201.  
  14202. DosOpen establishes a connection betwee n a file object and an application. 
  14203. This connection is in the form of a 32-bit identifier called a file handle, 
  14204. which is used to refer to the file object and any information associated with 
  14205. it. DosOpen returns a handle that is used in other file system calls to gain 
  14206. access to the object. The file object can be a new file, an existing file, or a 
  14207. replacement for an existing file. It can also be a character device, a block 
  14208. device, or the client end of a named pipe. The type of object is determined by 
  14209. the file name you pass to DosOpen. 
  14210.  
  14211. Note:  If the object is a named pipe, it must be in a listening state for 
  14212.        DosOpen to be successful. 
  14213.  
  14214.  The following code fragment shows the use of DosOpen to: 
  14215.  
  14216.      Open the existing file SAMPLE.TXT for reading 
  14217.      Put the file handle into the hf variable 
  14218.  
  14219.  
  14220.   Uses
  14221.     Crt,Dos,Os2Def,Os2Base;
  14222.  
  14223.   Var
  14224.     Hf       : HFILE;
  14225.     UlAction : ULONG;
  14226.     Ulrc     : APIRET;
  14227.  
  14228.   Begin
  14229.  
  14230.     ulrc := DosOpen('SAMPLE.TXT',       (* Name of file to open      *)
  14231.                     hf,                 (* Address of file handle    *)
  14232.                     ulAction,           (* Action taken              *)
  14233.                     0,                  (* Size of file              *)
  14234.                     FILE_NORMAL,        (* File attribute            *)
  14235.                     FILE_OPEN,          (* Open the file             *)
  14236.                     OPEN_ACCESS_READONLY or
  14237.                     OPEN_SHARE_DENYNONE,
  14238.                     nil);      (* Extended attribute buffer *)
  14239.  
  14240.   End.
  14241.  
  14242.  If DosOpen successfully opens the file, it copies the file handle to the hf 
  14243.  variable and copies a value to the ulAction variable indicating what action 
  14244.  was taken (for example, FILE_EXISTED for "existing file opened"). A file size 
  14245.  is not needed to open an existing file, so the fourth argument is 0. The fifth 
  14246.  argument, FILE_NORMAL, specifies the normal file attribute. The sixth 
  14247.  argument, FILE_OPEN, directs DosOpen to open the file if it exists or return 
  14248.  an error if it does not exist. The seventh argument directs DosOpen to open 
  14249.  the file for reading only and enables other applications to open the file even 
  14250.  while the current application has it open. The final argument is a pointer to 
  14251.  a structure containing information on extended attributes. If the file has no 
  14252.  extended attributes, this argument must be nil. 
  14253.  
  14254.  DosOpen returns 0 if it successfully op ens the file. Applications use the 
  14255.  file handle in subsequent functions to read data from the file or to check the 
  14256.  status and other file characteristics. If DosOpen fails to open the file, it 
  14257.  returns an error value. 
  14258.  
  14259.  When you open a file you must specify whether you want to read from the file, 
  14260.  write to it, or both read and write. Also, since more than one application 
  14261.  might attempt to open the same file, you must also specify whether you want to 
  14262.  allow other processes to have access to the file while you have it open. A 
  14263.  file that is shared can be shared for reading only, writing only, or reading 
  14264.  and writing. A file that is not shared cannot be opened by another application 
  14265.  (or more than once by the first application) until it has been closed by the 
  14266.  first application. 
  14267.  
  14268.  An application defines its file access rights (that is, I/O it needs to 
  14269.  perform on a file) by setting the appropriate file access mode field in the 
  14270.  file open-mode parameter. An application accesses a file as: 
  14271.  
  14272.      Read-only 
  14273.      Write-only 
  14274.      Read/write 
  14275.  
  14276.  An application defines what I/O operations other processes can perform on a 
  14277.  file by setting the appropriate sharing mode field in the OpenMode parameter. 
  14278.  Other processes are granted: 
  14279.  
  14280.      Deny read/write access 
  14281.      Deny write access 
  14282.      Deny read access 
  14283.      Deny neither read or write access (deny none) 
  14284.  
  14285.  File sharing requires cooperation between the sharing processes. For example, 
  14286.  if process A calls DosOpen to open a file with Deny Write sharing and process 
  14287.  B calls DosOpen to open the same file with Read/Write access, the DosOpen call 
  14288.  made by process B fails. 
  14289.  
  14290.  You indicate whether or not you want to permit another application to access 
  14291.  your file by combining an OPEN_ACCESS_ value and an OPEN_SHARE_ value from the 
  14292.  following list: 
  14293.  
  14294.  File Access and Sharing Rights 
  14295.  
  14296.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14297.   ΓöéValue                         ΓöéMeaning                       Γöé
  14298.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14299.   ΓöéOPEN_ACCESS_READONLY          ΓöéOpen a file for reading.      Γöé
  14300.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14301.   ΓöéOPEN_ACCESS_WRITEONLY         ΓöéOpen a file for writing.      Γöé
  14302.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14303.   ΓöéOPEN_ACCESS_READWRITE         ΓöéOpen a file for reading and   Γöé
  14304.   Γöé                              Γöéwriting.                      Γöé
  14305.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14306.   ΓöéOPEN_SHARE_DENYREADWRITE      ΓöéOpen a file for exclusive use,Γöé
  14307.   Γöé                              Γöédenying other processes read  Γöé
  14308.   Γöé                              Γöéand write access.             Γöé
  14309.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14310.   ΓöéOPEN_SHARE_DENYWRITE          ΓöéDeny other processes write    Γöé
  14311.   Γöé                              Γöéaccess to a file.             Γöé
  14312.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14313.   ΓöéOPEN_SHARE_DENYREAD           ΓöéDeny other processes read     Γöé
  14314.   Γöé                              Γöéaccess to a file.             Γöé
  14315.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14316.   ΓöéOPEN_SHARE_DENYNONE           ΓöéOpen a file with no sharing   Γöé
  14317.   Γöé                              Γöérestrictions, granting read   Γöé
  14318.   Γöé                              Γöéand write access to all       Γöé
  14319.   Γöé                              Γöéprocesses.                    Γöé
  14320.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14321.  
  14322.  In general, you can combine any access method (read, write, or read and write) 
  14323.  with any sharing method (deny reading, deny writing, deny reading and writing, 
  14324.  or grant any access). Some combinations have to be handled carefully, however, 
  14325.  such as opening a file for writing without denying other processes access to 
  14326.  it. 
  14327.  
  14328.  Note:  For named pipes, the access and sharing modes must be consistent with 
  14329.         those specified by DosCreateNPipe. 
  14330.  
  14331.  Other characteristics of the file handle that can be set: 
  14332.  
  14333.  File Handle Characteristics 
  14334.  
  14335.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14336.   ΓöéFlag           ΓöéPurpose                       Γöé
  14337.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14338.   ΓöéInheritance    ΓöéHandle is inherited by a childΓöé
  14339.   Γöé               Γöéprocess created with          Γöé
  14340.   Γöé               ΓöéDosExecPgm, or is private to  Γöé
  14341.   Γöé               Γöéthe calling process.          Γöé
  14342.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14343.   ΓöéWrite-Through  ΓöéActual I/O for synchronous    Γöé
  14344.   Γöé               Γöéwrites is not guaranteed as   Γöé
  14345.   Γöé               Γöécomplete or is guaranteed as  Γöé
  14346.   Γöé               Γöécomplete before the write     Γöé
  14347.   Γöé               Γöéreturns.                      Γöé
  14348.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14349.   ΓöéFail-Errors    ΓöéMedia errors are reported by  Γöé
  14350.   Γöé               Γöéthe system critical error     Γöé
  14351.   Γöé               Γöéhandler, or by the            Γöé
  14352.   Γöé               Γöéapplication.                  Γöé
  14353.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14354.   ΓöéDASD           ΓöéThe file name parameter is theΓöé
  14355.   Γöé               Γöéname of a file or device      Γöé
  14356.   Γöé               Γöéopened in the normal way, or aΓöé
  14357.   Γöé               Γöédrive specification for a     Γöé
  14358.   Γöé               Γöéfixed disk or diskette drive. Γöé
  14359.   Γöé               ΓöéThe DASD flag can be set for  Γöé
  14360.   Γöé               Γöédirect access to an entire    Γöé
  14361.   Γöé               Γöédisk or diskette volume,      Γöé
  14362.   Γöé               Γöéindependent of the file       Γöé
  14363.   Γöé               Γöésystem. When the DASD flag is Γöé
  14364.   Γöé               Γöéset, the handle returned by   Γöé
  14365.   Γöé               ΓöéDosOpen represents the logicalΓöé
  14366.   Γöé               Γöévolume as a single file. To   Γöé
  14367.   Γöé               Γöéblock other processes from    Γöé
  14368.   Γöé               Γöéaccessing the logical volume, Γöé
  14369.   Γöé               Γöéa DosDevIOCtl Category 8,     Γöé
  14370.   Γöé               ΓöéFunction 0 call should be madeΓöé
  14371.   Γöé               Γöéusing the handle returned by  Γöé
  14372.   Γöé               ΓöéDosOpen. The DASD flag should Γöé
  14373.   Γöé               Γöébe set only by systems        Γöé
  14374.   Γöé               Γöéprograms, not by applications.Γöé
  14375.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14376.   ΓöéCache          ΓöéThe file system caches or doesΓöé
  14377.   Γöé               Γöénot cache data for I/O        Γöé
  14378.   Γöé               Γöéoperations on the file. This  Γöé
  14379.   Γöé               Γöéflag is advisory only.        Γöé
  14380.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14381.  
  14382.  See the DosOpen material in the Control Program Programming Reference for 
  14383.  details of these characteristics. 
  14384.  
  14385.  After an object has been opened, its file handle state flags can be queried by 
  14386.  calling DosQueryFHState and reset by calling DosSetFHState. See Determining 
  14387.  and Setting the State of a File or Device Handle for information on 
  14388.  determining the state of a file handle. 
  14389.  
  14390.  When a child process inherits a file handle, it also inherits the sharing and 
  14391.  access rights of the file. 
  14392.  
  14393.  You cannot use metacharacters (global file name characters; * and ?) in file 
  14394.  names you supply to DosOpen. 
  14395.  
  14396.  
  14397. ΓòÉΓòÉΓòÉ 9.4.3. Reading from Files ΓòÉΓòÉΓòÉ
  14398.  
  14399. Once you open a file or have a file handle, you can read from and write to the 
  14400. file by using DosRead and DosWrite. 
  14401.  
  14402. DosRead is called with a handle (obtained with DosOpen) for a file, pipe, or 
  14403. device. DosRead copies a specified number of bytes (up to the end of the file) 
  14404. from the file object to the buffer you specify. OS/2 returns, in a parameter, 
  14405. the number of bytes actually read (which might not be the same as the number of 
  14406. bytes requested because the end of the file might have been reached). 
  14407.  
  14408. To read from a file, you must open it for reading or for reading and writing. 
  14409.  
  14410. The following code fragment shows how to open the file named SAMPLE.TXT and 
  14411. read the first 512 bytes from it: 
  14412.  
  14413.  
  14414.  
  14415. Uses
  14416.   Crt,Dos,Os2Def,Os2Base;
  14417.  
  14418. Var
  14419.   Hf                             : HFILE;
  14420.   UlAction                       : ULONG;
  14421.   AbBuffer : Array[0..BUF_SIZE] of BYTE;
  14422.   CbRead                         : ULONG;
  14423.   Ulrc                           : APIRET;
  14424.  
  14425. Begin
  14426.  
  14427.   ulrc := DosOpen('SAMPLE.TXT',
  14428.                   hf,
  14429.                   ulAction,
  14430.                   0,
  14431.                   FILE_NORMAL,
  14432.                   FILE_OPEN,
  14433.                   OPEN_ACCESS_READONLY or
  14434.                   OPEN_SHARE_DENYNONE,
  14435.                   nil);
  14436.  
  14437.   If (NOT ulrc) Then Begin
  14438.     DosRead(hf,
  14439.             abBuffer,
  14440.             sizeof(abBuffer),
  14441.             cbRead);
  14442.  
  14443.     DosClose(hf);
  14444.   End;
  14445.  
  14446. End.
  14447.  
  14448. If the file does not have 512 bytes, DosRead reads to the end of the file and 
  14449. puts the number of bytes read in the cbRead variable. If the file pointer is 
  14450. already positioned at the end of the file when DosRead is called, the function 
  14451. puts a 0 in the cbRead variable. 
  14452.  
  14453.  
  14454. ΓòÉΓòÉΓòÉ 9.4.4. Writing to Files ΓòÉΓòÉΓòÉ
  14455.  
  14456. Once you open a file or have a file handle, you can read from and write to the 
  14457. file by using DosRead and DosWrite. 
  14458.  
  14459. DosWrite copies bytes from a buffer you specify to a file, device, or pipe. 
  14460.  
  14461. Calling DosWrite with a handle for a file, pipe, or device transfers the number 
  14462. of bytes specified from a buffer location to the object. The system returns, in 
  14463. a parameter, the number of bytes actually written (which in the case of a disk 
  14464. file might not be the same as the number requested because of insufficient disk 
  14465. space). 
  14466.  
  14467. To write to a file, you must first open it for writing or for reading and 
  14468. writing. 
  14469.  
  14470. The following code fragment shows how to open the file SAMPLE.TXT again and 
  14471. write 512 bytes to it: 
  14472.  
  14473.  
  14474.  
  14475. Uses
  14476.   Crt,Dos,Os2Def,Os2Base;
  14477.  
  14478. Var
  14479.   Hf                             : HFILE;
  14480.   UlAction                       : ULONG;
  14481.   AbBuffer : Array[0..BUF_SIZE] of BYTE;
  14482.   CbWritten                      : ULONG;
  14483.   Ulrc                           : APIRET;
  14484.  
  14485. Begin
  14486.  
  14487.   ulrc := DosOpen('SAMPLE.TXT',
  14488.                   hf,
  14489.                   ulAction,
  14490.                   0,
  14491.                   FILE_NORMAL,
  14492.                   FILE_CREATE,
  14493.                   OPEN_ACCESS_WRITEONLY or
  14494.                   OPEN_SHARE_DENYWRITE,
  14495.                   nil);
  14496.  
  14497.   If (NOT ulrc) Then Begin
  14498.     DosWrite(hf,
  14499.             abBuffer,
  14500.             sizeof(abBuffer),
  14501.             cbWritten);
  14502.  
  14503.     DosClose(hf);
  14504.   End;
  14505.  
  14506. End.
  14507.  
  14508. DosWrite writes the contents of the buffer to the file. If it fails to write 
  14509. 512 bytes (for example, if the disk is full), the function puts the number of 
  14510. bytes written in the cbWritten variable. The data is read and written exactly 
  14511. as given; the function does not format the data-that is, they do not convert 
  14512. binary data to decimal strings, or vice versa. 
  14513.  
  14514. The Write-Through Flag 
  14515. If an application requires data to be written in a specific order, setting the 
  14516. Write-Through flag to 1 guarantees that actual I/O for a synchronous write is 
  14517. completed before the DosWrite  returns. If this flag has been set with DosOpen 
  14518. for buffered I/O, and multiple synchronous writes are performed, the system 
  14519. cannot guarantee the actual order in which the data is written. For details on 
  14520. changing the state of the Write-Through flag, see Determining and Setting the 
  14521. State of a File or Device Handle. 
  14522.  
  14523.  
  14524. ΓòÉΓòÉΓòÉ 9.4.5. Moving the File Pointer ΓòÉΓòÉΓòÉ
  14525.  
  14526. Every disk file has a corresponding file pointer that marks the current 
  14527. location in the file. The current location is the byte in the file that will be 
  14528. read from or written to on the next call to DosRead or DosWrite. Usually, the 
  14529. file pointer is at the beginning of the file when you first open or create the 
  14530. file, and it advances as you read or write to the file. You can, however, 
  14531. change the position of the file pointer at any time by using DosSetFilePtr. 
  14532.  
  14533. DosSetFilePtr moves the file pointer a specified offset from a given position. 
  14534. You can move the pointer from the beginning of the file, from the end, or from 
  14535. the current position. 
  14536.  
  14537. The following code fragment shows how to move the pointer 200 bytes from the 
  14538. end of the file: 
  14539.  
  14540.  
  14541.  
  14542. Uses
  14543.   Crt,Dos,Os2Def,Os2Base;
  14544.  
  14545. Var
  14546.   AbBuf Array[0..BUF_SIZE] of BYTE;
  14547.   Hf                        : HFILE;
  14548.   UlRead                    : ULONG;
  14549.   ulWritten                 : ULONG;
  14550.   ulAction                  : ULONG;
  14551.   ulNewPtr                  : ULONG;
  14552.  
  14553. Begin
  14554.  
  14555.   DosOpen(╨½SAMPLE.TXT',
  14556.           hf,
  14557.           ulAction,
  14558.           0,
  14559.           FILE_NORMAL,
  14560.           FILE_OPEN,
  14561.           OPEN_ACCESS_READONLY or
  14562.           OPEN_SHARE_DENYNONE,
  14563.           nil);
  14564.  
  14565.   DosSetFilePtr(hf,
  14566.                 -200,
  14567.                 FILE_END,
  14568.                 ulNewPtr);
  14569.  
  14570.   DosRead(hf,
  14571.           abBuf,
  14572.           sizeof(abBuf),
  14573.           ulRead);
  14574.  
  14575.   DosWrite(HF_STDOUT,
  14576.            abBuf,
  14577.            ulRead,
  14578.            ulWritten);
  14579. End.
  14580.  
  14581. In this example, DosSetFilePtr moves the file pointer to the 200th byte from 
  14582. the end of the file. If the file is not that long, the function moves the 
  14583. pointer to the first byte in the file and returns the actual position (relative 
  14584. to the end of the file) in the ulNewPtr variable. 
  14585.  
  14586. You can move the file pointer for disk files only. You cannot use DosSetFilePtr 
  14587. on devices, despite using other file functions (DosOpen, DosRead) to access a 
  14588. device. 
  14589.  
  14590. If a file is read-only, write operations to the file will not be performed. 
  14591.  
  14592. Moving the pointer from the end of the file can be used to determine the size 
  14593. of the file. 
  14594.  
  14595.  
  14596. ΓòÉΓòÉΓòÉ 9.4.6. Closing Files ΓòÉΓòÉΓòÉ
  14597.  
  14598. You can close a file by using DosClose. Since each application has a limited 
  14599. number of file handles that can be open at one time, it is a good practice to 
  14600. close a file after using it. 
  14601.  
  14602. To do so, supply the file handle in DosClose, as shown in the following code 
  14603. fragment: 
  14604.  
  14605.  
  14606.  
  14607. Uses
  14608.   Crt,Dos,Os2Def,Os2Base;
  14609.  
  14610. Var
  14611.   Hf                           : HFILE;
  14612.   UlAction                     : ULONG;
  14613.   AbBuffer Array[0..BUF_SIZE] of BYTE;
  14614.   UlRead                       : ULONG;
  14615.   Ulrc                         : APIRET;
  14616.  
  14617. Begin
  14618.  
  14619.   ulrc := DosOpen('SAMPLE.TXT',
  14620.                   hf,
  14621.                   ulAction,
  14622.                   0,
  14623.                   FILE_NORMAL,
  14624.                   FILE_OPEN,
  14625.                   OPEN_ACCESS_READONLY or
  14626.                   OPEN_SHARE_DENYNONE,
  14627.                   nil);
  14628.  
  14629.   If (NOT ulrc) Then Begin
  14630.     DosRead(hf,
  14631.             abBuffer,
  14632.             sizeof(abBuffer),
  14633.             ulRead);
  14634.  
  14635.     DosClose(hf);
  14636.   End;
  14637.  
  14638. End.
  14639.  
  14640. If you open a file for writing, DosClose directs the system to flush the file 
  14641. buffer-that is, to write any existing data in OS/2's intermediate file buffer 
  14642. to the disk or device. The system keeps these intermediate file buffers to make 
  14643. file input and output more efficient. For example, it saves data from previous 
  14644. calls to DosWrite until a certain number of bytes are in the buffer then writes 
  14645. the contents of the buffer to the disk. 
  14646.  
  14647. DosClose  also closes the handle to the file (or pipe, or device). If one or 
  14648. more additional handles to a file have been created with DosDupHandle , the 
  14649. internal buffers for the file are not written to disk, and its directory entry 
  14650. is not updated, until DosClose has been called for all the handles. 
  14651.  
  14652.  
  14653. ΓòÉΓòÉΓòÉ 9.4.7. Creating Duplicate File or Device Handles ΓòÉΓòÉΓòÉ
  14654.  
  14655. DosDupHandle enables a process to create a duplicate handle for an open file, 
  14656. pipe, or device. 
  14657.  
  14658. The value for the old-file-handle parameter is the handle of an open file, a 
  14659. pipe, or a device. The valid values for the new-file-handle parameter include 
  14660. FFFFH, 0000H (standard input), 0001H (standard output), and 0002H (standard 
  14661. error). Any value other than FFFFH is assumed to be the value of the new file 
  14662. handle. 
  14663.  
  14664. A value of FFFFH causes the system to allocate a new file handle and send it to 
  14665. this location. If the value specified for the new-file-handle parameter is that 
  14666. of a currently open file, the file handle is closed before it is redefined. 
  14667.  
  14668. An agreed upon value for a duplicate file handle can be established between a 
  14669. parent process and a child process. Avoid choosing arbitrary values for the new 
  14670. file handle. 
  14671.  
  14672. The duplicate handle acquires the characteristics of the original. If you move 
  14673. the read/write pointer of the original file handle, for example by calling 
  14674. DosRead, DosWrite, or DosSetFilePtr , the pointer of the duplicate handle is 
  14675. also moved. If the original handle has access to regions in a file that have 
  14676. been locked by DosSetFileLocks , the duplicate also has access. 
  14677.  
  14678. If inheritance was indicated when a file was opened with DosOpen, a parent 
  14679. process can create a duplicate handle for the file and pass it to a child 
  14680. process by means of shared memory. This permits the child to close the 
  14681. duplicate handle without affecting the file handle of the parent. 
  14682.  
  14683. Because a parent process controls the meanings for standard I/O done by any 
  14684. child process it creates, the parent can use DosDupHandle to redefine unnamed 
  14685. pipe handles as standard I/O handles to communicate with a child. The steps 
  14686. involved are: 
  14687.  
  14688.      The parent process creates two pipes and duplicates the read handle of 
  14689.       one pipe as 0000 and the write handle of the other pipe as 0001. 
  14690.  
  14691.      When the child process performs standard I/O, instead of reading from the 
  14692.       keyboard and writing to the display, it reads from and writes to the 
  14693.       pipes created by its parent. 
  14694.  
  14695.      As the owner of the pipe, the parent process uses its read and write 
  14696.       handles to write to the pipe defined to the child as standard input and 
  14697.       read from the pipe defined to the child as standard output. 
  14698.  
  14699.  
  14700. ΓòÉΓòÉΓòÉ 9.4.8. Determining and Setting the State of a File or Device Handle ΓòÉΓòÉΓòÉ
  14701.  
  14702. After a file has been opened, the file handle state flags set with a DosOpen 
  14703. can be queried and reset by calling DosQueryFHState and DosSetFHState . The 
  14704. handle returned by DosSetFHState is used for subsequent input and output to the 
  14705. file. 
  14706.  
  14707. The following code fragment calls DosSetFHState to set the File Write-Through 
  14708. flag for an opened file. Writes to the file may go through the file system 
  14709. buffer, but the sectors are to be written before any synchronous write call 
  14710. returns. DosQueryFHState is called first to obtain the file handle state bits. 
  14711. Assume that the appropriate file handle has been placed into FileHandle 
  14712. already. 
  14713.  
  14714.  
  14715. Uses
  14716.   Crt,Dos,Os2Def,Os2Base;
  14717.  
  14718. Var
  14719.   HfFileHandle      : HFILE;  (* File handle        *)
  14720.   UlFileHandleState : ULONG;  (* File handle state  *)
  14721.   Ulrc              : APIRET; (* Return code        *)
  14722.  
  14723. Begin
  14724.  
  14725.   ulrc := DosQueryFHState(hfFileHandle,
  14726.                           FileHandleState);
  14727.  
  14728.   If (ulrc <> 0) Then Begin
  14729.     Write('DosQueryFHState error: return code = ', ulrc);
  14730.     Halt;
  14731.   End;
  14732.  
  14733.   ulFileHandleState := UlFileHandleState OR OPEN_FLAGS_WRITE_THROUGH;
  14734.  
  14735.   ulrc := DosSetFHState(hfFileHandle,
  14736.                         ulFileHandleState);
  14737.  
  14738.   If (ulrc <> 0) Then Begin
  14739.     Write('DosSetFHState error: return code = ', ulrc);
  14740.     Halt;
  14741.   End;
  14742.  
  14743. End.
  14744.  
  14745. Here are two scenarios involving the use of this function. 
  14746.  
  14747.      An application requires that data be written in a specific order. To 
  14748.       guarantee the order of the data written, it must perform separate 
  14749.       synchronous write operations. The application can call DosSetFHState to 
  14750.       set the Write-Through flag for the file. This action does not affect any 
  14751.       previous asynchronous writes, whose data can remain in the buffers. 
  14752.  
  14753.      An application cannot handle a certain critical error situation. 
  14754.       DosSetFHState can be called to reset critica l error handling as OS/2's 
  14755.       responsibility. The I/O function that caused the critical error must be 
  14756.       called again so the error can recur, causing control to be passed to 
  14757.       OS/2. In the case where asynchronous I/O is being done, the precise time 
  14758.       the results of this function will be available to the application is 
  14759.       unpredictable. 
  14760.  
  14761.  
  14762. ΓòÉΓòÉΓòÉ 9.4.9. Determining the Handle Type ΓòÉΓòÉΓòÉ
  14763.  
  14764. DosQueryHType enables an application to determine whether a handle is to a 
  14765. file, a pipe, or a device. This function can be used when a file-oriented 
  14766. application needs to modify its behavior, depending on the source of its input. 
  14767. For example, CMD.EXE suppresses writing prompts when its input is from a disk 
  14768. file. 
  14769.  
  14770. The following code fragment determines whether a given file handle refers to a 
  14771. file or a device. Assume that the desired file handle has been placed into 
  14772. FileHandle already. 
  14773.  
  14774. Uses
  14775.   Crt,Dos,Os2Def,Os2Base;
  14776.  
  14777. Var
  14778.   HfFileHandle : HFILE;  (* File handle                        *)
  14779.   UlHandType   : ULONG;  (* Handle type (returned)             *)
  14780.   UlFlagWord   : ULONG;  (* Device driver attribute (returned) *)
  14781.   Ulrc         : APIRET; (* Return code                        *)
  14782.  
  14783. Begin
  14784.  
  14785.   ulrc := DosQueryHType(hfFileHandle,
  14786.                         ulHandType,
  14787.                         ulFlagWord);
  14788.  
  14789.   If (ulrc <> 0) Then Begin
  14790.     Write('DosQueryHType error: return code = ', ulrc);
  14791.     return;
  14792.   End;
  14793.  
  14794. End.
  14795.  
  14796. In the preceding example, DosQueryHType returns a value that characterizes the 
  14797. type of file handle, and the associated device driver attribute word, if the 
  14798. handle type indicates that the file handle is associated with a local character 
  14799. device. 
  14800.  
  14801.  
  14802. ΓòÉΓòÉΓòÉ 9.4.10. Searching for Files ΓòÉΓòÉΓòÉ
  14803.  
  14804. You can locate files with names that match a given pattern by using 
  14805. metacharacters in DosFindFirst and DosFindNext . 
  14806.  
  14807. DosFindFirst searches the current directory  and locates the first file name 
  14808. that matches the given pattern. DosFindNext locates the next matching file 
  14809. name and continues to find additional matches on each subsequent call until all 
  14810. matching names are found. The functions copy the file statistics on each file 
  14811. located to a data structure that you supply. The file information returned by a 
  14812. search includes file dates and times, length of data in the file, file size, 
  14813. file attributes, and file name. 
  14814.  
  14815. To find all files that match the file specification, call DosFindNext 
  14816. repeatedly until the message ERROR_NO_MORE_FILES is returned. Then call 
  14817. DosFindClose to close the directory handle. 
  14818.  
  14819. The following code fragment shows how to find all file names that have the 
  14820. extension ".C": 
  14821.  
  14822.  
  14823. Uses
  14824.   Crt,Dos,Os2Def,Os2Base;
  14825.  
  14826. Var
  14827.   HdHdir      : HDIR;
  14828.   UlFilenames : ULONG;
  14829.   ffbFindBuf  : FILEFINDBUF3;
  14830.   Ulrc        : APIRET;
  14831.  
  14832. Begin
  14833.  
  14834.   ulFilenames := 1;
  14835.   hdHdir      := HDIR_SYSTEM;
  14836.  
  14837.   ulrc := DosFindFirst('*.C',
  14838.                        hdHdir,            (* Directory handle                     *)
  14839.                        FILE_NORMAL,        (* File attribute to look for           *)
  14840.                        ffbFindBuf,        (* Result buffer                        *)
  14841.                        sizeof(ffbFindBuf), (* Size of result buffer                *)
  14842.                        ulFilenames,       (* Number of matching names to look for *)
  14843.                        FIL_STANDARD);      (* Standard level of information        *)
  14844.  
  14845.   If (NOT ulrc) Then Begin
  14846.     Repeat
  14847.       .
  14848.       .     (* Use file name in findbuf.achName *)
  14849.       .
  14850.       ulrc := DosFindNext(hdHdir,
  14851.                           ffbFindBuf,
  14852.                           sizeof(ffbFindBuf),
  14853.                           ulFilenames);
  14854.     Until ulrc = 0;
  14855.   End;
  14856.   DosFindClose(hdHdir);
  14857. End.
  14858.  
  14859. In this example, DosFindNext continues to retrieve matching file names until it 
  14860. returns an error value (it returns ERROR_NO_MORE_FILES when it cannot find any 
  14861. more matching files). 
  14862.  
  14863. To keep track of which files have already been found, both functions use the 
  14864. directory handle, hdir. 
  14865.  
  14866. This directory handle must be set to HDIR_SYSTEM or HDIR_CREATE before the call 
  14867. to DosFindFirst. HDIR_SYSTEM (00000001H) tells OS/2 to use the system handle 
  14868. for standard output, which is always available to the requesting process. 
  14869. HDIR_CREATE (FFFFFFFFH) tells OS/2 to allocate a new, unused handle. 
  14870.  
  14871. The directory handle returned by DosFindFirst must be used in subsequent calls 
  14872. to DosFindNext ; it identifies for DosFindNext the name of the file being 
  14873. sought and the current position in the directory. 
  14874.  
  14875. An attribute parameter for DosFindFirst allows hidden and system files, as well 
  14876. as normal files, to be included in searches. 
  14877.  
  14878. After locating the files you need, use DosFindClose to close the directory 
  14879. handle. This ensures that when you search for the same files again, you will 
  14880. start at the beginning of the directory. After DosFindClose is called, a 
  14881. subsequent DosFindNext fails. 
  14882.  
  14883.  
  14884. ΓòÉΓòÉΓòÉ 9.4.11. Searching Paths for Files ΓòÉΓòÉΓòÉ
  14885.  
  14886. DosSearchPath searches directory paths for t he name of a file object. The file 
  14887. specification can include metacharacters (global file name characters). 
  14888.  
  14889. The path string used in the search consists of directory paths separated by 
  14890. semicolons. The caller can supply the path string, or it can supply the name of 
  14891. an environment variable whose value is the path string to be searched. The 
  14892. caller can request that the current working directory be searched before the 
  14893. path string is searched. 
  14894.  
  14895. If the caller specifies an environment variable, DosSearchPath uses DosScanEnv 
  14896. to find the path string. DosScanEnv searches the environment segme nt for an 
  14897. environment variable name; for example, DPATH. The result pointer points to the 
  14898. string that is the value of the environment variable. The call to DosScanEnv 
  14899. can be made direct ly by the application, or it can be invoked by 
  14900. DosSearchPath. 
  14901.  
  14902. If the file is found, its full path name is returned, with metacharacters left 
  14903. in place. The results might not be meaningful if a buffer overflow occurs. 
  14904.  
  14905. As an example, assume that a string such as the following exists in the 
  14906. environment: 
  14907.  
  14908.     DPATH=C:\SYSDIR;C:\INIT
  14909.  
  14910. The following code fragment illustrates a method for searching directory paths 
  14911. to find a file. 
  14912.  
  14913. Uses
  14914.   Crt,Dos,Os2Def,Os2Base;
  14915.  
  14916. Var
  14917.   PszPathRef                                : PSZ;
  14918.   AchResultBuffer : Array[0..ResultBufLen] of UCHAR;
  14919.   PszFile                                   : PSZ;
  14920.  
  14921. Begin
  14922.   PszPathRef := '';
  14923.   PszFile    := 'OS2.INI';
  14924.  
  14925.   DosScanEnv('DPATH',
  14926.              pszPathRef);
  14927.  
  14928.   DosSearchPath(0,                   (* Path source bit=0 *)
  14929.                 pszPathRef,
  14930.                 pszFile,
  14931.                 achResultBuffer,
  14932.                 ResultBufLen);
  14933.  
  14934.   Writeln('Result 1: ', achResultBuffer);
  14935.  
  14936.   DosSearchPath(2,                   (* Path source bit=1 *)
  14937.                 'DPATH',
  14938.                 pszFile,
  14939.                 achResultBuffer,
  14940.                 ResultBufLen);
  14941.  
  14942.   Writeln('Result 2: ', achResultBuffer);
  14943.  
  14944.   Halt;
  14945.  
  14946. End.
  14947.  
  14948.  
  14949. ΓòÉΓòÉΓòÉ 9.5. Specifying Extended LIBPATHs ΓòÉΓòÉΓòÉ
  14950.  
  14951. An Extended LIBPATH is a path which is searched in conjunction with the system 
  14952. LIBPATH, but which can be changed dynamically, either by the user from the 
  14953. command line, or by an application. There are two Extended LIBPATHs: 
  14954. BeginLIBPATH, which is searched before the system LIBPATH, and EndLIBPATH, 
  14955. which is searched after the system LIBPATH. 
  14956.  
  14957. Applications can use DosSetExtLIBPATH to set the Extended LIBPATHs.  Likewise, 
  14958. they can use DosQueryExtLIBPATH to query the value of either of the Extended 
  14959. LIBPATHs. A flag parameter for the function specifies whether the BeginLIBPATH 
  14960. or the EndLIBPATH is being set or queried. The flag allows two values: 
  14961. BEGIN_LIBPATH (1) which will set or query BeginLIBPATH, or END_LIBPATH (2) 
  14962. which will set or query EndLIBPATH. 
  14963.  
  14964. Extended LIBPATHs are ASCIIZ strings which are formatted in the same manner as 
  14965. the system LIBPATH, that is, they contains a list of subdirectory paths 
  14966. separated by semicolons. The string argument can be up to 1024 characters and 
  14967. will return an error if longer. 
  14968.  
  14969. The following example updates the path to be searched before the system 
  14970. LIBPATH, then queries and displays the value. 
  14971.  
  14972.  
  14973. Uses
  14974.   Crt,Dos,Os2Def,Os2Base;
  14975.  
  14976. Var
  14977.   UchBeginLIBPATH : Array[0..1023] of UCHAR;  (* Begin LIBPATH value returned *)
  14978.   Ulrc                              : APIRET; (* Return code                  *)
  14979.  
  14980. Begin
  14981.   Ulrc := NO_ERROR;
  14982.  
  14983.   StrCopy(UchBeginLIBPATH,'');
  14984.  
  14985.   ulrc := DosSetExtLIBPATH('C:\TOOL_X\VERS_20\DLL',
  14986.                            BEGIN_LIBPATH);    (* Add to beginning LIBPATH *)
  14987.  
  14988.   If (ulrc <> NO_ERROR) Then Begin
  14989.     Writeln('DosSetExtLIBPATH error: return code = ', ulrc);
  14990.     Exit;
  14991.   End;
  14992.  
  14993.   ulrc := DosQueryExtLIBPATH(uchBeginLIBPATH,
  14994.                              BEGIN_LIBPATH);   (* Query the BeginLIBPATH *)
  14995.  
  14996.   If (ulrc <> NO_ERROR) Then Begin
  14997.     Writeln('DosQueryExtLIBPATH error: return code = ', ulrc);
  14998.     Exit;
  14999.   End;
  15000.  
  15001.   Writeln(' BeginLIBPATH := ', uchBeginLIBPATH);
  15002.  
  15003. End.
  15004.  
  15005.  
  15006. ΓòÉΓòÉΓòÉ 9.6. Standard File Handles ΓòÉΓòÉΓòÉ
  15007.  
  15008. Every application, when it first starts, has three input and output file 
  15009. handles available to use. These file handles, called the standard input, 
  15010. standard output, and standard error files, enable the application to read input 
  15011. from the keyboard and display output on the screen without opening or preparing 
  15012. the keyboard or screen. 
  15013.  
  15014.  
  15015. ΓòÉΓòÉΓòÉ 9.6.1. Standard Input, Output, and Error File Handles ΓòÉΓòÉΓòÉ
  15016.  
  15017. As OS/2 starts an application, it automatically opens the three standard files 
  15018. and makes the file handles-numbered 0, 1, and 2-available to the application. 
  15019. Applications can read from and write to the standard files as soon as they 
  15020. start. 
  15021.  
  15022. Standard Input 
  15023. File handle 0 is the standard input file. This handle can be used to read 
  15024. characters from the keyboard with DosRead. The function reads the specified 
  15025. number of characters unless the user types a turnaround character-that is, a 
  15026. character that marks the end of a line (the default turnaround character is a 
  15027. carriage-return/linefeed character pair). 
  15028.  
  15029. As DosRead reads the characters, it copies them to the buffer you have 
  15030. supplied, as shown in the code fragment below. 
  15031.  
  15032. In this example, DosRead copies the number of characters read from standard 
  15033. input to to variable cbRead. DosRead also copies the turnaround character, or 
  15034. characters, to the buffer If the function reads fewer than 80 characters, the 
  15035. turnaround character is the last one in the buffer. 
  15036.  
  15037. Standard Output 
  15038. File handle 1 is the standard output file. This handle can be used to write 
  15039. characters on the screen with DosWrite. The function writes the characters in 
  15040. the given buffer to the current line. If you want to start a new line, you must 
  15041. place the current turnaround character in the buffer. 
  15042.  
  15043. The code fragment below: 
  15044.  
  15045.      Displays a prompt 
  15046.      Reads a string 
  15047.      Displays the string 
  15048.  
  15049.   Uses
  15050.     Crt,Dos,Os2Def,Os2Base;
  15051.  
  15052.   Var
  15053.     UlWritten  : ULONG;
  15054.     ulRead     : ULONG;
  15055.     AbBuffer : Array[0..BUF_SIZE] of BYTE;
  15056.  
  15057.   Begin
  15058.  
  15059.   @error@    static UCHAR ucEnterName[] := 'Enter a name: ';
  15060.  
  15061.     DosWrite(HF_STDOUT,
  15062.              ucEnterName,
  15063.              sizeof(ucEnterName),
  15064.              ulWritten);
  15065.  
  15066.     DosRead(HF_STDIN,
  15067.             abBuffer,
  15068.             sizeof(abBuffer),
  15069.             ulRead);
  15070.  
  15071.     DosWrite(HF_STDOUT,
  15072.              abBuffer,
  15073.              ulRead,
  15074.              ulWritten);
  15075.  
  15076.   End.
  15077.  
  15078.  Standard Error 
  15079.  File handle 2 is the standard error file. This handle, like the standard 
  15080.  output handle, enables applications to write characters on the screen. Most 
  15081.  applications use the standard error file to display error messages, enabling 
  15082.  the application to redirect standard output to a file without also redirecting 
  15083.  error messages to the file. 
  15084.  
  15085.  
  15086. ΓòÉΓòÉΓòÉ 9.6.2. Redirecting Standard File Handles ΓòÉΓòÉΓòÉ
  15087.  
  15088. The standard input, standard output, and standard error files are usually the 
  15089. keyboard and screen, but not always. For example, if you redirect standard 
  15090. output by using the greater-than (>) redirection symbol on the application's 
  15091. command line, all data written to the standard output file goes to the given 
  15092. file. 
  15093.  
  15094. The following command line redirects standard output to the file SAMPLE.TXT and 
  15095. redirects error messages to the file SAMPLE.ERR: 
  15096.  
  15097.     type startup.cmd >sample.txt 2>sample.err
  15098. When a standard file is redirected, its handle is still available but 
  15099. corresponds to the given disk file instead of to the keyboard or screen. You 
  15100. can still use DosRead and DosWrite to read from and write to the files. 
  15101.  
  15102. You can use DosDupHandle to redirect a standard file from inside your 
  15103. application. If you duplicate the standard input file handle, your application 
  15104. reads from the specified file rather than from the keyboard. Duplicating the 
  15105. standard output file handle causes output to be directed to a file or device 
  15106. instead of to the standard output device. 
  15107.  
  15108. The following code fragment shows how to use the standard input handle to read 
  15109. from a file: 
  15110.  
  15111. Uses
  15112.   Crt,Dos,Os2Def,Os2Base;
  15113.  
  15114. Var
  15115.   AbBuffer Array[0..BUF_SIZE] of BYTE;
  15116.   Hf                           : HFILE;
  15117.   hfNew                        : HFILE;
  15118.   UlRead                       : ULONG;
  15119.   UlWritten                    : ULONG;
  15120.   UlAction                     : ULONG;
  15121.   Ulrc                         : APIRET;
  15122.  
  15123. Begin
  15124.  
  15125.   ulrc := DosOpen('SAMPLE.C',
  15126.                   hf,
  15127.                   ulAction,
  15128.                   0,
  15129.                   FILE_NORMAL,
  15130.                   FILE_OPEN,
  15131.                   OPEN_ACCESS_READONLY OR
  15132.                   OPEN_SHARE_DENYNONE,
  15133.                   nil);
  15134.  
  15135.   If (NOT ulrc) Then Begin
  15136.  
  15137.     hfNew := 0;      (* Duplicates standard input *)
  15138.  
  15139.     DosDupHandle(hf,
  15140.                  hfNew);
  15141.  
  15142.     DosRead(HF_STDIN,
  15143.             abBuffer,
  15144.             sizeof(abBuffer),
  15145.             ulRead);
  15146.  
  15147.     DosWrite(HF_STDOUT,
  15148.              abBuffer,
  15149.              ulRead,
  15150.              ulWritten);
  15151.    End;
  15152.  
  15153. End.
  15154.  
  15155.  
  15156. ΓòÉΓòÉΓòÉ 10. File Names ΓòÉΓòÉΓòÉ
  15157.  
  15158. File names are the identifiers used by the file system to uniquely identify 
  15159. files on a disk. All file systems have specific rules for constructing names of 
  15160. file objects. Different file systems can have different rules for naming file 
  15161. objects. 
  15162.  
  15163. The OS/2 FAT file system supports the DOS naming conventions. The OS/2 High 
  15164. Performance File System (HPFS) supports a superset of the DOS naming 
  15165. conventions, allowing for long file names and characters illegal under DOS. 
  15166. Although different file systems can have different rules for naming file 
  15167. objects, all OS/2 file systems require that full path names consist of 
  15168. directory and file names separated by backslashes (\). 
  15169.  
  15170. The OS/2 operating system views path names as ASCII strings and does not 
  15171. restrict file systems to the DOS file name format. Compatibility with existing 
  15172. DOS applications requires that all installable file systems support a superset 
  15173. of the 8.3 file name format used in the FAT file system. 
  15174.  
  15175. The following topics are related to the information in this chapter: 
  15176.  
  15177.      File Systems 
  15178.      File Management 
  15179.      Extended Attributes 
  15180.      Device I/O 
  15181.  
  15182.  
  15183. ΓòÉΓòÉΓòÉ 10.1. File-Naming Conventions ΓòÉΓòÉΓòÉ
  15184.  
  15185. File name conventions are the rules used to form file names in a given file 
  15186. system. Although each installable file system (IFS) can have specific rules 
  15187. about how individual components in a directory or file name are formed, all 
  15188. file systems follow the same general conventions for combining components. For 
  15189. example, although the FAT file system requires that file and directory names 
  15190. have the 8.3 file name format, and HPFS supports names of up to 255 characters 
  15191. long, both file systems use the backslash (\) character to separate directory 
  15192. names and the file name when forming a path. 
  15193.  
  15194. When creating names for directories and files, or when processing names 
  15195. supplied by the user, an application must follow these general rules: 
  15196.  
  15197.      Process a path as a nil-terminated string. An application can determine 
  15198.       maximum length for a path by using DosQuerySysInfo. 
  15199.  
  15200.      Use any character in the current code page for a name, but do not use a 
  15201.       path separator, a character in the range 0 through 31, or any character 
  15202.       explicitly prohibited by the file system. 
  15203.  
  15204.       The following characters are reserved by the operating system. Do not use 
  15205.       them in directory or file names. 
  15206.  
  15207.                 <   >   :   "   /   \   |
  15208.  
  15209.       Although a name can contain characters in the extended character set (128 
  15210.       - 255), an application must be able to switch code pages if necessary to 
  15211.       access the corresponding file. 
  15212.  
  15213.      Compare names without regard to case. Names such as "ABC", "Abc", and 
  15214.       "abc" are considered to be the same. 
  15215.  
  15216.      Use the backslash (\) or the forward slash (/) to separate components in 
  15217.       a path. No other character is accepted as a path separator. 
  15218.  
  15219.      Use the dot (.) as a directory component in a path to represent the 
  15220.       current directory. 
  15221.  
  15222.      Use two dots (..) as a directory component in a path to represent the 
  15223.       parent of the current directory. 
  15224.  
  15225.      Use a period (.) to separate components in a directory name or file name. 
  15226.       Unless explicitly defined by a file system, no restrictions are placed on 
  15227.       the number of components in a name. 
  15228.  
  15229.  
  15230. ΓòÉΓòÉΓòÉ 10.1.1. File Names in the FAT File System ΓòÉΓòÉΓòÉ
  15231.  
  15232. Valid file names in the OS/2 FAT file system have the following form: 
  15233.  
  15234.     [drive:][directory\]filename[extension]
  15235.  
  15236. The drive parameter must name an existing drive and can be any letter from A 
  15237. through Z. The drive letter must be followed by a colon (:). 
  15238.  
  15239. The directory parameter specifies the directory that contains the file's 
  15240. directory entry. The directory name must be followed by a backslash (\) to 
  15241. separate it from the file name. If the specified directory is not the current 
  15242. directory, directory must include the names of all the directories in the path, 
  15243. separated by backslashes. The root directory is specified by using a backslash 
  15244. at the beginning of the name. 
  15245.  
  15246. For example, if the directory ABC is in the directory SAMPLE, and SAMPLE is in 
  15247. the root directory, the directory specification is: 
  15248.  
  15249.     \SAMPLE\ABC.
  15250.  
  15251. A directory name can also have an extension, which is any combination of up to 
  15252. three letters, digits, or special characters, preceded by a period (.). 
  15253.  
  15254. The filename and extension parameters specify the file. 
  15255.  
  15256. FAT File-Naming Rules 
  15257. For file objects managed by the FAT file system, the following rules apply: 
  15258.  
  15259.      File names are limited to 8 characters before and three characters after 
  15260.       a single dot. This is referred to as the 8.3 file name format. 
  15261.  
  15262.       The 8 characters before the dot are blank-filled. Embedded blanks are 
  15263.       significant, trailing blanks and blanks immediately preceding the dot are 
  15264.       not significant. Trailing blanks are truncated. 
  15265.  
  15266.       For example, "FILE.A" is really "FILE   .A  ". "FILE.A" and "FILE   .A  " 
  15267.       are treated as the same file by the operating system and refer to the 
  15268.       same file. Also, "FILE.TXT  " and "FILE.TXT" are treated as the same 
  15269.       file. 
  15270.  
  15271.       Blanks elsewhere in the name are significant-"F I L E.TXT" is not the 
  15272.       same as "FILE.TXT". 
  15273.  
  15274.      Names are not case sensitive. This means that "FILE.TXT" and "file.txt" 
  15275.       refer to the same file. Lowercase and uppercase characters are folded 
  15276.       together for name comparison purposes. 
  15277.  
  15278.      Names returned by file system functions are in uppercase. This means that 
  15279.       if "file.txt" is created, DosFindFirst returns "FILE.TXT". 
  15280.  
  15281.      Directory and file names can be any combination of up to eight letters, 
  15282.       digits, or the following special characters: 
  15283.  
  15284.                 $   %   '   -   _   @   {   }   ~   `  !   # (   )
  15285.  
  15286.       File extensions can be any combination of up to three letters, digits, or 
  15287.       special characters, preceded by a period. 
  15288.  
  15289.      Invalid characters for directory names, file names, and volume labels 
  15290.       are: 
  15291.  
  15292.         -  the range 0 - 1Fh 
  15293.  
  15294.         -  and the characters: 
  15295.  
  15296.                           <   >   |   +   =   :   ;   ,   .   "   /   \   [   ]
  15297.  
  15298.  
  15299. ΓòÉΓòÉΓòÉ 10.1.2. File Names in the High Performance File System ΓòÉΓòÉΓòÉ
  15300.  
  15301. In HPFS, file names can be up to 255 characters long (one must be a terminating 
  15302. nil, "\0"). Directory names can also be 255 characters long, but the length of 
  15303. the complete path, including drive, directories, and file name, cannot exceed 
  15304. 260 characters. 
  15305.  
  15306. Certain characters that are illegal in the FAT file system are legal in HPFS 
  15307. file names: 
  15308.  
  15309.     +   =   ;   ,   [   ]
  15310.  
  15311. Also, blank spaces can be used anywhere in an HPFS file name or directory name, 
  15312. but blank spaces and periods at the end of a file name are ignored. 
  15313. Additionally, the period (.) is a valid file name character and can be used as 
  15314. many times as desired. There is no requirement that HPFS file names have 
  15315. extensions; however, many applications still create and use them. 
  15316.  
  15317. An HPFS file name can be all uppercase, all lowercase, or mixed case. The case 
  15318. is preserved for directory listings but is ignored in file searches and all 
  15319. other system operations. Therefore, in a given directory, there cannot be more 
  15320. than one file with the same name when the only difference is case. 
  15321.  
  15322. File-Naming Rules for Installable File Systems 
  15323. For file objects managed by OS/2 installable file systems, the following rules 
  15324. apply: 
  15325.  
  15326.      Each element of a full path name residing on a disk managed by an 
  15327.       installable file system can consist of up to 255 characters. File names 
  15328.       can be up to 255 characters long (one of the characters must be a 
  15329.       terminating nil, "\0"). Directory names can also be 255 characters long, 
  15330.       but the length of the complete path, including drive, directories, and 
  15331.       file name, cannot exceed 260 characters. For example, in the path name 
  15332.       "c:\XXX...XXX\YYY", "XXX...XXX" can include up to 255 characters. This is 
  15333.       referred to as long file names. 
  15334.  
  15335.      Names are not case sensitive. 
  15336.  
  15337.      File name case as specified at create time is preserved. This means that 
  15338.       if the file "file.TXT" is created, DosFindFirst returns "file.TXT".  File 
  15339.       name case may be modified using DosMove. 
  15340.  
  15341.      Blanks immediately preceding a dot are significant. This means that 
  15342.       "FILE.TXT" and "FILE  .TXT" refer to different files. 
  15343.  
  15344.      Trailing blanks are truncated.  This means that "FILE.TXT  " is the same 
  15345.       as "FILE.TXT". 
  15346.  
  15347.      Blanks elsewhere in the name are significant.  This means that "F I L 
  15348.       E.TXT" is not the same as "FILE.TXT". 
  15349.  
  15350.      For compatibility reasons, trailing dots on component names are 
  15351.       discarded.  For Example, "\FILE.TXT...TEXT...\A..B...\C." becomes 
  15352.       "\FILE.TXT...TEXT\A..B\C". This processing includes semaphore, queue, 
  15353.       pipe, module, shared memory names, and device names. 
  15354.  
  15355.      The set of legal characters is expanded to include 
  15356.  
  15357.                 +   =   ;   ,   [   ]
  15358.  
  15359.       as well as all characters legal for the FAT file system. 
  15360.  
  15361.      If an installable file system uses a component separator within a file 
  15362.       name, it must be a dot (.). There are no restrictions on the number of 
  15363.       components which can be allowed within a file name, for example 
  15364.       "My.Programming.Reference.Part.One". 
  15365.  
  15366.  
  15367. ΓòÉΓòÉΓòÉ 10.1.3. Long File Names ΓòÉΓòÉΓòÉ
  15368.  
  15369. Programs that recognize long file names must indicate this by including the 
  15370. NEWFILES statement in their module definition file. This statement directs the 
  15371. linker to set a bit in the executable file header. It indicates that the module 
  15372. supports long file names. This bit is meaningless in a DOS Session and on 
  15373. versions of the OS/2 operating system prior to Version 1.2. Programs written 
  15374. for OS/2 Version 1.2 (and all later versions) installable file systems should 
  15375. set this bit. Bound programs that have this bit set can see files with long 
  15376. file names in OS/2 mode, but only files with 8.3 file name format in DOS 
  15377. Sessions. 
  15378.  
  15379. This bit has meaning when attached to program modules, not when attached to 
  15380. DLLs. Whether the program recognizes long file names format is entirely 
  15381. dependent on the value of its NEWFILES bit and the effect of the bit extends 
  15382. into any calls to DLLs. In order to be compatible with all OS/2 file systems, 
  15383. dynamic link libraries must not create internal temporary files or directories 
  15384. that do not comply with 8.3 file naming conventions. In addition, dynamic link 
  15385. libraries cannot return long file names to an application. (The caller might be 
  15386. running on a file system that only supports 8.3 file names and use the returned 
  15387. name to create a file.) 
  15388.  
  15389. OS/2 applications which do not recognize long file names can run with some 
  15390. restrictions. For these programs, long names (including device names) are 
  15391. filtered according to the following rules: 
  15392.  
  15393.      Any name not representable in the 8.3 file name format is not returned 
  15394.       from DosFindFirst or DosFindNext. This is because the application's 
  15395.       buffers are unlikely to be large enough to handle longer names. 
  15396.  
  15397.      Any long file name passed to the file system functions listed below are 
  15398.       rejected in exactly the same way as under previous versions of the OS/2 
  15399.       operating system. It is not acceptable to create and manipulate a name 
  15400.       that you cannot find. 
  15401.  
  15402.            DosOpen 
  15403.            DosDelete 
  15404.            DosMove 
  15405.            DosQueryPathInfo 
  15406.            DosSetPathInfo 
  15407.            DosCreateDir 
  15408.            DosDeleteDir 
  15409.            DosFindFirst 
  15410.            DosFindNext 
  15411.            DosQueryFSAttach 
  15412.            DosFSAttach 
  15413.            DosCopy 
  15414.            DosSearchPath 
  15415.  
  15416.      Long file names can be passed to DosSetCurrentDir and DosQueryCurrrentDir 
  15417.       so that all programs can use all directories. 
  15418.  
  15419.      Long names used with non-file system functions (for example, 
  15420.       DosCreateSem) are not filtered. 
  15421.  
  15422.  For files located on file devices managed by the OS/2 FAT file system, long 
  15423.  file names are handled differently in OS/2 mode than in DOS mode. In OS/2 
  15424.  mode, the long file name is considered an error. In DOS mode, the name is 
  15425.  truncated and is not an error. The DOS mode treatment of file name formats 
  15426.  provides compatibility with the PC-DOS environment for applications originally 
  15427.  written for PC-DOS. However, if you are writing a family application to run 
  15428.  under both the OS/2 operating system and the PC-DOS environment, your 
  15429.  application must allow for this difference in operating environments. 
  15430.  
  15431.  Because long file names can be input to applications through program command 
  15432.  lines, dialog boxes, or function calls, applications must provide their users 
  15433.  with rules for how to enter file names. File Names in User Input provides some 
  15434.  general guidelines in this matter, that are applicable to both long file names 
  15435.  and 8.3 file names. 
  15436.  
  15437.  
  15438. ΓòÉΓòÉΓòÉ 10.1.4. Moving Files with Long Names ΓòÉΓòÉΓòÉ
  15439.  
  15440. The Workplace Shell supports copying files with long file names to media that 
  15441. is managed by a non-installable file system (IFS) and for returning these files 
  15442. to IFS media with the long name intact. 
  15443.  
  15444. When a file with a long name is copied to media that does not support long file 
  15445. names, the Workplace Shell stores the file's long name in the .LONGNAME 
  15446. extended attribute. When the file is copied back to a disk that does support 
  15447. long file names, the Workplace Shell restores the long name from the extended 
  15448. attribute. 
  15449.  
  15450. If the new media does not support extended attributes, files that have long 
  15451. names cannot be moved to the media without having their names modified or 
  15452. truncated. 
  15453.  
  15454. Note:  The behavior described above only applies to the Workplace Shell The 
  15455.        command processors, CMD.EXE and COMMAND.COM, do not automatically save 
  15456.        the long file name; they require the user to enter a new file name that 
  15457.        is legal on the new media. The DosCopy command also does not save the 
  15458.        long file name automatically; the programmer must provide the target 
  15459.        file name to DosCopy and the target file name must be a legal file name 
  15460.        for the target media. 
  15461.  
  15462. If you choose to store and restore the file's long name, you must do it 
  15463. yourself in the manner described above. 
  15464.  
  15465.  
  15466. ΓòÉΓòÉΓòÉ 10.2. Metacharacters in File Names ΓòÉΓòÉΓòÉ
  15467.  
  15468. Metacharacters are characters that can be used to represent placeholders in a 
  15469. file name. The asterisk (*) and the question mark (?) are the two 
  15470. metacharacters. The asterisk matches one or more characters, including blanks, 
  15471. but does not match the period. The question mark matches exactly one character, 
  15472. unless that character is a period. To match a period, the original name must 
  15473. contain a period. Metacharacters are illegal in all but the last component of a 
  15474. path. Metacharacters are also referred to as global file name characters, or as 
  15475. wildcard characters. 
  15476.  
  15477. An application that allows more than one file name on its command line, can 
  15478. accept metacharacters to provide users with a shortcut for entering a long list 
  15479. of names. For instance, metacharacters can be used to reference a set of files 
  15480. with a common base name; to reference all files with an extension of EXE, the 
  15481. user would enter: 
  15482.  
  15483.     *.exe
  15484.  
  15485. Although a name that contains metacharacters is not a complete file name, an 
  15486. application can use functions, such as DosFindFirst and DosEditName, to expand 
  15487. the name (replace the metacharacters) and create one or more valid file names. 
  15488.  
  15489. Metacharacters have two sets of semantics: 
  15490.  
  15491.      As search metacharacters, which are used to select the files that are 
  15492.       returned to the user when the user searches the disk for a file. 
  15493.  
  15494.      As edit metacharacters, which are used to construct a new file name, 
  15495.       given a source name and a target name specification. 
  15496.  Both asterisks and question marks, therefore, have two sets of rules, one for 
  15497.  searching for file names and one for editing file names. 
  15498.  
  15499.  Search metacharacters are used in commands that search for files or groups of 
  15500.  files, like DIR: 
  15501.  
  15502.       dir *.exe
  15503.  
  15504.  An application can expand a name with metacharacters to a list of file names 
  15505.  by using DosFindFirst and DosFindNext. These functions take a file name 
  15506.  template (a name with metacharacters) and return the names of files on the 
  15507.  disk that match the pattern in the template. 
  15508.  
  15509.  Edit metacharacters are used in commands that can change the names of files; 
  15510.  for example, in a global copy command: 
  15511.  
  15512.       copy *.txt  *.old
  15513.  
  15514.  An application can create a new file name from an existing name by using the 
  15515.  DosEditName function. This function takes a template (a name with 
  15516.  metacharacters) and expands it, using characters from an existing name. An 
  15517.  asterisk in the template directs the function to copy all characters in the 
  15518.  existing name until it locates a character that matches the character 
  15519.  following the asterisk. A question mark directs the function to copy one 
  15520.  character, unless that character is a period. The period in the template 
  15521.  directs the function to look for and move to the next period in the existing 
  15522.  name, skipping any characters between the current position and the period. 
  15523.  
  15524.  
  15525. ΓòÉΓòÉΓòÉ 10.2.1. Searching for Files Using Metacharacters ΓòÉΓòÉΓòÉ
  15526.  
  15527. An asterisk (*) matches 0 or more characters, any character, including blank. 
  15528. It does not cross nil or \, which means it only matches a file name, not an 
  15529. entire path. 
  15530.  
  15531. A question mark (?) matches 1 character, unless what it would match is a period 
  15532. (.) or the terminating nil, in which case it matches 0 characters. It also does 
  15533. not cross the backslash character (\). 
  15534.  
  15535. Any character, other than asterisks and question marks, matches itself, 
  15536. including a period. 
  15537.  
  15538. Searching is case-insensitive. For example, "FILE.TXT" references the same file 
  15539. named "file.txt". 
  15540.  
  15541. For compatibility reasons, any file name that does not have a dot in it gets an 
  15542. implicit one automatically appended to the end during searching operations. 
  15543. This means that searching for "FILE." would return "FILE". 
  15544.  
  15545. Some file system functions accept file object name specifications using 
  15546. metacharacters. 
  15547.  
  15548.  
  15549. ΓòÉΓòÉΓòÉ 10.2.2. Editing File Names Using Metacharacters ΓòÉΓòÉΓòÉ
  15550.  
  15551. Metacharacters in a source name simply match files and behave just like any 
  15552. other search metacharacter. 
  15553.  
  15554. Metacharacters in a target name are copy-edit commands and work as follows: 
  15555.  
  15556.      A question mark (?) copies one character unless the character it would 
  15557.       copy is a period (.), in which case it copies 0 characters. It also 
  15558.       copies 0 characters if it is at the end of the source string. 
  15559.  
  15560.      An asterisk (*) copies characters from the source name to the target name 
  15561.       until it finds a source character that matches the character following it 
  15562.       in the target. 
  15563.  
  15564.      A period (.) in the target name causes the source pointer to match the 
  15565.       corresponding "." in the target. They count from the left. 
  15566.  
  15567.  Editing is case-insensitive. If a case conflict between the source and editing 
  15568.  string arises, the case in the editing string is used, thus: 
  15569.  
  15570.       copy file.txt *E.tmp
  15571.  
  15572.  results in file.txt being copied as filE.tmp. 
  15573.  
  15574.  DosEditName provides applications with the ability to transform a file object 
  15575.  name into another name, using an editing string that contains global 
  15576.  characters. 
  15577.  
  15578.  
  15579. ΓòÉΓòÉΓòÉ 10.2.3. Transforming File Names Using Metacharacters ΓòÉΓòÉΓòÉ
  15580.  
  15581. File system functions that an application uses to copy, rename or move file 
  15582. objects do not support the use of global characters. For example, a user can 
  15583. perform a global copy of all files with the extension .EXE by entering the 
  15584. following on the command line: 
  15585.  
  15586.     copy *.exe
  15587.  
  15588. An application, however, cannot perform a similar global copy operation by 
  15589. making a single call to DosCopy or DosMove. These functions operate on a 
  15590. single, specific file object. 
  15591.  
  15592. DosEditName, however, provides applications with the ability to transform an 
  15593. element of a full path name into another name, using an editing string that 
  15594. contains global characters. For example, for an application to copy all files 
  15595. with an extension of .SRC to files with an extension of .SAM, the application 
  15596. would: 
  15597.  
  15598.    1. Search for all files with the .SRC extension by using DosFindFirst and 
  15599.       DosFindNext, 
  15600.  
  15601.    2. Transform the file names by using DosEditName with an editing string of 
  15602.       "*.SAM", 
  15603.  
  15604.    3. Copy the files with the new extension with DosCopy. 
  15605.  
  15606.  
  15607. ΓòÉΓòÉΓòÉ 10.3. File Names in User Input ΓòÉΓòÉΓòÉ
  15608.  
  15609. Users often supply file names as part of an application's command line or in 
  15610. response to a prompt from the application. Traditionally, users have been able 
  15611. to supply more than one file name by separating the names with certain 
  15612. characters, such as a blank space. In some file systems, however, traditional 
  15613. separators are valid file name characters. This means additional conventions 
  15614. are required to ensure that an application processes all characters in a name. 
  15615.  
  15616. When an application processes arguments (including file names) from its command 
  15617. line, the operating system treats the double quotation mark (") and the caret 
  15618. (^) as quotation characters. All characters between the opening and closing 
  15619. double quotation marks are processed as a single argument. The caret is used to 
  15620. quote characters that would otherwise have some special property. The character 
  15621. immediately following the caret is treated as a normal character; any special 
  15622. characteristics that the character has are to be ignored. For example, the 
  15623. greater-than symbol (>) normally causes a program's output to be redirected to 
  15624. a file or device. Typing "^>" causes the ">" to be included in the command line 
  15625. passed to the application. In both cases, the operating system discards the 
  15626. quotation characters and does not treat them as part of the final argument. 
  15627.  
  15628. When a Presentation Manager*(PM) application processes two or more file names 
  15629. from a dialog box or other prompt, it expects the user to enter each file name 
  15630. on a new line. Therefore, a PM application would use a multiple-line entry 
  15631. field to prompt for multiple file names. This often makes the use of quotation 
  15632. characters unnecessary. 
  15633.  
  15634. When an application is started, the operating system constructs a command line 
  15635. for the application. If the command line includes file names, the operating 
  15636. system places a space character between names and marks the end of the list 
  15637. with two nil characters. Applications that start other applications by using 
  15638. DosExecPgm can also pass arguments by using this convention or by using 
  15639. quotation characters. In practice, most applications receive a command line as 
  15640. a single, nil-terminated string. Therefore, applications that use DosExecPgm 
  15641. should prepare command lines as a single string, and enclose any file names in 
  15642. quotation marks. 
  15643.  
  15644.  
  15645. ΓòÉΓòÉΓòÉ 10.4. Device Names ΓòÉΓòÉΓòÉ
  15646.  
  15647. Naming conventions for character devices are similar to those for naming files. 
  15648. The OS/2 operating system has reserved certain names for character devices 
  15649. supported by the base device drivers. These device names are listed below: 
  15650.  
  15651.  CLOCK$              Clock 
  15652.  COM1-COM4           First through fourth serial ports 
  15653.  CON                 Console keyboard and screen 
  15654.  KBD$                Keyboard 
  15655.  LPT1                First parallel printer 
  15656.  LPT2                Second parallel printer 
  15657.  LPT3                Third parallel printer 
  15658.  MOUSE$              Mouse 
  15659.  NUL                 Nonexistent (dummy) device 
  15660.  POINTER$            Pointer draw device (mouse screen support) 
  15661.  PRN                 The default printer, usually LPT1 
  15662.  SCREEN$             Screen 
  15663.  
  15664.  These names can be used with DosOpen to open the corresponding devices. 
  15665.  Reserved device names take precedence over file names; DosOpen checks for a 
  15666.  device name before checking for a file name. Do not use a file name which is 
  15667.  the same as a reserved device name; the file will never be opened, because the 
  15668.  command will open the device instead. 
  15669.  
  15670.  COM1 through COM4 are reserved device names only when the ASYNC (RS-232C) 
  15671.  device driver is loaded. The same is true for POINTER$ and MOUSE$, which are 
  15672.  reserved only when a mouse device driver is loaded. 
  15673.  
  15674.  An application can call DosQueryFHState to verify that a file or device has 
  15675.  been opened. See Determining and Setting the State of a File or Device Handle 
  15676.  for more information on getting the state of a file handle. 
  15677.  
  15678.  
  15679. ΓòÉΓòÉΓòÉ 11. File Systems ΓòÉΓòÉΓòÉ
  15680.  
  15681. An application views a file as a logical sequence of data; OS/2 file systems 
  15682. manage the physical locations of that data on the storage device for the 
  15683. application. The file systems also manage file I/O operations and control the 
  15684. format of the stored information. 
  15685.  
  15686. Applications use the OS/2 file system functions to open, read, write, and close 
  15687. disk files. File system functions also enable an application to use and 
  15688. maintain the disk that contains the files-the volumes, the directories, and the 
  15689. files on the disks of the computer. Applications also use OS/2 file system 
  15690. functions to perform I/O operations to pipes and to peripheral devices 
  15691. connected to the computer, like the printer. 
  15692.  
  15693. The following topics are related to the information in this chapter: 
  15694.  
  15695.      File names 
  15696.      File management 
  15697.      Extended attributes 
  15698.      Device I/O 
  15699.  
  15700.  
  15701. ΓòÉΓòÉΓòÉ 11.1. About File Systems ΓòÉΓòÉΓòÉ
  15702.  
  15703. A file system is the combination of software and hardware that supports storing 
  15704. information on a storage device. In the OS/2 operating system, the file system 
  15705. specifies how data is organized on the mass storage devices of the computer, 
  15706. such as hard disks and floppy disks. 
  15707.  
  15708. Each drive is assigned a unique letter to distinguish it from other drives. A 
  15709. single hard disk can also be divided into two or more logical drives. A logical 
  15710. drive represents a portion of the hard disk and, like a physical drive, is 
  15711. assigned a unique letter to distinguish it from other physical and logical 
  15712. drives. 
  15713.  
  15714. The file system organizes disks into volumes, directories, and files. A volume 
  15715. is the largest file system unit. It represents all the available storage on the 
  15716. logical drive. An optional volume name identifies the volume. 
  15717.  
  15718. Volumes are subdivided into directories, which contain files and other 
  15719. subdirectories. Each volume has a root directory, which contains file and 
  15720. directory entries. All other subdirectories trace their ancestry back to the 
  15721. root directory. Each directory entry identifies the name, location, and size of 
  15722. a specific file or subdirectory on the disk. A file is one or more bytes of 
  15723. data stored on the disk. Subdirectories provide an additional level of 
  15724. organization and, like the root directory, can contain files and directory 
  15725. entries. 
  15726.  
  15727. The file system also enables users and applications to access certain non-disk 
  15728. devices as if they were files. An example of such a device would be the 
  15729. printer, which can be accessed through the file system by using the printer's 
  15730. logical name, PRN, as a file name. 
  15731.  
  15732.  
  15733. ΓòÉΓòÉΓòÉ 11.1.1. Types of File Systems ΓòÉΓòÉΓòÉ
  15734.  
  15735. The OS/2 operating system has two file systems: the file allocation table (FAT) 
  15736. file system and the high performance file system (HPFS). These file systems 
  15737. define how information is organized on the storage devices. 
  15738.  
  15739. A user can choose to install either or both file systems. An application must 
  15740. be able to work with any file system. The OS/2 operating system provides a 
  15741. common set of file system functions that are not dependent on a particular file 
  15742. system. 
  15743.  
  15744. Both of these file systems support: 
  15745.  
  15746.      Existing logical file and directory structure 
  15747.      Existing naming conventions 
  15748.      Multiple logical volumes (partitions) 
  15749.      Multiple and different storage devices 
  15750.      Redirection or connection to remote file systems 
  15751.      Extended attributes 
  15752.      Metacharacter file-name processing. 
  15753.  
  15754.  Additionally, HPFS supports: 
  15755.  
  15756.      Long file names 
  15757.      An extendable application interface. 
  15758.  
  15759.  The High Performance File System is an example of a class of file systems 
  15760.  called installable file systems. Installable file systems are installed by the 
  15761.  user (by changing CONFIG.SYS) and are loaded by the operating system during 
  15762.  system initialization. 
  15763.  
  15764.  The OS/2 operating system permits users to have multiple file systems active 
  15765.  at the same time; for example a FAT file system for one hard disk and HPFS for 
  15766.  another. 
  15767.  
  15768.  
  15769. ΓòÉΓòÉΓòÉ 11.1.1.1. FAT File System ΓòÉΓòÉΓòÉ
  15770.  
  15771. The OS/2 FAT file system is based on the DOS FAT file system. This file system, 
  15772. also used in previous releases of the OS/2 operating system and in PC-DOS, 
  15773. controls storage of data files for hard and floppy disks. 
  15774.  
  15775. The FAT file system is hierarchical, supporting multiple directories on the 
  15776. disk. Each directory can contain one or more files or subdirectories. 
  15777.  
  15778. The FAT file system uses the 8.3 file name convention. Under this convention, 
  15779. the file name consists of a file name of up to eight characters, a separating 
  15780. period (.),  and a file name extension of up to three characters. 
  15781.  
  15782.  
  15783. ΓòÉΓòÉΓòÉ 11.1.1.2. Installable File Systems ΓòÉΓòÉΓòÉ
  15784.  
  15785. An installable file system is a file system in which software is installed when 
  15786. the operating system is started. The OS/2 operating system supports installable 
  15787. file systems and permits users to have multiple file systems active at the same 
  15788. time. 
  15789.  
  15790. Users install a file system by specifying the file system components in the 
  15791. CONFIG.SYS file. The file system software consists of device drivers and 
  15792. dynamic link libraries. The device drivers access storage devices; the dynamic 
  15793. link libraries control the format of information on a device and manage the 
  15794. flow of data to and from the device. The user must use the DEVICE= command to 
  15795. specify the device driver and the IFS= command to specify the dynamic link 
  15796. library. 
  15797.  
  15798. Installable file system drivers are loaded during system initialization when an 
  15799. IFS= statement is encountered in the CONFIG.SYS file. The operating system 
  15800. loads the device driver and dynamic link library and initializes a specific 
  15801. device for use with a file system. 
  15802.  
  15803. These file systems can support file and directory structures different from the 
  15804. FAT file system. 
  15805.  
  15806. An example of an installable file system might be a file system designed 
  15807. specifically for use on a network server. Another example of an installable 
  15808. file system is the High Performance File System (HPFS), which is included with 
  15809. the OS/2 operating system. 
  15810.  
  15811.  
  15812. ΓòÉΓòÉΓòÉ 11.1.1.3. High Performance File System ΓòÉΓòÉΓòÉ
  15813.  
  15814. The High Performance File System (HPFS) is an installable file system. It is a 
  15815. hierarchical system and supports multiple directories. In many cases, accessing 
  15816. files under HPFS is faster than accessing similar files under the FAT file 
  15817. system. During installation of the OS/2 operating system, users can install the 
  15818. HPFS on the hard disk they use to start their computer. 
  15819.  
  15820. Features of HPFS include: 
  15821.  
  15822.      Caching of directories, data, and file system data structures 
  15823.      Multi-threaded I/O operations 
  15824.      Write-behind logic 
  15825.      Optional write-through 
  15826.      Strategic allocation of directory structures 
  15827.      Highly contiguous file allocation 
  15828.      Enhanced recoverability 
  15829.      Extended attribute support 
  15830.      Long file name support 
  15831.      Starting the OS/2 operating system from an HPFS disk 
  15832.  
  15833.  File names under HPFS can contain 255 characters (one must be the terminating 
  15834.  nil, "\0") and can contain characters that are not valid for the FAT file 
  15835.  system-for example, spaces. Each element of a path name residing on an HPFS 
  15836.  disk can also have up to 255 characters. The total path including drive, 
  15837.  directories, and file name cannot exceed 260 characters (259 with the 
  15838.  terminating nil). For more information on long file name support by 
  15839.  installable file systems see Long File Names. 
  15840.  
  15841.  HPFS provides extremely fast access to very large disk volumes. HPFS uses a 
  15842.  memory cache divided into blocks of 2KB. Data that is read from and written to 
  15843.  the disk is transferred through this cache. Frequently-used data will often be 
  15844.  found in the cache, thereby saving the time that a disk-read operation would 
  15845.  require. When a user request specifies data that is not present in the cache, 
  15846.  HPFS selects the least-recently used discardable block and then fills the 
  15847.  block with the requested data. 
  15848.  
  15849.  When a write-data request is received, it usually is not necessary that the 
  15850.  data be immediately written to the disk. HPFS will copy such data into the 
  15851.  block cache without actually performing the disk-write operation. When the 
  15852.  data is in the cache, it is written to disk as a background activity (referred 
  15853.  to as lazy writing) which enables the typical user-write operation to occur 
  15854.  much faster than in file systems where all write operations are synchronous. 
  15855.  
  15856.  The High Performance File System consists of: 
  15857.  
  15858.      The High Performance File System driver, HPFS.IFS 
  15859.      The High Performance File System lazy-write utility, CACHE.EXE 
  15860.      The High Performance File System lazy-write startup program, STARTLW.DLL 
  15861.      The High Performance File System utilities, UHPFS.DLL 
  15862.  The user determines the amount of lazy-write support by setting the following 
  15863.  parameters on the command line that calls CACHE.EXE: 
  15864.  
  15865.      MaxAge: 
  15866.  
  15867.       When the data in a cache block exceeds the specified time the block is 
  15868.       queued for writing to the disk. This reduces the amount of data lost due 
  15869.       to inopportune system shutdowns. 
  15870.  
  15871.      DiskIdle and BufferIdle 
  15872.  
  15873.       When no user I/O request (non-lazy-write) has been made for DiskIdle 
  15874.       number of milliseconds, all cache blocks (in oldest-first order) that 
  15875.       have not been touched for BufferIdle number of milliseconds are queued 
  15876.       for writing to disk. This enables HPFS to write out user data during 
  15877.       times of relative disk inactivity and to reduce the need for rewriting 
  15878.       heavily used cached blocks. 
  15879.  
  15880.  STARTLW.DLL contains the code that starts the lazy-write thread. 
  15881.  
  15882.  
  15883. ΓòÉΓòÉΓòÉ 11.1.1.4. Local and Remote File Systems ΓòÉΓòÉΓòÉ
  15884.  
  15885. Installable file systems work with a variety of storage devices. A file system 
  15886. on a local device such as a disk drive or virtual drive is called a local file 
  15887. system. A file system on a remote device, such as a disk drive on another 
  15888. computer, is called a remote file system. An application can establish a 
  15889. connection to a local or a remote file system by using DosFSAttach. 
  15890.  
  15891. For a local file system, the operating system uses a block device driver, which 
  15892. accesses disk hardware, to handle input and output to the device. The operating 
  15893. system automatically connects most (if not all) local file systems when it 
  15894. starts. However, an application can attach and detach additional file systems 
  15895. as needed. 
  15896.  
  15897. For a remote file system, the operating system uses a device driver that 
  15898. typically accesses a communications or network device. Usually, the actual 
  15899. storage device is located on another computer, and the two computers 
  15900. communicate requests and data through a network connection. An application can 
  15901. associate a remote file system with a drive letter by using DosFSAttach. Once 
  15902. the connection is made, the application can access directories and files on the 
  15903. remote device simply by using the assigned drive letter, treating the remote 
  15904. device as if it were on the same computer. 
  15905.  
  15906.  
  15907. ΓòÉΓòÉΓòÉ 11.1.2. Recognizing DOS and OS/2 File Objects ΓòÉΓòÉΓòÉ
  15908.  
  15909. The OS/2 FAT file system recognizes file objects created by the DOS FAT file 
  15910. system. This means that applications running under the OS/2 operating system 
  15911. (these include both OS/2 applications and DOS applications running in a DOS 
  15912. Session) can access file objects created by applications running under DOS. 
  15913.  
  15914. Because the OS/2 FAT file system supports the same directory structure as the 
  15915. DOS FAT file system, applications running under DOS can access files and 
  15916. directories created by the OS/2 FAT file system. 
  15917.  
  15918. However, the High Performance File System (HPFS) does not support the same 
  15919. directory structure as the DOS FAT file system.  Therefore, the DOS FAT file 
  15920. system will not recognize file objects created by HPFS. This means that if you 
  15921. start the computer with DOS, applications running under DOS cannot access files 
  15922. and directories on HPFS disks. 
  15923.  
  15924. DOS applications running in a DOS Session under the OS/2 operating system can 
  15925. recognize files and directories on both FAT and HPFS disks. A request from a 
  15926. DOS Session to read a file on a FAT disk is handled by the OS/2 FAT file 
  15927. system. Similarly, a request from a DOS Session to read a file on an HPFS disk 
  15928. is handled by the OS/2 High Performance File System. 
  15929.  
  15930.  
  15931. ΓòÉΓòÉΓòÉ 11.1.3. Storage Devices and File Systems ΓòÉΓòÉΓòÉ
  15932.  
  15933. OS/2 file systems store information on mass storage devices. These devices are 
  15934. usually hard disks or floppy diskettes, but can be other media, such as CD-ROM. 
  15935.  
  15936. Each drive (or device) is assigned a unique letter to distinguish it from other 
  15937. drives. On most personal computers, drive A is the first floppy disk drive, 
  15938. drive B is the second floppy disk drive, drive C is the first hard disk drive, 
  15939. and drive D is the second hard disk drive. 
  15940.  
  15941. A single hard disk can be divided into two or more partitions, each of which 
  15942. are then viewed as a separate logical drive. A logical drive, like a physical 
  15943. drive, is assigned a unique letter to distinguish it from other physical and 
  15944. logical drives. FDISK is the OS/2 utility used to partition physical storage 
  15945. devices. 
  15946.  
  15947. A personal computer running the OS/2 operating system can have up to 26 logical 
  15948. disk drives. 
  15949.  
  15950. Each logical storage device can be managed by a different file system. The file 
  15951. system attached to a storage device manages that device. A user attaches a file 
  15952. system to a storage device by: 
  15953.  
  15954.      Loading the file system driver during system initialization (by including 
  15955.       an IFS= statement in CONFIG.SYS). 
  15956.  
  15957.      Formatting the storage device by using the format options for the file 
  15958.       system. 
  15959.  During installation of the OS/2 operating system, users have the option of 
  15960.  formatting hard disks with the FAT file system or with the (HPFS). If the user 
  15961.  chooses to use the HPFS, an IFS= statement is added to the CONFIG.SYS file so 
  15962.  that HPFS is loaded automatically during each system startup. During 
  15963.  formatting, the file system driver is associated with the logical storage 
  15964.  device or drive letter of the hard disk. 
  15965.  
  15966.  When an application calls a file system function, the operating system directs 
  15967.  the request to: 
  15968.  
  15969.      The installable file system managing the storage device, or 
  15970.      The FAT file system, if no installable file system is loaded and attached 
  15971.       to the storage device. 
  15972.  
  15973.  The file system used to format the storage media manages that media each time 
  15974.  the system is started, as long as the file system is loaded during system 
  15975.  start-up. The operating system directs file system requests for a storage 
  15976.  media to the file system that formatted the media. If no file system 
  15977.  recognizes the format of the media, the OS/2 FAT file system attempts to 
  15978.  manage that media. This might occur when the file system used to format the 
  15979.  storage media is not loaded during system startup (the IFS= statement was 
  15980.  removed from the CONFIG.SYS file after OS/2 installation). If the OS/2 FAT 
  15981.  file system cannot recognize the media format (the media might have a 
  15982.  different directory structure), the user receives an error when attempting to 
  15983.  access the media. 
  15984.  
  15985.  For example, assume a system is configured with diskette drive A and hard disk 
  15986.  drives C and D. During OS/2 installation, the user elects to format drive C 
  15987.  using HPFS. Drive C is, then, managed by HPFS. Drive D was formatted with the 
  15988.  FAT file system, so it is managed by the OS/2 FAT file system, as is diskette 
  15989.  drive A (removable media cannot be formatted using HPFS). When an application 
  15990.  calls DosOpen to open a file on drive C, the operating system directs the 
  15991.  request to HPFS. When an application calls DosOpen to open a file on drive A, 
  15992.  the operating system directs the request to the OS/2 FAT file system. 
  15993.  
  15994.  If HPFS is not loaded during system startup, the FAT file system will receive 
  15995.  file system requests made for drive C. However, because HPFS supports a 
  15996.  different directory structure than the FAT file system does, the OS/2 FAT file 
  15997.  system cannot recognize file objects on the disk. The user will receive an 
  15998.  error when attempting to gain access to the disk. 
  15999.  
  16000.  Users can determine which file system was used to format a storage device by 
  16001.  using the CHKDSK utility. CHKDSK displays a message indicating which file 
  16002.  system manages the specified drive. Because DOS does not use extended 
  16003.  attributes, a user must use CHKDSK in an OS/2 session rather than in a Dos 
  16004.  Session to examine a FAT partition. 
  16005.  
  16006.  
  16007. ΓòÉΓòÉΓòÉ 11.1.4. File System Utilities ΓòÉΓòÉΓòÉ
  16008.  
  16009. Utilities for each file system are in a single dynamic link library. The 
  16010. utilities that the operating system calls are based on the file system that 
  16011. recognizes the volume on which the utility is to be run. The dynamic link 
  16012. library for each file system has the following utilities: 
  16013.  
  16014.  FORMAT         Disk formatter 
  16015.  CHKDSK         File system validation and repair 
  16016.  RECOVER        File recovery 
  16017.  SYS            System installation 
  16018.  
  16019.  
  16020. ΓòÉΓòÉΓòÉ 11.1.5. OS/2 Boot Manager ΓòÉΓòÉΓòÉ
  16021.  
  16022. The OS/2 Boot Manager enables different operating systems to co-reside on the 
  16023. same computer. The user selects the operating system to boot when the computer 
  16024. is turned on. For example, DOS, AIX, and the OS/2 operating system can 
  16025. co-reside on the same machine. There can also be a previous version of the OS/2 
  16026. operating system on the machine co-existing with the current version of the 
  16027. operating system. 
  16028.  
  16029. Each operating system has its own partition and each partition is managed by 
  16030. the appropriate file system for the operating system that owns it. A DOS 
  16031. partition has a FAT file system. An OS/2 partition can have either a FAT file 
  16032. system or HPFS. An AIX partition will use the AIX file system to manage its 
  16033. partition. 
  16034.  
  16035. Note:  FAT partitions that follow HPFS partitions on the same physical disk 
  16036.        cannot be accessed when using DOS because DOS stops at the first 
  16037.        partition it does not recognize. 
  16038.  
  16039.  
  16040. ΓòÉΓòÉΓòÉ 11.2. Using File Systems ΓòÉΓòÉΓòÉ
  16041.  
  16042. In order to take advantage of the capabilities of OS/2 file systems, 
  16043. application developers must be able to manage the file systems. 
  16044.  
  16045. Most of the file system functions work with either the FAT file system or the 
  16046. High Performance File System (HPFS). 
  16047.  
  16048. Note:  In the example code fragments that follow, error checking was left out 
  16049.        to conserve space. Applications should always check the return code that 
  16050.        the functions return. Control Program functions return an APIRET value. 
  16051.        A return code of 0 indicates success. If a non-zero value is returned, 
  16052.        an error occurred. 
  16053.  
  16054.  
  16055. ΓòÉΓòÉΓòÉ 11.2.1. Attaching and Detaching File Systems ΓòÉΓòÉΓòÉ
  16056.  
  16057. A file system driver that uses a block device driver for I/O operations to a 
  16058. local or remote (virtual disk) device is called a local file system. A file 
  16059. system driver that accesses a remote system without a block device driver is 
  16060. called a remote file system. 
  16061.  
  16062. An application, typically a network application, can call DosFSAttach to: 
  16063.  
  16064.      Attach a drive to a remote file system 
  16065.      Detach a drive from a remote file system 
  16066.      Attach a pseudocharacter device name to a local or remote file system 
  16067.      Detach a pseudocharacter device name from a local or remote file system. 
  16068.  
  16069.  DosFSAttach establishes or breaks the connection between a drive or device and 
  16070.  a file system. If an attachment is successful, all requests to that drive or 
  16071.  name are routed to the specified file system. If a detachment is successful, 
  16072.  the operating system will no longer recognize the drive or name in a file 
  16073.  system call. 
  16074.  
  16075.  DosFSAttach does not support: 
  16076.  
  16077.      Redirection of drive letters representing local drives 
  16078.      Attachment to drives or devices that are not in the system's name space. 
  16079.       (DosFSCtl can be used to attach to drives or devices not in the system's 
  16080.       name space.) 
  16081.  
  16082.       A name space is a set of names that are known to the file system. For 
  16083.       example, CON (console) and PRN (printer) are always in the OS/2 file 
  16084.       system's name space. 
  16085.  
  16086.  The following code fragment attaches a drive to a remote file system driver 
  16087.  (FSD). Assume that the FSD does not require any user-supplied data arguments. 
  16088.  
  16089.  
  16090.   Uses
  16091.     Crt,Dos,Os2Def,Os2Base;
  16092.  
  16093.   Var
  16094.     UcDeviceName : Array[0..7] of UCHAR;  (* Device name or drive letter string *)
  16095.     UcFSDName   : Array[0..39] of UCHAR;  (* FSD name                           *)
  16096.     PDataBuffer                 : PVOID;  (* Attach argument data               *)
  16097.     UlDataBufferLen             : ULONG;  (* Buffer length                      *)
  16098.     UlOpFlag                    : ULONG;  (* Attach or detach                   *)
  16099.     Ulrc                        : APIRET; (* Return code                        *)
  16100.  
  16101.   Begin
  16102.  
  16103.     StrCopy(ucDeviceName,'Y:');
  16104.     (* Drive letter with which to attach the *)
  16105.     (* file system driver                    *)
  16106.  
  16107.     StrCopy(ucFSDName,'\lan03\src');
  16108.  
  16109.     pDataBuffer     := 0;  (* Assume that no user-supplied data     *)
  16110.                            (* arguments are required                *)
  16111.  
  16112.     ulDataBufferLen := 0;  (* No data buffer supplied               *)
  16113.  
  16114.     ulOpFlag        := 0;  (* Indicate Attach request               *)
  16115.  
  16116.     ulrc := DosFSAttach(ucDeviceName,
  16117.                         ucFSDName,
  16118.                         pDataBuffer,
  16119.                         ulDataBufferLen,
  16120.                         ulOpFlag);
  16121.  
  16122.     If (ulrc <> 0) Then Begin
  16123.       Write('DosFSAttach error: return code = ', ulrc);
  16124.       Halt;
  16125.     End;
  16126.  
  16127.   End.
  16128.  
  16129.  
  16130. ΓòÉΓòÉΓòÉ 11.2.2. Obtaining Information about an Attached File System ΓòÉΓòÉΓòÉ
  16131.  
  16132. To obtain information about block devices, and all character and 
  16133. pseudocharacter devices, including the type of device and the name of the file 
  16134. system driver the device is attached to, use DosQueryFSAttach. 
  16135.  
  16136. The information can be used to determine if the operating system recognizes 
  16137. that a particular file system is attached to a storage device. This is 
  16138. important to an application that must guarantee such a state. An application of 
  16139. this type must handle the situation where the file system driver that formatted 
  16140. a certain disk was not loaded during system startup.  (The user might have 
  16141. omitted the IFS= statement in the CONFIG.SYS. file). In such a situation, the 
  16142. data on the disk could be destroyed because the wrong file system was attached 
  16143. to the disk by default. 
  16144.  
  16145. The following code fragment returns information about an attached file system. 
  16146.  
  16147.  
  16148. Uses
  16149.   Crt,Dos,Os2Def,Os2Base;
  16150.  
  16151. Var
  16152.   UcDeviceName : Array[0..7] of UCHAR;      (* Device name or drive letter     *)
  16153.                                             (* string                          *)
  16154.   UlOrdinal                   : ULONG;      (* Ordinal of entry in name list   *)
  16155.   UlFSAInfoLevel              : ULONG;      (* Type of attached FSD data       *)
  16156.                                             (* required                        *)
  16157.   FsqDataBuffer               : FSQBUFFER2; (* Returned data buffer            *)
  16158.   UlDataBufferLen             : ULONG;      (* Buffer length                   *)
  16159.   Ulrc                        : APIRET;     (* Return code                     *)
  16160.  
  16161. Begin
  16162.  
  16163.   StrCopy(ucDeviceName,
  16164.           'Y:');  (* Logical drive of the attached file system *)
  16165.  
  16166.   ulFSAInfoLevel := 1;
  16167.  
  16168.   ulDataBufferLen := sizeof(FSQBUFFER2);    (* Data buffer length   *)
  16169.  
  16170.   ulrc := DosQueryFSAttach(ucDeviceName,
  16171.                            ulOrdinal,
  16172.                            ulFSAInfoLevel,
  16173.                            fsqDataBuffer,
  16174.                            ulDataBufferLen);
  16175.  
  16176.   If (ulrc <> 0) Then Begin
  16177.     Write('DosQueryFSAttach error: return code = ', ulrc);
  16178.     Halt;
  16179.   End;
  16180.  
  16181. End.
  16182.  
  16183. In this example, information was requested about the drive whose name was 
  16184. specified within the DeviceName variable. After the DosQueryFSAttach call, the 
  16185. DataBuffer structure contained a set of information describing the specified 
  16186. attached file system, and the DataBufferLen variable contained the size of 
  16187. information within the structure. 
  16188.  
  16189.  
  16190. ΓòÉΓòÉΓòÉ 11.2.3. Obtaining Information about a File System ΓòÉΓòÉΓòÉ
  16191.  
  16192. An application can retrieve information about the file system on a given drive 
  16193. by using DosQueryFSInfo. The file system information includes information on 
  16194. the amount of free storage space on the disk. The storage space is given in 
  16195. number of allocation units (clusters) on the disk. Each cluster has an 
  16196. associated number of sectors; each sector contains a given number of bytes. A 
  16197. typical disk has 512 bytes for each sector and 4 sectors for each cluster. 
  16198. DosSetFSInfo enables an application to change the volume identifier for the 
  16199. disk in the given drive. 
  16200.  
  16201. The following code fragment obtains information about the file system that is 
  16202. associated with a particular logical drive. 
  16203.  
  16204.  
  16205. Uses
  16206.   Crt,Dos,Os2Def,Os2Base;
  16207.  
  16208. Var
  16209.   UlDriveNumber               : ULONG;  (* Drive number                 *)
  16210.   UlFSInfoLevel               : ULONG;  (* File system data required    *)
  16211.   UcFSInfoBuf : Array[0..39] of UCHAR;  (* File system info buffer      *)
  16212.   UlFSInfoBufSize             : ULONG;  (* File system info buffer size *)
  16213.   Ulrc                        : APIRET; (* Return code                  *)
  16214.  
  16215. Begin
  16216.  
  16217.   ulDriveNumber := 3;              (* SpecIfy drive C                      *)
  16218.  
  16219.   ulFSInfoLevel := FSIL_ALLOC;     (* Indicate that file system allocation *)
  16220.                                    (* information is requested             *)
  16221.  
  16222.   ulFSInfoBufSize := 40;           (* Size of return data buffer           *)
  16223.  
  16224.   ulrc := DosQueryFSInfo(ulDriveNumber,
  16225.                          ulFSInfoLevel,
  16226.                          ucFSInfoBuf,
  16227.                          ulFSInfoBufSize);
  16228.  
  16229.   If (ulrc <> 0) Then Begin
  16230.     Write('DosQueryFSInfo error: return code = ', ulrc);
  16231.     Halt;
  16232.   End;
  16233.  
  16234. End.
  16235.  
  16236. In this example, the data buffer FSInfoBuf is used to receive information about 
  16237. space allocation within the specified file system. 
  16238.  
  16239.  
  16240. ΓòÉΓòÉΓòÉ 11.2.4. Obtaining Information about a File ΓòÉΓòÉΓòÉ
  16241.  
  16242. An application can retrieve and set information about a specific file by using 
  16243. DosQueryFSInfo and DosSetFileInfo. File information consists of the dates and 
  16244. times that the file was created, last accessed, and last written to (only the 
  16245. time and date the file was last written to are given for FAT partitions); the 
  16246. size (in bytes) of the file; the number of sectors (or clusters) the file 
  16247. occupies; and the file attributes. 
  16248.  
  16249. The following code fragment obtains file information for a specified file. The 
  16250. example obtains the Level 1 information set for the file. The Level 1 
  16251. information set for a file includes the dates and times of creation, last 
  16252. access, and last writing. It also includes information about the size of the 
  16253. file and the file's standard attributes. Assume that the handle of the desired 
  16254. file has been placed into FileHandle already. 
  16255.  
  16256.  
  16257. Uses
  16258.   Crt,Dos,Os2Def,Os2Base;
  16259.  
  16260. Var
  16261.   HfFileHandle      : HFILE;       (* File handle                 *)
  16262.   UlFileInfoLevel   : ULONG;       (* Level of file info required *)
  16263.   FsFileInfoBuf     : FILESTATUS3; (* File info buffer            *)
  16264.   UlFileInfoBufSize : ULONG;       (* File data buffer size       *)
  16265.   Ulrc              : APIRET;      (* Return code                 *)
  16266.  
  16267. Begin
  16268.  
  16269.     ulFileInfoLevel := 1;  (* Indicate that Level 1 information is desired *)
  16270.  
  16271.     fsFileInfoBufSize := sizeof(FILESTATUS3);
  16272.                           (* Size of the buffer that will                 *)
  16273.                           (* receive the Level 1 information              *)
  16274.  
  16275.     ulrc := DosQueryFileInfo(hfFileHandle,
  16276.                              ulFileInfoLevel,
  16277.                              fsFileInfoBuf,
  16278.                              ulFileInfoBufSize);
  16279.  
  16280.     If (ulrc <> 0) Then Begin
  16281.       Write('DosQueryFileInfo error: return code = ', ulrc);
  16282.       Halt;
  16283.     End;
  16284.  
  16285. End.
  16286.  
  16287. In this example, Level 1 file information is placed into the FileInfoBuf 
  16288. buffer. 
  16289.  
  16290.  
  16291. ΓòÉΓòÉΓòÉ 11.2.5. Communicating with a File System ΓòÉΓòÉΓòÉ
  16292.  
  16293. An extended standard interface between an application and a file system driver 
  16294. is provided by DosFSCtl. This function is similar to DosDevIOCtl, which 
  16295. provides a standard interface between an application and a device driver. An 
  16296. application sends a request to the file system driver by specifying a 
  16297. particular function code. Data is exchanged through data areas and parameter 
  16298. lists. 
  16299.  
  16300. DosFSCtl can be used to establish open connections to file system drivers that 
  16301. are not attached to a name in the operating system's name space. (A name space 
  16302. is a set of names that are known to the file system. For example, CON and PRN 
  16303. are always in the OS/2 file system's name space.) 
  16304.  
  16305. The following code fragment demonstrates how a process can communicate with a 
  16306. file system driver (FSD). Assume that the calling process has placed an 
  16307. appropriate file handle into FileHandle. Assume that the specified file system 
  16308. recognizes a function code of hex 8100, and that the function code accepts an 
  16309. ASCII string as input, requires no specific command parameter list, and returns 
  16310. a string of ASCII characters to the caller. 
  16311.  
  16312.  
  16313. Uses
  16314.   Crt,Dos,Os2Def,Os2Base;
  16315.  
  16316. Var
  16317.   UcDataArea : Array[0..99] of UCHAR;  (* Data area                         *)
  16318.   UlDataLengthMax            : ULONG;  (* Max. length of Data area          *)
  16319.   UlDataLengthInOut          : ULONG;  (* Data area length, in and out      *)
  16320.   PParmList                  : PVOID;  (* Parameter list                    *)
  16321.   UlParmLengthMax            : ULONG;  (* Max. length of Parameter list     *)
  16322.   UlParmLengthInOut          : ULONG;  (* Parameter list length, in and out *)
  16323.   UlFunctionCode             : ULONG;  (* Function code                     *)
  16324.   PszRouteName               : PSZ;    (* Path or FSD name                  *)
  16325.   HfFileHandle               : HFILE;  (* File handle                       *)
  16326.   UlRouteMethod              : ULONG;  (* Method for routing                *)
  16327.   Ulrc                       : APIRET; (* Return code                       *)
  16328.  
  16329. Begin
  16330.  
  16331.   ulFunctionCode := $8100;    (* Indicate the function to request  *)
  16332.                               (* of the file system                *)
  16333.  
  16334.   StrCopy(ucDataArea,
  16335.           'PARM1: 98');       (* ASCII string to pass to file system *)
  16336.  
  16337.   ulDataLengthMax := 100;     (* Tell the file system the maximum  *)
  16338.                               (* amount of data it can return      *)
  16339.  
  16340.   ulDataLengthInOut := strlen(ucDataArea);
  16341.                             (* On input, this is the number of   *)
  16342.                             (* bytes sent to the file system     *)
  16343.  
  16344.   pParmList := 0;              (* In this example, assume that no   *)
  16345.   ulParmLengthMax := 0;        (* specIfic command parameter list   *)
  16346.   ulParmLengthInOut := 0;      (* is required by the file system    *)
  16347.                                (* for this function code            *)
  16348.  
  16349.   ulRouteMethod := 1;          (* Indicate that the file handle     *)
  16350.   pszRouteName := 0;           (* directs routing (this implies     *)
  16351.                                (* that the RouteName variable is    *)
  16352.                                (* unused in this example)           *)
  16353.  
  16354.   ulrc := DosFSCtl(ucDataArea,
  16355.                    ulDataLengthMax,
  16356.                    ulDataLengthInOut,
  16357.                    pParmList,
  16358.                    ulParmLengthMax,
  16359.                    ulParmLengthInOut,
  16360.                    ulFunctionCode,
  16361.                    pszRouteName,
  16362.                    hfFileHandle,
  16363.                    ulRouteMethod);
  16364.  
  16365.   If (ulrc <> 0) Then Begin
  16366.     Write('DosFSCtl error: return code = ', ulrc);
  16367.     halt;
  16368.   End;
  16369.  
  16370. End.
  16371.  
  16372. In this example, the the DataArea buffer is used to store the ASCII string sent 
  16373. by the file system in response to the function request, and the DataLengthInOut 
  16374. variable is used to store the number of bytes placed in the buffer by the file 
  16375. system. 
  16376.  
  16377.  
  16378. ΓòÉΓòÉΓòÉ 11.2.6. Preparing File Systems for System Shutdown ΓòÉΓòÉΓòÉ
  16379.  
  16380. At any time during normal system operation, data destined for a disk might be 
  16381. in a cache. If this information is not written to disk before the system 
  16382. powered-off, the disk can become corrupted. To prevent this, applications call 
  16383. DosShutdown to ensure that the operating system writes the data in the cache to 
  16384. the disk and prevents any further data from being cached. The user can then 
  16385. safely power-off the system. 
  16386.  
  16387. Note:  This call prepares all file systems and device drivers for system 
  16388.        shutdown. Therefore, it must be called only when system shutdown is 
  16389.        about to occur. The user and applications will no longer have access to 
  16390.        their storage devices. 
  16391.  
  16392.  The following code fragment locks out changes to all file systems, and writes 
  16393.  system buffers to the disk in preparation for turning off power to the system. 
  16394.  
  16395.  
  16396.   Uses
  16397.     Crt,Dos,Os2Def,Os2Base;
  16398.  
  16399.   Var
  16400.     UlReserved : ULONG;  (* Reserved, must be zero        *)
  16401.     Ulrc       : APIRET; (* Return code                   *)
  16402.  
  16403.   Begin
  16404.  
  16405.     ulReserved := 0;       (* Reserved, must be set to zero *)
  16406.  
  16407.     ulrc := DosShutdown(ulReserved);
  16408.  
  16409.     If (ulrc <> 0) Then Begin
  16410.       Write('DosShutdown error: return code = ', ulrc);
  16411.       Halt;
  16412.     End;
  16413.  
  16414.   End.
  16415.  
  16416.  
  16417. ΓòÉΓòÉΓòÉ 11.2.7. Writing Cache Buffers ΓòÉΓòÉΓòÉ
  16418.  
  16419. DosResetBuffer is used to write to disk (flush) the file system's cache buffers 
  16420. for a specific file handle. When called with a value of hex FFFF for the file 
  16421. handle, DosResetBuffer writes all files belonging to the requesting process to 
  16422. disk (this usage should be administered with care, so the user is not burdened 
  16423. with insertion and removal of a large number of removable media volumes). 
  16424.  
  16425. When DosResetBuffer is called for single file handle, the directory entry for 
  16426. the file is updated as if the file had been closed. However, the file remains 
  16427. open. 
  16428.  
  16429. DosResetBuffer can also be called with the name of a named pipe. The process 
  16430. that calls DosResetBuffer is blocked at one end of the pipe until all data it 
  16431. has written has been successfully read by the process at the other end of the 
  16432. pipe. This enables communicating processes to synchronize their dialogs. 
  16433.  
  16434. The following code fragment opens a file, writes some data to the file's 
  16435. buffer, then writes the file's system buffer to the disk. 
  16436.  
  16437. Uses
  16438.   Crt,Dos,Os2Def,Os2Base;
  16439.  
  16440. Var
  16441.   HfFileHandle                : HFILE;  (* Handle for file being manipulated     *)
  16442.   UlAction                    : ULONG;  (* Action taken (returned by DosOpen)    *)
  16443.   UlWrote                     : ULONG;  (* Number of bytes written by DosWrite   *)
  16444.   Ulrc                        : APIRET; (* Return code                *)
  16445.   UchFileName : Array[0..19] of UCHAR;  (* Name of file               *)
  16446.   UchFileData : Array[0..99] of UCHAR;  (* Data to write to file      *)
  16447.  
  16448. Begin
  16449.   HfFileHandle              := 0;
  16450.   UlAction                  := 0;
  16451.   UlWrote                   := 0;
  16452.   Ulrc                      := NO_ERROR;
  16453.  
  16454.   StrCopy(UchFileName,'MYDATA.DAT');
  16455.   StrCopy(uchFileData,' ');
  16456.  
  16457.   (* Open the file MYDATA.DAT.  If the file already exists, replace it.
  16458.      If the file doesn't exist, create it.                           *)
  16459.  
  16460.   ulrc := DosOpen(uchFileName,                    (* Path and file name         *)
  16461.                   hfFileHandle,                  (* File handle                *)
  16462.                   ulAction,                      (* Action taken (returned)    *)
  16463.                   100,                           (* File primary allocation    *)
  16464.                   FILE_ARCHIVED or
  16465.                   FILE_NORMAL,                    (* File attributes            *)
  16466.                   OPEN_ACTION_CREATE_IF_NEW or
  16467.                   OPEN_ACTION_REPLACE_IF_EXISTS,  (* Open function type         *)
  16468.                   OPEN_SHARE_DENYREADWRITE or
  16469.                   OPEN_ACCESS_READWRITE,          (* Open mode of the file      *)
  16470.                   0);                            (* No extended attributes     *)
  16471.  
  16472.   If (ulrc <> NO_ERROR) Then Begin
  16473.     Writeln('DosOpen error: return code = ', ulrc);
  16474.     Exit;
  16475.   End;
  16476.  
  16477.  
  16478.   StrCopy (uchFileData,
  16479.            'Data....');     (* This data will be written to file *)
  16480.  
  16481.   ulrc := DosWrite (hfFileHandle,               (* File handle                  *)
  16482.                     uchFileData,        (* String to be written         *)
  16483.                     sizeof (uchFileData),       (* Size of string to be written *)
  16484.                     ulWrote);                  (* Bytes written (returned)     *)
  16485.  
  16486.   If (ulrc <> NO_ERROR) Then Begin
  16487.     Writeln('DosWrite error: return code = ', ulrc);
  16488.     DosClose(hfFileHandle);         (* close the file *)
  16489.     Exit;
  16490.   End;
  16491.  
  16492.   ulrc := DosResetBuffer(hfFileHandle);
  16493.  
  16494.   If (ulrc <> NO_ERROR) Then Begin
  16495.     Writeln('DosResetBuffer error: return code = ', ulrc);
  16496.     DosClose(hfFileHandle);         (* close the file *)
  16497.     Exit;
  16498.   End;
  16499.   DosClose(hfFileHandle);            (* close the file *)
  16500.  
  16501. End.
  16502.