How COM stuff works?

Hi All,

First, let me describe the situation. Althought this is a general question, please don't point me to read some MS book about this topic. I'll try to be short.

I am trying to write a Delphi app that works with my SkyStar2 DVB card. The card comes with a file called This file implements some interfaces and can be registered by RegSvr32. I have also the SDK with some documents, but I noticed that the documents and the actual file set do not match! I meant the doc describes such a things that are not supported by the actual driver!!!

So I asked myself: If I cannot rely on the SDK documentation, how can I get the information directly from the driver?

But the file ( does not look like a kind of a TypeLib, so I cannot get any interface from it.

Indead, I made a "wild" try: I added a method declaration to the interface defined in the SDK, called "Blabla" with a random parameter list. That means it is a method that absolutely has no corresponding implementation in the driver's code. Then I compiled the application. Certaintly, the compiler did not complain. How could it know that it was a fake method. I had told the compiler that I have an object that implements an interface that has the Blabla method, and the compiler belived me. That was OK.

Then ran the application. It was successful to create the object of fake interface without any error / exception. The call to Blabla returned a negative value, probably saying its execution was failed.

Now my question is how COM stuff works? How can I figure out what is the real interface of the driver? I cannot rely on SDK doc, because it is simply useless. I cannot query the interface's description programatically (maybe because I don't know how). If I make a method call and get error, I even cannot know whether the method doesn't exist at all, or if it exists, but fails because of other reasons.

What shoud you do in this case?


Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

NetminderConnect With a Mentor Commented:
Closed, 125 points refunded.
Site Admin
the ax extension and the fact that it registered with the system makes me believe that indeed it's a COM dll which means that yo extract the necessary type information from it. (you can try to use a COM exploirer, this is the one I found on a quick search: )
you can also try to import it from delphi directly to create the pas files. I fyou don't find it in the loist (though I doubt that since it got regitered), then click on add and browse for the ax file.

after you have the pas files or the com exploerer listing, you should be able to get things going
ttdAuthor Commented:
As I wrote before, I cannot import it as a TypeLib into Delphi. I always get:

Error loading type library/DLL.

COM Explorer didn't list it.
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

ttdAuthor Commented:
If anyone want to try, it can be downloaded from:

You may not be able to install the driver if you don't have the DVB card, but you can extract the file from setup disk, then register it manually. It's a DirectX filter, but is a COM object also.
directx filters are com objects :)

does graphedit pick it up? (you can find it in directx sdk. or on the internet in some places)
ttdAuthor Commented:
Yes, of course, GraphEdit do pick it up. Software that requires it works fine. But again, all I want is to extract the interface description from it if possible.
I tried to get the filter out of there without installing the software. it's not exactly a happy thing to install drivers and stuff in windows if you don't need them since some stuff will remain after uninstallation.

I presume that you installed it correctly and loaded the neceesary reg fiels I saw in that archive or whatever else you have to do in order to install it (I haven't read through the help/readme/txt files)

regarding this issue: I made a small investigation and it turns out that directx filters are not activex controls. that is why you cannot import it.

now what I suggest is to use dspack from that will allow you to use the directx filter (among a lot more other stuff) I believe that a simple filtergraph should be enough to get it working.

there are of course tools to display filter properties but it's been a year since I last worked with this and can't remember what I used (can't fnd anything in this matter on my hdd either)
tehj basic usage is that you will render the filter's pin in order to get the stream going. you can of course connect the pins yourself if you know exactly what filters you need and want to be connected.

now what you have done in graphedit, you will do in delphi using the filtergraph component. the exact graph you created in graphedit needs to be created in filtergraph component: either by manually connecting the pins, or by rendering the input/output pin of your filter. also has a forum in which you can ask for further assistance if you think I cannot help you enough. Those people there know more about this issue than I do anyway :)

ttdAuthor Commented:

Thank for trying to help me, but you missed my question. My question is not how to use that particular filter. As I wrote, it works fine for me.

Beside the fact it is a filter, it has implemented some interfaces and my question was how to extract/see/display/list/whateveryouwant them.

In general, my question was how to extract an arbitrary interface of a COM object?

Again, thanks for trying. But please try to understand the problem first!

BTW, I have answered my question myself: If the typelib information is not embedded in the image file at compile-time, there is no way to query the interface later. The only way to use the interface is to rely on the SDK's docs, but if the docs lie, things will go wrong. That's all.
sorry for missing the point of your question.

you can ask in community support for a point refund ;)
All Courses

From novice to tech pro — start learning today.