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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
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.
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

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 ;)
Closed, 125 points refunded.
Site Admin

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.