From: Hilary C. <hil...@us...> - 2002-01-30 02:14:35
|
Hi All, I am trying implements a COM Object though C++ class. It means I create a new C++ Instance and pass the this object to the Microsoft COM Object. But I found that there is a bug (?) of mingw32 for the generation of vtable. class __attribute__((com_interface)) IHelloWorld : public IOleClientSite, IDispatch I have implemented all the interface of the IOleClientSite, IDispatch, IUnknown. IDispatch and IUnknown is fine. It has no problems for the Microsoft COM Object to call the IDispatch and IUnknown Methods. But for the IOleClientSite interface, Microsoft COM Object throws a exception that indicated there is a null pointer to the IOleClientSite. I have tried to generate the assembly files thought gcc. It has generated the vtable and function pointer of IDispatch and IUnknown. But there is no Function Implementation of IOleClientSite. If I add one more interface implementation of to my classes, like the following class __attribute__((com_interface)) IHelloWorld : public IServiceProvider, IOleClientSite, IDispatch It has generated the IOleClientSite function implementations. But No IServiceProvider function implementations. It is STRANGE! or am I miss sths during COM implementation ? ( I know that mingw32 has not got the full COM implementation.) Regards, Hilary |