News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Where is defined coinvoke

Started by untio, June 27, 2010, 03:06:25 PM

Previous topic - Next topic

untio

Hi to all,
I have seen a lot of examples in this forum using "coinvoke" to use ole objects.
But I looked for with the explorer of my windows xp inside the masm32 folder files that contain this word and it has found zero files.
May be my question is simple, but where it is defined "coinvoke".

Thanks and sorry for this simple question.

TmX


untio

A lot of thanks TmX,
I know that an updated api is a dificult task, but I think that it could be very helpful if an stuff like this were in the masm32 installer.

Best regards.

ecube

untilo all his great COM examples and docs use to come with MASM32, i've complained about it being removed for years, never really got an answer to why that is. I highly doubt ernest requested it.

untio

Hi,
The problem is that ole is needed to do a lot of tasks with windows api. The last weekend I have done a little program that opens a console with the path changed to the folder that is entered as parameter. With a folder it worked right, but I wanted that it worked with a link to a folder. And I have ended rewriting it in C++, because I needed access to IShelllink.
At the end I would must give thanks to Microsoft, because to write some programs I must end writing them in Visual C++ express 2005. It is curious that a developer of open source software like I, must depend of the generosity of Microsoft.
Thanks for your answer.

Vortex

Here is my coinvoke macro :


coinvoke MACRO ppv:REQ,interface:REQ,member:REQ,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16

    FOR arg,<p16,p15,p14,p13,p12,p11,p10,p9,p8,p7,p6,p5,p4,p3,p2,p1>

        IFNB <arg>

            push arg

        ENDIF

    ENDM

    mov     eax,ppv
    push    eax
    mov     eax,DWORD PTR [eax]
    call    interface.member[eax]

ENDM


Example :
coinvoke pAD,IActiveDesktop,SetWallpaper,OFFSET DesktopImg,0

untio

Thanks for your macro, Vortex,
I think that I shall use it a lot in the future, but first I shall read some book about ole in assembly.

Thanks to all for your time.