I've tried compiling some sample code with MASMv11 (XP+SP3) but it fails on the instruction "invoke Module32First, .."
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: C:\masm32\test.asm
***********
ASCII build
***********
C:\masm32\test.asm(40) : error A2006: undefined symbol : Module32First
_
Assembly Error
Press any key to continue . . .
I have the the following includes:
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include \masm32\include\advapi32.inc
include \masm32\include\msvcrt.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\advapi32.lib
includelib \masm32\lib\msvcrt.lib
Use Module32FirstW
More in \masm32\include\kernel32.inc
Hi,
I'm afraid I'm responsible about that. In kernel.inc there are the following definitions:
Module32FirstW PROTO STDCALL :DWORD,:DWORD
IFDEF __UNICODE__
Module32First equ <Module32FirstW>
ENDIF
Module32NextW PROTO STDCALL :DWORD,:DWORD
IFDEF __UNICODE__
Module32Next equ <Module32NextW>
ENDIF
while they should be:
Module32FirstW PROTO STDCALL :DWORD,:DWORD
IFDEF __UNICODE__
Module32First equ <Module32FirstW>
ELSE
Module32First equ <Module32First>
ENDIF
Module32NextW PROTO STDCALL :DWORD,:DWORD
IFDEF __UNICODE__
Module32Next equ <Module32NextW>
ELSE
Module32Next equ <Module32Next>
ENDIF
or even better:
Module32First PROTO STDCALL :DWORD,:DWORD
Module32FirstW PROTO STDCALL :DWORD,:DWORD
Module32Next PROTO STDCALL :DWORD,:DWORD
Module32NextW PROTO STDCALL :DWORD,:DWORD
Sorry! I'll report that to Hutch for next versions of MASM32. At the moment, you can write the following missing definitions in your source code:
Module32First PROTO STDCALL :DWORD,:DWORD
Module32Next PROTO STDCALL :DWORD,:DWORD