Jump to content

DSK_SETLOGICALMAP

From EDM2
Revision as of 04:09, 19 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:DSK_SETLOGICALMAP}} ;Category:IOCTL_DISK (08h) ;Function:DSK_SETLOGICALMAP (03h) ;Description:Set Logical Map ==Description== This function sets the next logical drive letter that is used to reference the drive. ==Parameter Packet Format== {| class="wikitable" |+ Parameter Packet |- ! Field ! Length ! C Datatype |- | Command Information | BYTE | UCHAR |} ==Data Packet Format== {| class="wikitable" |+ Data Packet |- ! Field ! Length ! C Datatype |-...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Category
IOCTL_DISK (08h)
Function
DSK_SETLOGICALMAP (03h)
Description
Set Logical Map

Description

This function sets the next logical drive letter that is used to reference the drive.

Parameter Packet Format

Parameter Packet
Field Length C Datatype
Command Information BYTE UCHAR

Data Packet Format

Data Packet
Field Length C Datatype
Logical Drive Number 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

When copying diskettes on a drive whose physical drive number has more than one logical drive letter assigned to it, the operating system issues diskette swap prompts to tell the user which logical drive letter is currently referencing the physical drive number. Function 03h is typically used to avoid this prompt by setting a drive number (corresponding to the drive letter) that is referenced in the next I/O request. The last logical drive letter assigned to the physical drive is determined by calling DSK_GETLOGICALMAP. On entry, a logical drive number (1=A, 2=B, and so forth) is specified. On return, this byte specifies the logical drive currently mapped to the drive that the specified file handle is opened on. A zero is returned if there is only one logical drive mapped onto this physical drive.