core.sys.windows.com.ComObject apparently has wrongly laid out Vtable

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sun Mar 24 15:05:07 UTC 2024


On 25/03/2024 3:39 AM, Carl Sturtivant wrote:
> On Wednesday, 20 March 2024 at 06:16:01 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> The only difference I'm aware of between a class that inherits from 
>> IUnknown and extern(C++) should be the calling convention used for the 
>> functions in the vtable.
> 
> I just read-read the entire thread and this jumped out at me. My latest 
> proof of concept above endorses this position. It would be very helpful 
> if you investigated and fully confirmed that the difference you stated 
> is indeed the only difference? Then this thread will have reached its 
> conclusion.

Have a closer look at the header file for IUnknown and compare the 
interface to the c-style struct.

IUnknown is a regular C++ interface.

The c-style struct uses ``extern(Windows)`` function pointers in a 
vtable struct.

This doesn't mean that there are no other changes, but as far as this 
thread is concerned I think that confirms what you wanted to know.


More information about the Digitalmars-d mailing list