MediaControl未声明的标识符

MediaControl未声明的标识符

我正在使用Visual Studio 2008为带有Windows Mobile 6.1的设备开发SmartDevice Win32 DLL。我必须使用DirectShow,并且开始再现基本示例。
.h:

#pragma once

// Additional Include Directories:
// "C:\Program Files (x86)\Windows Mobile 6 SDK\Smartphone\Include\Armv4i"
#include <dshow.h>

// Included strmiids.lib for CLSID_FilterGraph and IID_IGraphBuilder (.cpp)
#pragma comment(lib, "strmiids.lib")



extern "C" {

    __declspec(dllexport) bool InitCOM();

}

.cpp:
#include "stdafx.h"
#include "DLLDevice.h"


BOOL APIENTRY DllMain( HANDLE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    return TRUE;
}



__declspec(dllexport) bool InitCOM()
{
    if(FAILED(CoInitialize(NULL)))
        return false;

    IGraphBuilder* pGraphBuilder = NULL;
    HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
        IID_IGraphBuilder, (void**) &pGraphBuilder);

    if(FAILED(hr))
        return false;

    IMediaControl *pMediaControl = NULL;
    hr = pGraphBuilder->QueryInterface(IID_MediaControl, (void**) &pMediaControl);


    pGraphBuilder->Release();

    return true;
}

现在我有一个链接器错误:
error C2065: 'IID_MediaControl' : undeclared identifier

为什么?我怎么解决这个问题?
因此,为什么无法使用DirectShow创建项目?

最佳答案

因为它是IID_IMediaControl,而不是IID_MediaControl

关于c++ - IID_MediaControl未声明的标识符,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12883895/

10-12 04:17