ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

HRESULT WINAPI CControlNode_fnConstructor ( IBaseFilter pFilter,
ULONG  NodeType,
ULONG  PinId,
REFIID  riid,
LPVOID ppv 
)

Definition at line 92 of file controlnode.cpp.

Referenced by CBDADeviceControl::GetControlNode().

{
    WCHAR Buffer[100];
    HRESULT hr;
    IPin * pPin = NULL;
    IKsPropertySet * pProperty;

    // store pin id
    swprintf(Buffer, L"%u", PinId);

    // try find target pin
    hr = pFilter->FindPin(Buffer, &pPin);

    if (FAILED(hr))
    {
#ifdef BDAPLGIN_TRACE
        swprintf(Buffer, L"CControlNode_fnConstructor failed find pin %lu with %lx\n", PinId, hr);
        OutputDebugStringW(Buffer);
#endif
        return hr;
    }

    // query for IKsPropertySet interface
    hr = pPin->QueryInterface(IID_IKsPropertySet, (void**)&pProperty);
    if (FAILED(hr))
        return hr;

#ifdef BDAPLGIN_TRACE
    swprintf(Buffer, L"CControlNode_fnConstructor get IID_IKsObject status %lx\n", hr);
    OutputDebugStringW(Buffer);
#endif

    // release IPin interface
    pPin->Release();

    // construct device control
    CControlNode * handler = new CControlNode(pProperty, NodeType, PinId);

#ifdef BDAPLGIN_TRACE
    OutputDebugStringW(L"CControlNode_fnConstructor\n");
#endif

    if (!handler)
        return E_OUTOFMEMORY;

    if (FAILED(handler->QueryInterface(riid, ppv)))
    {
        /* not supported */
        delete handler;
        return E_NOINTERFACE;
    }

    return NOERROR;
}

Generated on Fri May 25 2012 04:59:22 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.