Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DSK_SETDEVICEPARAMS (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSDEVIOCTL
USHORT DosDevIOCtl(pbBPB, pbCommand, 0x0043, 0x0008, hDevice)
PBYTE pbBPB; /* pointer to structure with BIOS parameter blocks */
PBYTE pbCommand; /* pointer to buffer with command */
HFILE hDevice; /* device handle */
The DSK_SETDEVICEPARAMS function sets the device parameters for an MS OS/2
block device. The device driver maintains two BIOS parameter blocks (BPB)
for each disk drive. One block is the BPB that corresponds to the medium
currently in the disk drive. The other block is a recommended BPB, based on
the type of medium that corresponds to the physical device. For example, a
high-density disk drive has a BPB for a 96 tracks per inch (tpi) floppy
disk; a low-density disk drive has a BPB for a 48-tpi floppy disk.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pbBPB Points to the BIOSPARAMETERBLOCK structure that contains the
device parameters to be set for the drive.
pbCommand Point to the variable that contains the command description. This
variable can be one of the following values:
Value Meaning
─────────────────────────────────────────────────────────────────
BUILD_BPB_FROM_MEDIUM Build the BIOS parameter block (BPB) from
the medium for all subsequent build BPB
requests.
REPLACE_BPB_FOR_DEVICE Change the default BPB for the physical
device.
REPLACE_BPB_FOR_MEDIUM Change the BPB for the medium to the
specified BPB. Return the new BPB as the
BPB for the medium for all subsequent
build BPB requests.
hDevice Identifies the disk drive that receives the device-control
function. The handle must have been created previously by using
the DosOpen function.
Return Value
The return value is zero if the function is successful or an error value if
an error occurs.
See Also
DosOpen, DSK_GETDEVICEPARAMS, BIOSPARAMETERBLOCK
♦