Microsoft KB Archive/67313

= &quot;Bad Record Number&quot; Using Network Printer in OS/2, LANMAN 2.00 =

Article ID: 67313

Article Last Modified on 11/21/2006



This article was previously published under Q67313



SYMPTOMS
When the MS-DOS device &quot;LPT1&quot; or &quot;LPT2&quot; is OPENed to print over a Microsoft LANMAN version 2.00 network printer under OS/2, the error &quot;Bad record number in line  in module at address xxxx:xxxx&quot; will occur when the device is closed. This error does not occur when printing to a local printer or to a LANMAN 2.00 network printer under MS-DOS.



WORKAROUND
To work around the problem, open the Basic logical device &quot;LPTn:&quot; instead of the MS-DOS &quot;LPTn&quot; device. The following code example will compile and run without error when run under MS-DOS or OS/2, and printing to a local or network printer device: OPEN &quot;LPT1:&quot; FOR OUTPUT AS #1 PRINT &quot;Hello world&quot; CLOSE #1 NOTE: There is a problem when the Basic device &quot;LPTn:&quot; is opened across two CHAINed programs. For more information, please query on the following words:

CHAIN and device and I/O and LPT1 and LPRINT



STATUS
Microsoft has confirmed this to be a bug in programs compiled with Microsoft Basic Compiler versions 6.00 and 6.00b for MS OS/2 and in Microsoft Basic PDS (Professional Development System) versions 7.00 and 7.10 for MS OS/2. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
The following code segment demonstrates the &quot;Bad record number&quot; error when compiled and run under OS/2 with logical device &quot;LPT1:&quot; connected to a Microsoft LANMAN 2.00 network.

NOTE: The code example will compile and run without error when run under MS-DOS or if the logical device LPT1: refers to a local printer. OPEN &quot;LPT1&quot; FOR OUTPUT AS #1 PRINT &quot;Hello world&quot; CLOSE #1

Additional query words: BasicCom buglist6.00 buglist6.00b buglist7.00 buglist7.10

Keywords: KB67313

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.