On Friday 04 February 2005 16.11, gogins@xxxxxxxxxxxx wrote: > In macro-less ANSI C: > > typedef struct IUnknownVirtualFunctionTable_ > { > uint32_t (*QueryInterface)(void *thisPointer, REFID interfaceIdentifier, > void **pointerToReceivePointerToInterface); > uint32_t (*AddRef)(void *thisPointer); > uint32_t (*Release)(void *thisPointer); > } IUnknownVirtualFunctionTable; > > typedef struct IUnknown_ > { > IUnknownVirtualFunctionTable *iunknownVirtualFunctionTable; > } IUnknown; [...] > This is byte for byte identical to a C++ class for IUnknown. Last time I looked, this was how Delphi (Object Pascal) did it as well - though of course, you'd have to instruct it to use C/C++ callling conventions rather than Pascal conventions, which may still be the default. //David Olofson - Programmer, Composer, Open Source Advocate .- Audiality -----------------------------------------------. | Free/Open Source audio engine for games and multimedia. | | MIDI, modular synthesis, real time effects, scripting,... | `-----------------------------------> http://audiality.org -' --- http://olofson.net --- http://www.reologica.se --- ---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission. Archive: //www.freelists.org/archives/gmpi Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe