How do I build a DirectShow filter with Visual C++ 5.0?

991 Views Asked by At

I would like to try to build a DirectShow transform-filter.

I have been away from programming for a number of years, and would like to try to maybe pick it up again.

I would like to attempt to design a transform-filter for videostreams using DirectShow.

But I can't get my old Visual C++ 5.0 to build any of the DirectShow-samples.

I think I once could, but now I have switched computers a couple of times, and I don't remember what I did to make it work in the past. I installed DirectX 9.0 about 10-15 years ago, but I can no longer find the installation-files, so I have just copied the dxsdk-folders holding the installation to the new installation of Visual C++ 5.0.

When I try to build one of the samples, it says "\DXSDK\INCLUDE\strmif.h(28) : fatal error C1189: #error : this stub requires an updated version of rpcndr.h"

I don't know why I don't have it any longer. I don't remember whether in the past, maybe I installed an update to Visual C++ which may have included it. I just don't remember.

I tried to find the install files for DirectX 9, but the only one I can get at Microsoft is DirectX 10, which is just a few years old, and no longer seems to include DirectShow. And I don't know if getting a fresh installation of DirectX would even solve the problem of the outdated "rpcndr.h"?

I tried to install the Visual Studio 2015 Community which is available at Microsoft, but it seemed to install at an excrutiatingly low pace, and it seemed from Googling it, that it was not uncommon for people to wait a day or two for it to finish installing! Also, it wanted to install 13 GB on my computer, just for a programming environment, and my needs are much simpler than that. So I gave it up.

I like my old Visual C++ 5.0. It's what I used to learn to program, and I just barely know my way around it. Also, it bugs me that it wouldn't be supported anymore, since it seems perfectly able to compile and build good programs. It doesn't seem like there's an obvious reason why it shouldn't be able to compile and build a DirectShow filter or application. So I would like to continue using it, even to make a DirectShow filter

Can anyone tell me how if there is a way I might get it to work?

Do I need to download some sort of SDK which will update the headers and libraries, to get the DirectX SDK files I have to work with the compiler?

Thank you.

1

There are 1 best solutions below

0
On

There have been some important changes over last 20 years that you would like to take into consideration.

  • DirectShow filters still work well
  • DirectShow is not a part of DirectX any longer, it was moved to core platform
  • You don't need Visual C++ 5.0, Visual Studio 2015 Community is fine
  • You can still build a transform filter using SDK files but you need specific SDK and samples

You might possibly still use Visual C++ 5.0, which does not make much sense to me, but in that case you would have to find respective older SDKs. Chances are high that there would be certain issues though, such as for example DEP incompatibility. There is no need to get into this journey at all however as you can use current tooling.

DirectShow runtime is now a part of operating system, you don't need any redistributables. It is important that you install or have Windows SDK 7.1 because it is the last version shipped with a set of samples that includes DirectShow samples, and DirectShow BaseClasses. You need these samples or you can also get them from Microsoft's Win7 Samples on GitHub.

You will want Visual Studio 2015 Community with all latest updates and latest Windows SDK 10 to be used as your development environment. Convert DirectShow samples upgrading respective projects and you will be able to build DirectShow Samples from SDK 7.1, which - by the way - already include a few popular transform filter projects, e.g. EzRGB24 Filter Sample.

Update - one another source is my derivation of BaseClasses and most popular samples with a Visual Studio solution file to build code right away, and also with code cleanup to be warning free.