Jump to content

DSK_DISKETTECONTROL

From EDM2
Revision as of 04:26, 19 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:DSK_DISKETTECONTROL}} ;Category:IOCTL_DISK (08h) ;Function:DSK_DISKETTECONTROL (5Dh) ;Description:Diskette Control ==Description== This function allows cooperative sharing of the diskette controller hardware by a separate device driver. ==Command Information== Indicates whether the application is requesting or returning exclusive ownership of the diskette controller, or querying the diskette device driver. Bits 0-1 are defined as follows: * 00: Resu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Category
IOCTL_DISK (08h)
Function
DSK_DISKETTECONTROL (5Dh)
Description
Diskette Control

Description

This function allows cooperative sharing of the diskette controller hardware by a separate device driver.

Command Information

Indicates whether the application is requesting or returning exclusive ownership of the diskette controller, or querying the diskette device driver. Bits 0-1 are defined as follows:

  • 00: Resume - This IOCtl resumes processing of diskette requests by the diskette driver.
  • 01: Suspend - When this IOCtl returns without error, the diskette driver will have relinquished control of the diskette hardware, including the IRQ level. Further requests to the diskette device from the operating system will be queued.
  • 10: Query - This IOCtl indicates whether the diskette driver is idle (no pending requests in the device driver queue). A return code of 0 (NO_ERROR) indicates the device driver is idle.

Parameter Packet Format

Parameter Packet
Field Length C Datatype
Command Information BYTE UCHAR

Data Packet Format

Data Packet
Field Length C Datatype
Reserved BYTE UCHAR

Returns

Possible values are shown in the following list:

Code Description
0 NO_ERROR
1 ERROR_INVALID_FUNCTION
6 ERROR_INVALID_HANDLE
15 ERROR_INVALID_DRIVE
31 ERROR_GEN_FAILURE
87 ERROR_INVALID_PARAMETER
111 ERROR_BUFFER_OVERFLOW
115 ERROR_PROTECTION_VIOLATION
117 ERROR_INVALID_CATEGORY
119 ERROR_BAD_DRIVER_LEVEL
163 ERROR_UNCERTAIN_MEDIA
165 ERROR_MONITORS_NOT_SUPPORTED

Remarks

If pending requests are detected, then the handling is up to the tape application. It is recommended that the tape application do an orderly clean-up of its activities and then issue a RESUME IOCTL to allow diskette requests to proceed and subsequently issue another SUSPEND IOCTL to reclaim the diskette hardware.