Microsoft KB Archive/94582

From BetaArchive Wiki

BUG: Memory Loss From MOVE Overlaid Application

Q94582

7.00 | 1.00 1.50 1.51 1.52 MS-DOS | WINDOWS kbtool kbcode kbbuglist ---------------------------------------------------------------------- The information in this article applies to: - Microsoft C/C++ version 7.0 - Microsoft Visual C++ for Windows, versions 1.0, 1.5, 1.51, and 1.52 ---------------------------------------------------------------------- SYMPTOMS ======== An application created for the MS-DOS environment that uses the Microsoft Overlay Virtual Environment (MOVE) loses extended or expanded memory. CAUSE ===== When the application is linked together, the Microsoft C run-time library is not specified first in the list of libraries. RESOLUTION ========== Modify the linker command line to list the Microsoft C run-time library as the first library. STATUS ====== Microsoft has confirmed this to be a problem in products listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION ================ This error occurs when a MOVE application uses the graphics library distributed with Visual C++ and the graphics library is listed before the C run-time library. The following sample code demonstrates this problem. Each time you run this application, 4,096 bytes of extended memory is lost and becomes unavailable. Use mem to verify this. Sample Code ----------- /* * Compile options needed: /AM or /AL * Linker command to reproduce problem: * /NOD main over, test.exe,, graphics mlibce, test.def * Linker command to work around problem: * /NOD main over, test.exe,, mlibce graphics, test.def */ MAIN.C ------ #include void func(void); void main() { struct videoconfig vc; _getvideoconfig(&vc); func(); } OVER.C ------ void func() { printf("In func...\n"); } TEST.DEF -------- SEGMENTS main_text ovl:0 over_text ovl:1 Additional reference words: 7.00 1.00 1.50 KBCategory: kbtool kbcode kbbuglist KBSubcategory: MoveOverlay

Keywords : kb16bitonly
Issue type :
Technology : kbVCsearch kbAudDeveloper kbvc150 kbvc100 kbZNotKeyword3 kbCVC700 kbVC151 kbVC152


Last Reviewed: May 6, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.