Microsoft KB Archive/45880

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 18:23, 12 August 2020 by X010 (talk | contribs) (X010 moved page Microsoft KB Archive/Q45880 to Microsoft KB Archive/45880 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

BIOSPARAMETERBLOCK Is Incorrectly Defined in BSEDEV.H PSS ID Number: Q45880 Article last modified on 05-01-1991 PSS database name: O_Os2PrTk

1.00

OS/2

Summary:

Microsoft has confirmed that the data format BIOSPARAMETERBLOCK (the structure _BIOSPARAMETERBLOCK, which is also the typedef BIOSPARAMETERBLOCK) is incorrectly defined in the include file BSEDEV.H, included with the version 1.10 OS/2 Software Development Kit (SDK) and the version 1.00 OS/2 Programmer’s Toolkit (PTK).

To correct this problem, the field “abReserved” (a 6-byte array) should be inserted in the _BIOSPARAMETERBLOCK structure, between the fields “cLargeSectors” and “cCylinders”.

However, the definition for “abReserved” is properly defined in the QuickHelp database, as well as in the “Microsoft Operating System/2 Programmer’s Reference Volume 3.”

More Information:

The following is the INCORRECT definition, taken from BSEDEV.H:

typedef struct _BIOSPARAMETERBLOCK {    /* bspblk */
    USHORT usBytesPerSector;
    BYTE   bSectorsPerCluster;
    USHORT usReservedSectors;
    BYTE   cFATs;
    USHORT cRootEntries;
    USHORT cSectors;
    BYTE   bMedia;
    USHORT usSectorsPerFAT;
    USHORT usSectorsPerTrack;
    USHORT cHeads;
    ULONG  cHiddenSectors;
    ULONG  cLargeSectors;
    USHORT cCylinders;
    BYTE   bDeviceType;
    USHORT fsDeviceAttr;
} BIOSPARAMETERBLOCK;
typedef BIOSPARAMETERBLOCK FAR *PBIOSPARAMETERBLOCK;

The following is the CORRECT definition, taken from the QuickHelp database and from the “Microsoft Operating System/2 Programmer’s Reference Volume 3”:

typedef struct _BIOSPARAMETERBLOCK {    /* bspblk */
    USHORT usBytesPerSector;
    BYTE   bSectorsPerCluster;
    USHORT usReservedSectors;
    BYTE   cFATs;
    USHORT cRootEntries;
    USHORT cSectors;
    BYTE   bMedia;
    USHORT usSectorsPerFAT;
    USHORT usSectorsPerTrack;
    USHORT cHeads;
    ULONG  cHiddenSectors;
    ULONG  cLargeSectors;
    BYTE   abReserved[6];
    USHORT cCylinders;
    BYTE   bDeviceType;
    USHORT fsDeviceAttr;
} BIOSPARAMETERBLOCK;

The textual description of this field is as follows:

abReserved[6] Specifies six reserved bytes. These must be zero.

An updated version of BSEDEV.H that includes the “abReserved” field can be found in the Software/Data Library in the file BSEDEV11. This file can be found in the Software/Data Library by searching on the keyword BSEDEV11, the Q number of this article, or S12337. BSEDEV11 was archived using the PKware file-compression utility.

Copyright Microsoft Corporation 1991.