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 5942597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:16:33+00:00 2026-05-22T16:16:33+00:00

I wrote a small code to find Direct3D device manager, HRESULT FindDeviceManager( IMFTopology *pTopology,

  • 0

I wrote a small code to find Direct3D device manager,

HRESULT FindDeviceManager(
IMFTopology *pTopology,         // Topology to search.
IUnknown **ppDeviceManager,     // Receives a pointer to the device manager.
IMFTopologyNode **ppNode        // Receives a pointer to the node.
)
{
HRESULT hr = S_OK;
WORD cNodes = 0;
BOOL bFound = FALSE;

IMFTopologyNode *pNode = NULL;
IUnknown *pNodeObject = NULL;
IDirect3DDeviceManager9 *pD3DManager = NULL;

// Search all of the nodes in the topology.

hr = pTopology->GetNodeCount(&cNodes);

if (FAILED(hr))
{
    return hr;
}

for (WORD i = 0; i < cNodes; i++)
{
    // For each of the following calls, failure just means we 
    // did not find the node we're looking for, so keep looking. 

    hr = pTopology->GetNode(i, &pNode);

    // Get the node's object pointer.
    if (SUCCEEDED(hr))
    {
        hr = pNode->GetObject(&pNodeObject);
    }

    // Query the node object for the device manager service.
    if (SUCCEEDED(hr))
    {
        hr = MFGetService(
            pNodeObject, 
            MR_VIDEO_ACCELERATION_SERVICE, 
            IID_PPV_ARGS(&pD3DManager)
            );
    }

    if (SUCCEEDED(hr))
    {
        // Found the right node. Return the pointers to the caller.
        *ppDeviceManager = (IUnknown *)pD3DManager;
        (*ppDeviceManager)->AddRef();

        *ppNode = pNode;
        (*ppNode)->AddRef();

        bFound = TRUE;
        break;
    }

    SafeRelease(&pNodeObject);
    SafeRelease(&pD3DManager);
    SafeRelease(&pNode);

} // End of for loop.

SafeRelease(&pNodeObject);
SafeRelease(&pD3DManager);
SafeRelease(&pNode);

return bFound ? S_OK : E_FAIL;
}

while compiling the above code i’m getting the following error,

 1>c:\program files\microsoft sdks\windows\v7.1\include\dxva2api.h(404) : error C4430: 
 missing type specifier - int assumed. Note: C++ does not support default-int

I had a look into dxva2api.h at line number 404,

 typedef struct _DXVA2_VideoProcessorCaps
 {
  UINT DeviceCaps;
  D3DPOOL InputPool;  //--> this is line number 404.

the parameter D3DPOOL is defined in “d3d9types.h” but that is not included in “dxva2api.h”. I tried to modify “dxva2api.h”, but operation failed. How to fix this? Any suggestions?

thanks in advance,

Sri

  • 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-05-22T16:16:34+00:00Added an answer on May 22, 2026 at 4:16 pm

    Are you including the header “d3d9.h” ?

    Also they a look at this.
    http://msdn.microsoft.com/en-us/library/ff552897%28v=vs.85%29.aspx

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

Sidebar

Related Questions

I wrote a small sample of code in C# to capture selected text from
I wrote this small program to find all occurrences of a substring in a
I wrote a small snippet to search for matched strings in an array, then
Begginer's question. I'm trying to write small piece of code in Visual Studio (VB.net)
I wrote a small PHP application several months ago that uses the WordPress XMLRPC
I wrote a small PHP application that I'd like to distribute. I'm looking for
We wrote a small Windows class library that implements extension methods for some standard
I wrote a small internal web app using (a subset of) pylons . As
I wrote some small apps using .NET 3.5 but now I am stuck with
I wrote a small app that turns out to be using a lot of

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.