GObject implements objects in plain C by using a handful of conventions: Static methods are just functions taking the instance struct as first argument. Virtual methods are implemented as function pointers in a class struct (a kind of vtable). You can have inheritance by placing a parent class struct in the child class struct, and so on.
COM is a different object system, used in Windows, and designed to coincide with C++'s memory layout (at least with the MSVC compiler). Objects have a vtable, to which you can get an interface pointer, and then you can call the methods of the object. The calling convention used is very similar (identical?) to the one described above, you pass the instance pointer as first argument.
Now, I'm wondering, is it possible to make a GObject class/object that would also be valid in COM? I'm thinking by e.g. placing a pointer to the class struct in the beginning of the instance struct, and writing some glue code. Would I then be able to QueryInterface a pointer to my GObject subclass and call virtual methods on it?
If it would work, could you outline how?
If it wouldn't work, what are the differences in the object system making it impossible?