Microsoft KB Archive/124192

{|
 * width="100%"|

DOC: Some CRT BIOS Functions Are Not Windows Compatible

 * }

Q124192

-

The information in this article applies to:


 * The C Run-Time (CRT), included with:
 * Microsoft Visual C++, versions 1.0, 1.5, 1.52

-

SUMMARY
The documentation and online help incorrectly list the following C run-time functions as Windows and DLL compatible:

  bios_disk bios_keybrd bios_printer bios_serialcom. If any of these functions are called from a Windows-based application or DLL, the error "L2029: unresolved external" occurs at link time.

The most appropriate substitute for _bios_disk depends on what you are trying to do. Refer to the Windows API DOS3Call and books such as "Advanced MS-DOS Programming" by Ray Duncan.

MORE INFORMATION
The error occurs because the prototypes for these functions in BIOS.H are contained in #ifndef _WINDOWS blocks. This exclusion is correct because these functions are not Windows or DLL compatible.

It is not possible to support BIOS-level disk access while Windows is running, as there can be conflicts with device drivers working at this level. Page 311 of the Windows SDK "Guide to Programming" states, "Do not use the C run-time BIOS interface routines with Windows." The manual goes on to say that generally the interrupt 21h routines intdos, intdosx, and some of the _dos functions such as _dos_getdrive can be used, but only with caution.

Additional query words: 1.00 1.50 docerr

Keywords : kb16bitonly kbGrpDSTools

Issue type :

Technology : kbVCsearch kbAudDeveloper kbCRT