home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pascal / vdl020d.zip / VIOCTL.DOC < prev    next >
Text File  |  1993-04-14  |  9KB  |  174 lines

  1. {
  2.  ══════════════════════════════════════════════════════════════════════════════
  3.  
  4.  Visionix DOS IOCTL Device-Oriented Functions Unit (VIOCTL)
  5.  Copyright 1992,93 Visionix
  6.  ALL RIGHTS RESERVED
  7.  
  8.  ──────────────────────────────────────────────────────────────────────────────
  9.  
  10.  Revision history in reverse chronological order:
  11.  
  12.  Initials  Date      Comment
  13.  ────────  ────────  ──────────────────────────────────────────────────────────
  14.  
  15.  mep       02/11/93  Cleaned up code for beta release
  16.  
  17.  lpg       12/27/92  Created
  18.  
  19.  ══════════════════════════════════════════════════════════════════════════════
  20.  
  21. Ioctl Device-Oriented Functions Summary
  22. ---------------------------------------
  23.  
  24. INT 21h
  25.  
  26. Func | Sub |Minor| Name                               | Use
  27. -----+-----+-----+------------------------------------+--------------------------------------
  28.  44h | 00h |  -  | Get device data                    | Gets the device data work used to control device
  29.  44h | 01h |  -  | Set device data                    | Sets the device data work used to control device
  30.  44h | 02h |  -  | Receive control data from char dev | Receives a string from char-oriented device
  31.  44h | 03h |  -  | Send control data to char device   | Sends a string to char-oriented device
  32.  44h | 04h |  -  | Receive control data from block dev| Receives a block from block-oriented device
  33.  44h | 05h |  -  | Send control data to block device  | Sends a block to block-oriented device
  34.  44h | 06h |  -  | Check device input status          | Checks input device for readiness
  35.  44h | 07h |  -  | Check device output status         | Checks output device for readiness
  36.  44h | 08h |  -  | Does dev use remov Media           | Reports whether block device contains removable media
  37.  44h | 09h |  -  | Is drive remote                    | Reports whether block device is local or remote (network)
  38.  44h | 0Ah |  -  | Is file or device remote           | Reports whether handle referencing device is local or remote
  39.  44h | 0Bh |  -  | Set sharing retry count            | Sets number of retries and pause between them for a file-sharing device
  40.  
  41.  44h | 0Ch |  -  | Generic IOCTL for char device      | Sets or gets number of retries for printer devices;prepares code pages
  42.  44h | 0Ch | 45h | Set iteration count                |
  43.  44h | 0Ch | 4Ah | Select code-page                   |
  44.  44h | 0Ch | 4Ch | Start code-page prepare            |
  45.  44h | 0Ch | 4Dh | End code-page prepare              |
  46.  44h | 0Ch | 5Fh | Set display mode                   |
  47.  44h | 0Ch | 65h | Get iteration count                |
  48.  44h | 0Ch | 6Ah | Query selected code page           |
  49.  44h | 0Ch | 6Bh | Query code-page prepare list       |
  50.  44h | 0Ch | 7Fh | Get display mode                   |
  51.  
  52.  44h | 0Dh |  -  | Generic IOCTL for block device     | Sets/gets block device parameters; write/reads/formats/verifies tracks
  53.  44h | 0Dh | 40h | Set device parameters              |
  54.  44h | 0Dh | 41h | Write track on logical drive       |
  55.  44h | 0Dh | 42h | Format track on logical drive      |
  56.  44h | 0Dh | 46h | Set media ID                       |
  57.  44h | 0Dh | 60h | Get device parameters              |
  58.  44h | 0Dh | 61h | Read track on logical drive        |
  59.  44h | 0Dh | 62h | Verify track on logical drive      |
  60.  44h | 0Dh | 66h | Get media ID                       |
  61.  44h | 0Dh | 68h | Sense media type                   |
  62.  
  63.  44h | 0Eh |  -  | Get logical drive map              | Reports logical drive mapping
  64.  44h | 0Fh |  -  | Set logical drive map              | Sets logical to physical drive mapping
  65. -----+-----+-----+------------------------------------+--------------------------------------
  66.  
  67.  
  68. NOTE: Use Function GetExtendedError to Process and Parse Error Message
  69.  
  70. }
  71.  
  72. Unit VShare;
  73.  
  74.  
  75. {──────────────────────────────────────────────────────────────────────────────}
  76.  
  77. Function  IOCTL_GetDevData(          DevHandle      : WORD;
  78.                                  VAR DevData        : WORD  ) : WORD;
  79.  
  80. Function  IOCTL_SetDevData(          DevHandle      : WORD;
  81.                                      DevData        : WORD  ) : WORD;
  82.  
  83. Function  IOCTL_RcvCtrlFromCharDev(  DevHandle      : WORD;
  84.                                      BytesToRead    : WORD;
  85.                                  VAR Buffer         : POINTER;
  86.                                  VAR BytesRead      : WORD  ) : WORD;
  87.  
  88. Function  IOCTL_SendCtrlToCharDev(   DevHandle      : WORD;
  89.                                      BytesToWrite   : WORD;
  90.                                      Buffer         : POINTER;
  91.                                  VAR BytesWritten   : WORD  ) : WORD;
  92.  
  93. Function  IOCTL_RcvCtrlFromBlockDev( DriveNum       : BYTE;
  94.                                      BytesToRead    : WORD;
  95.                                  VAR Buffer         : POINTER;
  96.                                  VAR BytesRead      : WORD  ) : WORD;
  97.  
  98. Function  IOCTL_SendCtrlToBlockDev(  DriveNum       : BYTE;
  99.                                      BytesToWrite   : WORD;
  100.                                      Buffer         : POINTER;
  101.                                  VAR BytesWritten   : WORD  ) : WORD;
  102.  
  103. Function  IOCTL_GetInputStatus(      DevHandle      : WORD;
  104.                                  VAR ErrCode        : WORD  ) : BYTE;
  105.  
  106. Function  IOCTL_GetOutputStatus(     DevHandle      : WORD;
  107.                                  VAR ErrCode        : WORD  ) : BYTE;
  108.  
  109. Function  IOCTL_DevUseRemovMedia(    DriveNum       : BYTE;
  110.                                  VAR ErrCode        : WORD  ) : BOOLEAN;
  111.  
  112. Function  IOCTL_IsDriveRemote(       DriveNum       : BYTE;
  113.                                  VAR ErrCode        : WORD  ) : BOOLEAN;
  114.  
  115. Function  IOCTL_IsDevRemove(         DevHandle      : WORD;
  116.                                  VAR ErrCode        : WORD  ) : BOOLEAN;
  117.  
  118. Procedure IOCTL_SetShareRetryCnt(    RetryCnt       : WORD;
  119.                                      Pause          : WORD;
  120.                                  VAR ErrCode        : WORD  );
  121.  
  122.  
  123. {---------------------------------}
  124. { Functions for Character Devices }
  125. {---------------------------------}
  126.  
  127.  
  128. {-----------------------------}
  129. { Functions for Block Devices }
  130. {-----------------------------}
  131.  
  132. {──────────────────────────────────────────────────────────────────────────────}
  133.  
  134. (*
  135.  44h | 00h |  -  | Get device data                    | Gets the device data work used to control device
  136.  44h | 01h |  -  | Set device data                    | Sets the device data work used to control device
  137.  44h | 02h |  -  | Receive control data from char dev | Receives a string from char-oriented device
  138.  44h | 03h |  -  | Send control data to char device   | Sends a string to char-oriented device
  139.  44h | 04h |  -  | Receive control data from block dev| Receives a block from block-oriented device
  140.  44h | 05h |  -  | Send control data to block device  | Sends a block to block-oriented device
  141.  44h | 06h |  -  | Check device input status          | Checks input device for readiness
  142.  44h | 07h |  -  | Check device output status         | Checks output device for readiness
  143.  44h | 08h |  -  | Does dev use remov Media           | Reports whether block device contains removable media
  144.  44h | 09h |  -  | Is drive remote                    | Reports whether block device is local or remote (network)
  145.  44h | 0Ah |  -  | Is file or device remote           | Reports whether handle referencing device is local or remote
  146.  44h | 0Bh |  -  | Set sharing retry count            | Sets number of retries and pause between them for a file-sharing device
  147.  
  148.  44h | 0Ch |  -  | Generic IOCTL for char device      | Sets or gets number of retries for printer devices;prepares code pages
  149.  44h | 0Ch | 45h | Set iteration count                |
  150.  44h | 0Ch | 4Ah | Select code-page                   |
  151.  44h | 0Ch | 4Ch | Start code-page prepare            |
  152.  44h | 0Ch | 4Dh | End code-page prepare              |
  153.  44h | 0Ch | 5Fh | Set display mode                   |
  154.  44h | 0Ch | 65h | Get iteration count                |
  155.  44h | 0Ch | 6Ah | Query selected code page           |
  156.  44h | 0Ch | 6Bh | Query code-page prepare list       |
  157.  44h | 0Ch | 7Fh | Get display mode                   |
  158.  
  159.  44h | 0Dh |  -  | Generic IOCTL for block device     | Sets/gets block device parameters; write/reads/formats/verifies tracks
  160.  44h | 0Dh | 40h | Set device parameters              |
  161.  44h | 0Dh | 41h | Write track on logical drive       |
  162.  44h | 0Dh | 42h | Format track on logical drive      |
  163.  44h | 0Dh | 46h | Set media ID                       |
  164.  44h | 0Dh | 60h | Get device parameters              |
  165.  44h | 0Dh | 61h | Read track on logical drive        |
  166.  44h | 0Dh | 62h | Verify track on logical drive      |
  167.  44h | 0Dh | 66h | Get media ID                       |
  168.  44h | 0Dh | 68h | Sense media type                   |
  169.  
  170.  44h | 0Eh |  -  | Get logical drive map              | Reports logical drive mapping
  171.  44h | 0Fh |  -  | Set logical drive map              | Sets logical to physical drive mapping
  172. *)
  173.  
  174.