1

I need to build an application to configure some demodulator parameters(like Symbol rate, modulation type, etc), and I did these things through Microsoft BDA architectureï¼›however, here is my code as below:

CComPtr <IBDA_Topology> pITopology;
CComPtr <IBDA_AutoDemodulate>   m_pIAutoDemod;
CComPtr <IBDA_DigitalDemodulator>   m_pIDigiDemod;

hr = m_pTunerDevice->QueryInterface(IID_IBDA_Topology,
reinterpret_cast<void**>(&pITopology) );

ULONG   nNodesTypeNum = 0;
ULONG   NodesType[10];

hr = pITopology->GetNodeTypes(&nNodesTypeNum, 10, NodesType);

CComPtr <IUnknown> pIUknow;

// NodesType[1] is the Demod node
hr = pITopology->GetControlNode(0, 1, NodesType[1], &pIUknow);

ULONG   nInterfacesNum = 0;
GUID    InterfacesGUID[10];

// After this call, we sure that InerfacesGUID[0] == IID_IBDA_AutoDemodulate
// and InerfacesGUID[1] == IID_IBDA_DigitalDemodulator
hr = pITopology->GetNodeInterfaces(NodesType[1], &nInterfacesNum, 10,
InerfacesGUID);

// Call this success
hr = pIUknow->QueryInterface(IID_IBDA_DigitalDemodulator, (void
**)&m_pIDigiDemod);

ModulationType type = BDA_MOD_NOT_DEFINED;
hr = m_pIDigiDemod->get_ModulationType(&type);//failed here

I can get the interface object with no problem; but when I call whatever methods(get modulation type, get symbol rate), it always returns E_HANDLE; and I also checks my BDA driver is good.

Any ideas to point me in the right direction are appreciated.

0 Answers0