Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7922001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:48:07+00:00 2026-06-03T16:48:07+00:00

I am trying to migrate PlayCap from the microsoft SDK from C++ to C++

  • 0

I am trying to migrate PlayCap from the microsoft SDK from C++ to C++ CLR.

Currently I keep getting LNK2020 and LNK2001 on the directshow classes.

    public ref class Form1 : public System::Windows::Forms::Form
{
public:
    static IVideoWindow * DC_VW = NULL;
    static IMediaControl *DC_MC = NULL;
    static IMediaEventEx *DC_ME = NULL;
    static IGraphBuilder *DC_GB = NULL;
    static ICaptureGraphBuilder2 * DC_CGB2 = NULL;
    Form1(void)
    {

        InitializeComponent();
        //
        //TODO: Add the constructor code here
        //
    }

protected:
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    ~Form1()
    {
        if (components)
        {
            delete components;
        }
    }
private: System::Windows::Forms::Button^  button1;
protected: 
private: System::Windows::Forms::Panel^  panel1;

private:
    /// <summary>
    /// Required designer variable.
    /// </summary>
    System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    void InitializeComponent(void)
    {
        this->button1 = (gcnew System::Windows::Forms::Button());
        this->panel1 = (gcnew System::Windows::Forms::Panel());
        this->SuspendLayout();
        // 
        // button1
        // 
        this->button1->Location = System::Drawing::Point(136, 324);
        this->button1->Name = L"button1";
        this->button1->Size = System::Drawing::Size(217, 53);
        this->button1->TabIndex = 0;
        this->button1->Text = L"button1";
        this->button1->UseVisualStyleBackColor = true;
        this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
        // 
        // panel1
        // 
        this->panel1->Location = System::Drawing::Point(37, 31);
        this->panel1->Name = L"panel1";
        this->panel1->Size = System::Drawing::Size(444, 269);
        this->panel1->TabIndex = 1;
        // 
        // Form1
        // 
        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
        this->ClientSize = System::Drawing::Size(511, 389);
        this->Controls->Add(this->panel1);
        this->Controls->Add(this->button1);
        this->Name = L"Form1";
        this->Text = L"Form1";
        this->ResumeLayout(false);

    }
#pragma endregion
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
         {
            HRESULT hr;
            IBaseFilter *DC_SF = NULL;

            hr = GetInterfaces();
            if(FAILED(hr))
            {
                int x = ::MessageBox(NULL, (LPCWSTR)L"Failed to get interfaces. hr=0x%x", (LPCWSTR)L"OK", MB_OK);
            }
            hr = DC_CGB2->SetFiltergraph(DC_GB);
            if(FAILED(hr))
            {
                int x = ::MessageBox(0, (LPCWSTR)L"failed to set filter graph hr=0x%x", (LPCWSTR)L"OK", MB_OK);
            }
            //hr = FindCaptureDevice(&DC_SF);
         }
private: HRESULT GetInterfaces(void)
         {
             HRESULT hr;

             void* Temp;
             hr = CoCreateInstance (CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **) &Temp);
             DC_GB = (IGraphBuilder*)Temp;
             if(FAILED(hr))
             {
                 return hr;
             }

             hr = CoCreateInstance (CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC, IID_ICaptureGraphBuilder2, (void **)&Temp);
             DC_CGB2 = (ICaptureGraphBuilder2*)Temp;
             if(FAILED(hr))
                 return hr;

             hr = DC_GB->QueryInterface(IID_IMediaControl, (LPVOID*) &Temp);
             DC_MC = (IMediaControl*)Temp;
             if(FAILED(hr))
                 return hr;

             hr = DC_GB->QueryInterface(IID_IVideoWindow, (LPVOID*) &Temp);
             DC_VW = (IVideoWindow*)Temp;
             if(FAILED(hr))
                 return hr;

             hr = DC_GB->QueryInterface(IID_IMediaEventEx, (LPVOID*) &Temp);
             DC_ME = (IMediaEventEx*)Temp;
             if(FAILED(hr))
                 return hr;

             hr = DC_ME->SetNotifyWindow(panel1->Handle.ToInt64(), WM_APP+1, 0);
             return hr;
         }
};

That is pretty much the jist of the PlayCap code so far, except i had to move the declarations and make them static.

i keep getting

1>DirectshowC++.obj : error LNK2020: unresolved token (0A000012) IID_IMediaEventEx
1>DirectshowC++.obj : error LNK2020: unresolved token (0A000013) IID_IVideoWindow
1>DirectshowC++.obj : error LNK2020: unresolved token (0A000014) IID_IMediaControl
1>DirectshowC++.obj : error LNK2020: unresolved token (0A000016) CLSID_CaptureGraphBuilder2
1>DirectshowC++.obj : error LNK2020: unresolved token (0A000017) IID_ICaptureGraphBuilder2
1>DirectshowC++.obj : error LNK2020: unresolved token (0A000018) CLSID_FilterGraph
1>DirectshowC++.obj : error LNK2020: unresolved token (0A000019) IID_IGraphBuilder
1>DirectshowC++.obj : error LNK2001: unresolved external symbol IID_IMediaEventEx
1>DirectshowC++.obj : error LNK2001: unresolved external symbol IID_IVideoWindow
1>DirectshowC++.obj : error LNK2001: unresolved external symbol IID_IMediaControl
1>DirectshowC++.obj : error LNK2001: unresolved external symbol IID_ICaptureGraphBuilder2
1>DirectshowC++.obj : error LNK2001: unresolved external symbol CLSID_CaptureGraphBuilder2
1>DirectshowC++.obj : error LNK2001: unresolved external symbol IID_IGraphBuilder
1>DirectshowC++.obj : error LNK2001: unresolved external symbol CLSID_FilterGraph

All of them are in the strmif.h header file, it finds the file and them but idk what is up with the linker errors

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:48:09+00:00Added an answer on June 3, 2026 at 4:48 pm

    You might want to link against strmiids.lib and strmbase.lib.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to migrate from V5.3.2 to V6 of the SDK. I've got an
I'm trying to migrate from Delphi 2007 to Embarcadero RAD Studio XE. I'm getting
While trying to migrate, I keep getting this error: rake aborted! test-unit is not
I'm trying to migrate from a Nexus maven repo to using https://github.com/jcaddel/maven-s3-wagon . Getting
I'm trying to migrate a site from a joomla system to a drupal. The
I am trying to migrate to Tomcat 7 from Tomcat 6. The app uses
I'm trying to migrate to NewsstandKit to benefit from background download. I'm being able
I'm still trying to migrate from CakePHP 1.3 to 2.0 I have a Controller
I am trying to migrate to git from svn and it fails by throwing
I'm trying to migrate an existing application from IIS with ServletExec to tomcat. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.