News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

INVOKE error when compile x64 with VS2019

Started by yrendy, November 04, 2019, 11:09:08 PM

Previous topic - Next topic

yrendy

Hi guys, Im new with masm. Tried to compile simple program that calling
QuoteExitProcess proto
but when I tried to compile it says
Quoteerror A2008:syntax error : invoke
I tried the normal call with manual registry assign to RCX and its working.

My ml64 version: 
QuoteMacro Assembler (x64) Version 14.23.28106.4
I also tried example from Mikl__'s ml64 examples and it works whenever no INVOKE syntax.
Is this ml64 specific problem with vs2019?

hutch--

ML64 does not have a default "invoke", it can only be done with the pre-processor. The 64 bit version of MASM64 has this capacity.

yrendy

Oh okay thanks hutch. Been searching for an hour why the invoke doesnt work  :biggrin:

Mikl__

Hi, yrendy!
for use "invoke" I connect the file win64a.inc
File win64a.inc contents:OPTION DOTNAME
OPTION PROLOGUE:rbpFramePrologue
OPTION EPILOGUE:none
;--------------------------------------
include win64.inc
include temphls.inc <---
include kernel32.inc
includelib kernel32.lib
include ntdll.inc
includelib ntdll.lib
include user32.inc
includelib user32.lib
include msvcrt.inc
includelib msvcrt.lib
include ole32.inc
includelib ole32.lib
include gdi32.inc
includelib gdi32.lib
include comctl32.inc
includelib comctl32.lib
include comdlg32.inc
includelib comdlg32.lib
include shell32.inc
includelib shell32.lib
;---------------------------
pushaddr macro x
db 68h
dd x
endm
;----------------------------------
IMAGE_BASE equ 400000h
;---------------------------------
du macro string
local bslash
bslash = 0
irpc c,<string>
if bslash eq 0
if '&c' eq "/"
        bslash = 1
elseif '&c'gt 127
db ('&c'- 0B0h),4
else
dw '&c'
endif
else
           bslash = 0
           if '&c' eq "n"
           DW 0Dh,0Ah
           elseif '&c' eq "/"
           dw '/'
           elseif '&c' eq "r"
           dw 0Dh
           elseif '&c' eq "l"
           dw 0Ah
           elseif '&c' eq "s"
           dw 20h
           elseif '&c' eq "c"
           dw 3Bh
           elseif '&c' eq "t"
           dw 9
   endif
endif
endm
dw 0
endm
There are macros "invoke" and conditional constructions (.if, .while, .for and etc.) in file temphls.inc
In beginning of any asm-file; GUI # <-- subsystem for bat-file
include win64a.inc <---- macros, inc- and lib-files
.code
. . . .