Jump to content

DSK_QUERYMEDIASENSE

From EDM2
Revision as of 04:27, 19 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:DSK_QUERYMEDIASENSE}} ;Category:IOCTL_DISK (08h) ;Function:DSK_QUERYMEDIASENSE (60h) ;Description:Query Media Sense ==Description== This function returns the media sense information. ==Parameter Packet Format== {| class="wikitable" |+ Parameter Packet |- ! Field ! Length ! C Datatype |- | Command Information | BYTE | UCHAR |} ==Media Sense Information== On return, this field can be interpreted as follows: * 0: Unable to determine media type * 1: 7...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Category
IOCTL_DISK (08h)
Function
DSK_QUERYMEDIASENSE (60h)
Description
Query Media Sense

Description

This function returns the media sense information.

Parameter Packet Format

Parameter Packet
Field Length C Datatype
Command Information BYTE UCHAR

Media Sense Information

On return, this field can be interpreted as follows:

  • 0: Unable to determine media type
  • 1: 720KB diskette is present in 3.5-inch drive
  • 2: 1.44MB diskette is present in 3.5-inch drive
  • 3: 2.88MB diskette is present in 3.5-inch drive

Data Packet Format

Data Packet
Field Length C Datatype
Media Sense Information 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
22 ERROR_BAD_COMMAND
31 ERROR_GEN_FAILURE
87 ERROR_INVALID_PARAMETER
115 ERROR_PROTECTION_VIOLATION
117 ERROR_INVALID_CATEGORY
119 ERROR_BAD_DRIVER_LEVEL
163 ERROR_UNCERTAIN_MEDIA
165 ERROR_MONITORS_NOT_SUPPORTED

Remarks

This function is used to query the type of diskette present in a 3.5-inch drive.