Under Windows NT, Win16 Applications Opening MS-DOS Devices FailLast reviewed: September 25, 1997Article ID: Q167969 |
The information in this article applies to:
SYMPTOMSUnder certain circumstances, data written to LPT1 from a 16-bit Windows application running under Windows NT can corrupt other files. This corruption occurs when the application opens any MS-DOS device (as listed by MEM /D; for example, LPT1, COM1, CON, and so on) through the _lopen() RTL function and opens other data files. When the application writes data out through the LPT1 handle, the data is misrouted to one of the other files.
CAUSESome devices are handled internally by NTDOS without calling on the Win32 I/O system directly. For example, LPT1 is handled by calling the Windows NT emulated BIOS, which in turn uses OUT instructions to feed the data to the emulated LPT1 port. In this case, WOW mishandles several Interrupt 21 calls, including read file and write file, trying to pass these calls to Win32 but using an uninitialized bit of memory instead of a valid Win32 file handle. In some cases, this uninitialized memory will contain a value that is a valid handle value in the WOW process, and the data will be read from or written to that file instead of the intended device. In other cases, the Win32 file API fails because the handle is invalid.
STATUSMicrosoft has confirmed this to be a problem in Windows NT version 4.0. A supported fix is now available, but has not been fully regression-tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Technical Support for more information.
MORE INFORMATIONIt is highly irregular for a 16-bit Windows application to write to LPT1 through MS-DOS; the entire Windows 3.1/Windows 95 GUI will stop responding if the printer is slow or out of paper. The correct way would be to use OpenComm() and WriteComm(), which perform the write in the background (using an interrupt service routine) instead of blocking the computer (or WOW in this case) until the write completes. Keywords : kbbug4.00 nt16ap NTSrvWkst kb3rdparty kbbuglist Version : WinNT:4.0 Platform : winnt Hardware : x86 Issue type : kbbug Solution Type : kbfix |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |