Board index » cppbuilder » General question about using COM objects

General question about using COM objects


2004-10-01 05:05:52 PM
cppbuilder14
Hello everybody:-)
I know this should be a very silly question, but ... I'm only a beginner!:)
How to use a COM object when U don't have its type library and U can't
import it as an ActiveX??
I explain my specific problem to be clearer: I'm working with DirectShow
stuff and filters are implemented as COM objects and I get their interfaces
through CoCreateInstance, I know that their GUID is declared in uuids.h, but
when I tried to use DivX filter its GUID was not defined there, so I
searched the registry and added its GUID declaration... so the compiler
stopped to claim, but then the linker did!! What do I need to link? O more
generally how to use a general COM object in my projects? VB seems to work
without knowing anything about those objects!!
Thank U very much in advance!
Stefano B.
 
 

Re:General question about using COM objects

You can get Builder to create wrapper classes/objects by using the Import
Type Library wizard.
If you have it in your version of Builder, it will generate _TLB.h, and
_TLB.cpp files that you need to add to your project.
These include all the interface definitions/GUIDS etc.
The library you need to import is called Quartz.dll.
VB has it's VM to do the durty work and hide all the COM stuff away from the
programmer.
Stew
"Stefano Bonifazi" < XXXX@XXXXX.COM >wrote in message
Quote
Hello everybody:-)
I know this should be a very silly question, but ... I'm only a
beginner!:)
How to use a COM object when U don't have its type library and U can't
import it as an ActiveX??
I explain my specific problem to be clearer: I'm working with DirectShow
stuff and filters are implemented as COM objects and I get their
interfaces
through CoCreateInstance, I know that their GUID is declared in uuids.h,
but
when I tried to use DivX filter its GUID was not defined there, so I
searched the registry and added its GUID declaration... so the compiler
stopped to claim, but then the linker did!! What do I need to link? O more
generally how to use a general COM object in my projects? VB seems to work
without knowing anything about those objects!!
Thank U very much in advance!
Stefano B.


 

Re:General question about using COM objects

Thank U Mr Stew,
but Quartz.dll is the DirectShow dll ... I already can access those
interfaces (I dowloaded the MS DX SDK, and the BCB DX compliant libs!!), I
need DivX (do U know this famous AVI compressor?) interface that is not part
of MS DirectX, but it seems that BCB "Import Type Library wizard" cannot get
the TLB from the divxdec.ax file or from DivX.dll!!
Any idea?
Stefano B.
"BigStew" < XXXX@XXXXX.COM >ha scritto nel messaggio
Quote
You can get Builder to create wrapper classes/objects by using the Import
Type Library wizard.
If you have it in your version of Builder, it will generate _TLB.h, and
_TLB.cpp files that you need to add to your project.
These include all the interface definitions/GUIDS etc.
The library you need to import is called Quartz.dll.
VB has it's VM to do the durty work and hide all the COM stuff away from
the
programmer.

Stew


 

{smallsort}