Author Topic: IImgCtx COM Interface  (Read 9230 times)

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
Re: IImgCtx COM Interface
« Reply #15 on: June 18, 2012, 12:12:26 PM »
i think we've been through this, before   :P

Yes, I think we have, but I still don't understand how your system could have these defaults. Is it a configuration change that you made, or some MCE thing?
Well Microsoft, here’s another nice mess you’ve gotten us into.

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: IImgCtx COM Interface
« Reply #16 on: June 18, 2012, 12:28:07 PM »
well, before we go off thinking my machine is unique, let's run it on a few different machines   :P

but - yah, my machine is somewhat unique in this forum - lol
i am running XP MCE2005 SP3
i think i am the only MCE guy in here

FORTRANS

  • Member
  • ****
  • Posts: 944
Re: IImgCtx COM Interface
« Reply #17 on: June 18, 2012, 11:28:11 PM »
Hi,

   I'm getting errors on the printf lines.  Pointers?

Steve

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: IImgCtx COM Interface
« Reply #18 on: June 18, 2012, 11:43:31 PM »
it needs to be assembled with masm32 package v11, Steve
printf is a newer macro


qWord...
i am having trouble understanding how "_this" is implemented
i do not find it defined in the METHOD macro, or anywhere in the masm32 package
i know that it is the interface pointer - i just don't know how or where it is defined

disassembly of the "Load" call
Code: [Select]
:00401352 C745B000000000          mov dword[ebp-50], 00000000
:00401359 C745B400000000          mov dword[ebp-4C], 00000000
:00401360 C745B8C8000000          mov dword[ebp-48], 000000C8
:00401367 C745BCC8000000          mov dword[ebp-44], 000000C8
:0040136E 8D45B0                  lea eax, dword[ebp-50]
:00401371 50                      push eax
:00401372 FF3594304000            push dword[00403094]
:00401378 FF3590304000            push dword[00403090]
:0040137E FF5628                  call dword[esi+28]

EDIT - ok - i get it
it is just a parameter name   :P  (DOH !)

FORTRANS

  • Member
  • ****
  • Posts: 944
Re: IImgCtx COM Interface
« Reply #19 on: June 19, 2012, 12:13:28 AM »
Hi Dave,

   Thank you, that makes sense.

Regards,

Steve

qWord

  • Member
  • *****
  • Posts: 1454
  • The base type of a type is the type itself
    • SmplMath macros
Re: IImgCtx COM Interface
« Reply #20 on: June 19, 2012, 12:15:19 AM »
this is the object pointer, more specific a pointer to a structure that’s first member points allways to the virtual function table. The other members are the public and private data of the class. (c++ object model)
MREAL macros - when you need floating point arithmetic while assembling!

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: IImgCtx COM Interface
« Reply #21 on: June 19, 2012, 12:17:57 AM »
thanks qWord
yah - i figured it out - lol

Zen

  • Member
  • ****
  • Posts: 962
  • slightly red-shifted
Re: IImgCtx COM Interface
« Reply #22 on: June 19, 2012, 05:26:48 AM »
DAVE !!!
Quote from: DAVE !!!
...I am new to COM and I do not understand the CoInvoke macro - LOL,...
Although you now know what a COM object is,...here is an overview of COM activation: How Does COM Activation Work Anyway?
The CoInvoke macro does what CoCreateInstance does (for C++ programmers).
QWORD's explanation of the this pointer above is correct,...the central principal of the COM specification is that all COM objects are binary compatible, regardless of what language it was written in.

...And, as always,...I'm usually wrong about assembly language programming stuff,...
Zen

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: IImgCtx COM Interface
« Reply #23 on: June 19, 2012, 09:15:14 AM »
thanks baltoro - an interesting read