The information in this article applies to:
SYMPTOMSWhen you compile a Visual Basic project (by choosing Make EXE File from the File menu) more than once without making any modifications to the project, the size of the subsequent .EXE file may be different. In other applications, successive compilation of an application's unaltered files results in executable files of the same size. However, in Visual Basic the .EXE file usually increases in size with each compilation. CAUSE
Each Visual Basic application receives one data segment of up to 64K (minus
overhead) to store global variables and global constants. Space for the
global string constant descriptors is allocated in this data segment. The
actual text for global string constants is stored in a segment of up to 32K
(minus overhead), allocated separately from dynamic memory. WORKAROUNDIf you encounter the above situation, the only way to make consistent .EXE files so that any differences in size can be attributed to a problem like the one described in this article is to compile from the command line. In Program Manager, choose Run from the File menu and enter a Visual Basic command line like the one below in the Command Line text box: VB.EXE /Make SAMPLE.MAK SAMPLE.EXEBecause it is impossible to tell how much of the segment custom controls using VBCreateHlstr may need and because Visual Basic needs some of the space to manage the segment, you should also try to use as little space as possible for global string constants, thus attempting to avoid allocating another segment. To eliminate this possibility, you should try and reduce the space needed to store global string constant data to well under 32K. This space can be reduced by using fewer global string constants and by making the strings shorter. STATUSMicrosoft has confirmed this to be a bug in Visual Basic version 3.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION
Executable files compiled from the command line for the same unmodified
project are normally the same size, but they are not necessarily identical.
Executable files produced by Visual Basic contain some uninitialized data,
and when they are saved, they contain whatever happened to be at that
location on the disk. You will see these differences within the .EXE files
when comparing them with a binary-file comparison utility like DIFF. Q112860 General Memory Management in Visual Basic 3.0 for Windows Additional query words: buglist3.00 3.00 inconsistent
Keywords : |
Last Reviewed: September 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |