FIX: Functions Exported Incorrectly in MASM 6.1 WINDLL Sample

ID: Q104041


The information in this article applies to:
  • Microsoft Macro Assembler (MASM) for MS-DOS, versions 6.1, 6.1a


SYMPTOMS

The SYSDATA.EXE sample program supplied with the Microsoft Macro Assembler (MASM) versions 6.1 and 6.1a displays incorrect data when run. (This assumes you have already successfully built SYSINFO.DLL using the provided makefile, SYSINFO.MAK.)


CAUSE

SYSDATA.EXE was built with a different import library than the one created from the SYSINFO files shipped with MASM. Therefore, SYSDATA.EXE does not correctly call the functions within SYSINFO.DLL, which causes the program to display incorrect data.


RESOLUTION

There are two solutions (described below) to the problem. If you have the Microsoft Windows Software Development Kit (SDK), you can choose either solution. The SDK is relevant because RC.EXE is required to build SYSDATA.EXE. RC.EXE is shipped with the SDK and is not included with MASM.

  • If you have the SDK, you can rebuild SYSDATA.EXE using SYSDATA.MAK. This uses the import library produced from building SYSINFO.DLL--SYSINFO.LIB. When you run the rebuilt SYSDATA.EXE, the correct data is displayed.


  • If you do not have the SDK, you need to first modify SYSINFO.DEF so that it resembles the following:
    
          EXPORTS
                  GetSysTime   @1
                  GetSysDate   @2
                  GetSysInfo   @3
                  WEP          @4   RESIDENTNAME 
    After making the changes, rebuild SYSINFO.DLL using SYSINFO.MAK. When you then run SYSDATA.EXE, it will correctly reference the functions within the rebuilt SYSINFO.DLL and display the correct data.



STATUS

Microsoft has confirmed this to be a problem in MASM version 6.1, and 6.1a. This problem was corrected in MASM version 6.11.

Additional query words: 6.10 6.10a

Keywords :
Version : :6.1,6.1a
Platform :
Issue type :


Last Reviewed: January 6, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.