PDA

View Full Version : How to use Microsoft COM interfaces in QT?



luochen601
28th May 2010, 10:42
The COM is distributed under VC++, it supply interface for IM usage. Now I want to add a UI for this IM, which would be desiged by Qt. My Qt is qt-sdk-win-opensource-2010.02.1. in windows XP system.

The COM is not installed in my system, so the total COM files are:
../Bin/ *.dll, Microsoft.VC90.CRT.manifest
../IDL/ *.idl (only two files)
../TLB/ *.tlb (only two files)
../Include/ *.c *.h (two files respective)

The question is how to make use of that COM interface in my Qt project?

squidge
28th May 2010, 13:03
Have a look at ActiveQt

luochen601
31st May 2010, 03:04
I had read the ActiveQt, but the example load the COM that had registered in system. But my COM is not registered.
so in QAxObjec's setControl(QString &) function cannot instantiate correctly.
Please help me for detail, thanks a lot.

ChrisW67
31st May 2010, 04:22
The normal mode of operation on Windows is that COM objects must be registered in the system registry. If you cannot do this then you will need to investigate ways to access the COM object using the Microsoft manifest files (http://msdn.microsoft.com/en-us/library/ms973913.aspx) or some other method (Google DirectCOM). I assume that with the manifests in place ActiveQt will just work, but I haven't tried that.