blog tags:

About:

I'm Dmitry Popov,
lead developer and director of Infognition.

Known in the interwebs as Dee Mon since 1997. You could see me as thedeemon on reddit or LiveJournal.

RSS
Articles Technology Blog News Company
Blog
Working with DirectShow in VS6
May 25, 2010

Although Visual Studio 6 was made in previous century it is still widely used by C++ developers around the world. Probably because of good support of MFC (which was screwed in later versions) or probably because later versions weren't much better as IDE for writing C++, or because they introduced unwanted difficulties with runtime libraries. Whatever the real reason for using now 12-years old IDE is, we still receive questions on how to use code generated by GraphEditPlus in VS6.

To work with DirectShow first of all you need DirectShow headers and libs. Currently they are included in Windows SDK. A few years ago they were part of DirectX SDK. When we're working with DirectShow in VS6 we still use the old DirectX 9 SDK, which we have installed in C:\DXSDK folder. If you have the headers and libs installed into other place, change your paths appropriately.

So, let's create a simplest DirectShow app. Make a new project, let it be a Win32 Console Application. Give it a name and choose a path:

Open the main CPP file:

Now run GraphEditPlus, create a graph and generate C++ code for it:

Copy the source code to the main CPP file.
Now open menu Project -> Settings, go to C++ / Preprocessor window and add the path to DirectShow header files:

Then in Link Input window add path to the lib files:

In Link General window add strmiids.lib and quartz.lib:

Close the settings window and build the project. If all paths are set correctly your app is now ready: