PRB: MASM Code Using CMACROS.INC Does Not Build Correctly (100407)



The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) 3.1

This article was previously published under Q100407

SYMPTOMS

Attempting to build a Windows-based application with MASM code using a CMACROS.INC header file causes errors to be generated by the macro assembler.

CAUSE

The CMACROS.INC file is incompatible with the version of MASM being used.

RESOLUTION

When using MASM version 6.x, use the version of CMACROS.INC that comes with MASM. When using MASM version 5.1, use the version of CMACROS.INC that comes with the development product you are using, such as the Windows Software Development Kit (SDK) or the Windows Device Driver Kit (DDK).

MORE INFORMATION

MASM has changed considerably from version 5.1 to versions 6.x; the changes to the assembler include the removal of the second assembly pass and additions or modifications to the behavior of assembler directives. A complete list of the differences can be found in the product documentation of MASM versions 6.0 and later. Because of these changes, versions of CMACROS.INC compatible with MASM 5.1 are not compatible with MASM 6.x; likewise, versions of CMACROS.INC compatible with MASM 6.x are not compatible with MASM 5.1.

Most of Microsoft's development products include a version of CMACROS.INC that is compatible with MASM 5.1. Use this version of CMACROS.INC with MASM 5.1. If MASM version 6.0 or later is being used, use the CMACROS.INC that comes with it instead of the one that comes with the development product.

Modification Type:MinorLast Reviewed:7/14/2004
Keywords:kb16bitonly KB100407