zoukankan      html  css  js  c++  java
  • DirectX--Filter属性页的调用

    IEnumFilters* pEnum;
    HRESULT hr ;
    if (pigb)
    {
    hr = pigb-> EnumFilters(&pEnum);
    if (FAILED(hr)) 
    {
    return ;
    }

         

    IBaseFilter* pFilter = NULL;
    while (pEnum->Next(1, &pFilter, NULL) == S_OK) 
    {
    // Check for required interface
    IUnknown* pUnk;//查找Filter接口,仅仅有一个?
    HRESULT hrQuery = pFilter->QueryInterface(IID_IVideoWindow, (void**)&pUnk);
    if (SUCCEEDED(hrQuery)) 
    {
    pUnk->Release();
    pEnum->Release();
    break ;
    }
    // pFilter->Release();
    }
     //  pEnum->Release();
    //
    ISpecifyPropertyPages *pProp = NULL;//查询接口
    hr = pFilter->QueryInterface(IID_ISpecifyPropertyPages, (void **)&pProp);
    if (SUCCEEDED(hr)) 
    {
    // Get the filter's name and IUnknown pointer.
    FILTER_INFO FilterInfo;
    hr = pFilter->QueryFilterInfo(&FilterInfo); 
    IUnknown *pFilterUnk;
    pFilter->QueryInterface(IID_IUnknown, (void **)&pFilterUnk);
    //
    CString str(FilterInfo.achName);//显示Filter名称
    MessageBox(str);

    // Show the page. 
    CAUUID caGUID;

    pProp->GetPages(&caGUID);
    pProp->Release();
    OleCreatePropertyFrame(
    this->GetSafeHwnd(),                   // Parent window
    0, 0,                                 // Reserved
    FilterInfo.achName,     //L"MAOMAO" // Caption for the dialog box 
    1,                      // Number of objects (just the filter)
    &pFilterUnk,            // Array of object pointers. 
    caGUID.cElems,          // Number of property pages
    caGUID.pElems,          // Array of property page CLSIDs
    0,                      // Locale identifier
    0, NULL                 // Reserved
    );

    // Clean up.
    pFilterUnk->Release();
    FilterInfo.pGraph->Release(); 
    CoTaskMemFree(caGUID.pElems);
    }
    }
  • 相关阅读:
    一些技术鸡汤
    css优化
    Spring 通过maven pom文件配置初始化
    sql 编写横竖表转换
    Linux 常用命令笔记 (持续更新)
    java常用集合详解 contains
    jQuery Ajax(异步请求)
    java中"与"和"或"
    java8 中的时间和数据的变化
    mysql 根据查询结果集更新
  • 原文地址:https://www.cnblogs.com/yjbjingcha/p/6941991.html
Copyright © 2011-2022 走看看