4 ms·
Not exactly. They use a different calling convention (for systems where 'this' pointers are normally passed in a special place) from usual C++ classes to match
by ntauthority 5y ago
Not exactly. They use a different calling convention (for systems where 'this' pointers are normally passed in a special place) from usual C++ classes to match C-ish, and there's a few other restrictions for things (overloads, inheritance) that otherwise differ across C++ ABIs and wouldn't map well to other non-C++ languages.
The C wrappers generated by MIDL are also fairly similar to raw C++, compare (where pUnk is an IUnk *):
pUnk->Something(&bA);
with...
IUnk_Something(pUnk, &bA);
which expands to something like this:
pUnk->lpVtbl->Something(pUnk, &bA);