I've been playing with some of KetilO's code. One macro is causing problems in uasm. It works without complaint in masm.
Here's a test program just to test the stdmethod macro-
.686
.model Flat, Stdcall
option Casemap :None ; case sensitive
.xmm
.nolist
include Windows.inc
uselibs macro libs:vararg
for nlib,<libs>
include nlib.inc
includelib nlib.lib
endm
endm
uselibs user32,kernel32 ;,comctl32,comdlg32,gdi32,shlwapi,ole32,msvcrt ; add ,masm32,debug for debug
inv equ invoke
.listall
stdmethod macro name,argl:vararg
local t1
local t2
t1 typedef proto this_:dword,argl
t2 typedef ptr t1
name t2 ?
ENDM
IUnknown struct
stdmethod QueryInterface,:DWORD,:DWORD
stdmethod AddRef
IUnknown ends
.code
Program:
inv ExitProcess,0
End Program
masm give these results:
00000008 IUnknown struct
stdmethod QueryInterface,:DWORD,:DWORD
1 local t1
1 local t2
1 ??0019 typedef proto this_:dword,:DWORD,:DWORD
1 ??001A typedef ptr ??0019
00000000 00000000 1 QueryInterface ??001A ?
stdmethod AddRef
1 local t1
1 local t2
1 ??001B typedef proto this_:dword,
1 ??001C typedef ptr ??001B
00000004 00000000 1 AddRef ??001C ?
While uasm complains with the following:
00000000 IUnknown struct
stdmethod QueryInterface,:DWORD,:DWORD
1 ??0019 typedef proto this_:dword,:DWORD,:DWORD
1 ??001A typedef ptr ??0019
00000000 1 QueryInterface ??001A ?
stdmethod AddRef
1 ??001B typedef proto this_:dword,??001C typedef ptr ??001B
Error A2084: Colon is expected
1 AddRef ??001C ?
Error A2210: Syntax error: AddRef
00000004 IUnknown ends
This is stuff I never do myself, and just convoluted enough that I can't quite see how to make uasm happy.
Anyone have a suggestion as how to make this work?