DOCERR: Some CRT BIOS Functions Are Not Windows CompatibleLast reviewed: July 22, 1997Article ID: Q124192 |
1.00 1.50 1.51
WINDOWS
kbprg kbdocerr
The information in this article applies to:
The C Run-time (CRT) included with: - Microsoft Visual C++ for Windows, versions 1.0, 1.5, and 1.51
SUMMARYThe 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 INFORMATIONThe 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 reference words: 1.00 1.50 docerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |