Hi class!

Sorry I haven't got much time to clean up the code, but it should be working for your purposes.

You'll need the latest Windows SDK (NOT DirectX SDK) to compile the code. 
Optionally, there're convenience functions for OpenCV in the files OpenCvInterop.h and .cpp. If you do not use OpenCV you can simply remove those 2 files and the function calls (main.cpp and SampleGrabberCB.cpp) to compile.

Libraries needed to link are:
Debug: strmiids.lib comsuppwd.lib Ole32.lib
Release: strmiids.lib comsuppw.lib Ole32.lib
and optionally OpenCV libraries

Most of the code can be used as-is. See the main.cpp file for a demo on how to use it. 
IMPORTANT: Currently the library is still harded coded with constants inside the file global.h, you may want to change them.
The primary class you'll interact with is DShowVideoCapture.

SampleGrabberCB is a demo implementation of a callback class, it currently saves all frames captured to the current directory. If you want to implement your own CB, or not use one at all, you'll need to modify the connect() method of DShowVideoCapture.

There may be small memory leaks in the code, but should not leak image data.
Note that in SampleGrabberCB, saving every frame to disk without pre-allocation is potentially very slow and likely to cause your framerate to drop below the target.

Cheers,
Edwin