The MASM Forum

General => The Campus => Topic started by: x64Core on February 22, 2013, 04:29:08 PM

Title: MASM macros and Visual C++
Post by: x64Core on February 22, 2013, 04:29:08 PM
Hello all,


whats up guys, I want to know if possible use a MASM macro defined into a .asm file and use it in a VC project.
I have been playing a bit with this issue but I cant get out. for instance >


MyTRY MACRO lpExecHandler
    pushad
    mov esi, offset lpExecHandler
    push esi
    push dword ptr fs:[0]
    mov dword ptr fs:[0], esp
ENDM

And use this macro ( obviously insert that code into a call to the macro )
I know could write this in assembly inline but its just an example  :biggrin:
Title: Re: MASM macros and Visual C++
Post by: hutch-- on February 22, 2013, 07:03:19 PM
Only in direct MASM source, there is no way it can be used by CL.EXE, either as C code or inline asm.