The MASM Forum

Microsoft 64 bit MASM => Examples => Topic started by: Greg_M on June 18, 2025, 03:52:31 PM

Title: "Invoke" 64-bit
Post by: Greg_M on June 18, 2025, 03:52:31 PM
Hi, I'm new to MASM and the MASM forums. The "INVOKE" documentation states "(32-bit MASM Only) ...".
https://learn.microsoft.com/en-us/cpp/assembler/masm/invoke?view=msvc-170 (https://learn.microsoft.com/en-us/cpp/assembler/masm/invoke?view=msvc-170)

I see code examples of INVOKE here, so I'm seeking understanding.

Update: Apparently, MASM INVOKE isn't applicable to 64-bit MASM (ml64.exe), but alternatives, such as macros, are.
Title: Re: "Invoke" 64-bit
Post by: jj2007 on June 18, 2025, 05:52:17 PM
Hi Greg,

Microsoft crippled ML64, so invoke, .if .else .endif, .Repeat ... .Until and others are no longer built-in. Therefore you basically have three options:
1. Bare metal: no macros (for Real MenTM)
2. The macros developed by Hutch and Vasily (https://masm32.com/board/index.php?topic=5579.msg59528#msg59528) in the Masm64 package
3. UAsm or JWasm (https://masm32.com/board/index.php?board=51.0)

Note that Vasily's invoke does not check for the number and/or type of parameters passed. JBasic's jinvoke (https://masm32.com/board/index.php?topic=9266.0) does, but it's work in progress.

Welcome to the forum :thup:
Title: Re: "Invoke" 64-bit
Post by: Greg_M on June 18, 2025, 06:12:38 PM
OK, thanks very much, including for the well-stated, and thorough number of, options!