Microsoft KB Archive/27496

= &quot;Overflow&quot; Error Using QLBDUMP.BAS with Large Quick Library =

Article ID: 27496

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 4.0, when used with:
 * Microsoft MS-DOS 6.22 Standard Edition
 * Microsoft QuickBASIC 4.0b, when used with:
 * Microsoft MS-DOS 6.22 Standard Edition
 * Microsoft QuickBasic 4.5 for MS-DOS, when used with:
 * Microsoft MS-DOS 6.22 Standard Edition

-



This article was previously published under Q27496



SYMPTOMS
When running the program QLBDUMP.BAS, large Quick libraries can cause an &quot;Overflow&quot; error. The error occurs in the following line: QHdrPos = (EHdr.CParHdr + EHdr.CS) * 16 + EHdr.IP + 1 This error can be corrected by making the 16 into a long-integer constant. To do this, change the line to read as follows: QHdrPos = (EHdr.CParHdr + EHdr.CS) * 16& + EHdr.IP + 1 Alternatively, you can invoke the CLNG function as follows: QHdrPos = CLNG(EHdr.CParHdr + EHdr.CS) * 16 + EHdr.IP + 1



STATUS
Microsoft has confirmed this to be a bug in the QLBDUMP.BAS program example provided in QuickBasic Versions 4.00, 4.00b, and 4.50, and in Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2 (buglist6.00, buglist6.00b). This problem was corrected in Microsoft Basic Professional Development System (PDS) Version 7.00 for MS-DOS and MS OS/2 (fixlist7.00).



MORE INFORMATION
The problem occurs because the calculations on the right-hand side of the equation are being done in normal-integer math, even though the result is to be stored in a long-integer variable. Making the 16 a long integer forces the right-hand side of the equation to do its math in long-integer format.

The QLBDUMP program lets you display the routines that are stored in a .QLB Quick library. The QB.EXE editor uses Quick libraries for calling external routines. Quick libraries (.QLB files) have no other purpose.

Additional query words: QuickBas BasicCom B_BasicCom buglist4.00 buglist4.00b buglist4.50

Keywords: KB27496

-

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

© Microsoft Corporation. All rights reserved.