Thread: CLSID_SampleGrabber no longer available, how to workaround?

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195

    CLSID_SampleGrabber no longer available, how to workaround?

    Hey guys, been busy for the last decade, but got around to updating a useful library of mine which opens cameras and video capture cards and returns the raw frame data. Come to find out CLSID_SampleGrabber is no longer defined in the stock headers. Can someone point me in the right direction so I can migrate the code to something supported in newer versions of windows?

    The compiler errors Im getting start out with -
    Code:
    ||=== Build: Release in CDirectShowCamera64 (compiler: GNU GCC Compiler) ===|
    C:\Users\Anthony Bachler\Desktop\CDirectShowCamera64\CDirectShowCamera64\CDirectShowCamera.cpp||In constructor 'CDirectShowCamera::CDirectShowCamera(DWORD)':|
    C:\Users\Anthony Bachler\Desktop\CDirectShowCamera64\CDirectShowCamera64\CDirectShowCamera.cpp|156|error: 'CLSID_SampleGrabber' was not declared in this scope|
    C:\Users\Anthony Bachler\Desktop\CDirectShowCamera64\CDirectShowCamera64\CDirectShowCamera.cpp|180|error: 'CLSID_NullRenderer' was not declared in this scope|
    ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Solved it. Added in direct declarations of the relevant CLSID's and linked to ole32.lib and d3d11.lib, added reference in source to those requirements. built a static library version of the class, so this shouldnt be an issue until 128 bit addressing.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. missing fstream insert() - workaround
    By taifun in forum C++ Programming
    Replies: 3
    Last Post: 03-24-2014, 02:54 PM
  2. #pragma pack(1) workaround?
    By l3iggs in forum C Programming
    Replies: 5
    Last Post: 06-02-2008, 11:17 AM
  3. Template Friend Workaround for MSVC?
    By LuckY in forum C++ Programming
    Replies: 1
    Last Post: 04-01-2005, 05:41 PM
  4. WORKAROUND for >> to work with __int64??
    By brian0918 in forum C++ Programming
    Replies: 7
    Last Post: 08-13-2002, 01:18 PM

Tags for this Thread