core.sys.windows.com.ComObject apparently has wrongly laid out Vtable
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Tue Mar 19 18:35:38 UTC 2024
Basically what you are seeing is normal C++ class behavior.
The only difference between a C++ class reference and a COM class
reference, is that the methods in the vtable is stdcall for COM.
It's worth noting that for every class and interface in a given class
hierarchy, each have different vtables for a given object.
This is why you must cast the D object to IUnknown first before
inspecting its reference.
Which reflects what the compiler is doing when you inherit from
IUnknown, set the default calling convention and convert to a C++
class/interface.
More information about the Digitalmars-d
mailing list