On 19.11.2009 17:23, Vincent Povirk wrote: > The Windows SDK defines the following type: > > struct __declspec(novtable) GdiplusAbort > { > virtual HRESULT __stdcall Abort(void) = 0; > }; >
> I don't think I can provide a proper C++ definition because the abi > depends on the compiler. Depends; with limitations this is possible. For cases like above - ie "interface" kind of structs with no members, only virtual methods and explicit calling convention specified - the resulting struct layout is the same between MSVC and g++ (at least on MinGW) and can be passed from binary code of one to another. If Linux g++ produces the same struct layout as it does on mingw it would be viable to keep the C++ version for, well, client sources written in C++. > Does this look correct? You forgot __stdcall on 'Abort' member of gpabort_vtable. -f.r.