DOC: Some CRT BIOS Functions Are Not Windows Compatible

ID: Q124192


The information in this article applies to:


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 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: July 22, 1999