[BDAPLGIN]

- Implement IBDA_Topology::GetNodeTypes, IBDA_Topology::GetNodeDescriptors, IBDA_Topology::GetNodeInterfaces, IBDA_Topology::GetPinTypes, IBDA_Topology::CreateTopology, IBDA_Topology::GetControlNode
- Implement stub interfaces for control node, IBDA_DigitalDemodulator, IBDA_FrequencyFilter, IBDA_LNBInfo, IBDA_SignalStatistics

svn path=/trunk/; revision=45680
This commit is contained in:
Johannes Anderwald 2010-02-24 18:37:07 +00:00
parent 97adef8cb9
commit 04cd460d80
10 changed files with 1269 additions and 17 deletions

View file

@ -31,6 +31,7 @@ DllMain(
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
CoInitialize(NULL);
OutputDebugStringW(L"BDAPLGIN::DllMain()\n");
DisableThreadLibraryCalls(hInstDLL);
break;

View file

@ -10,6 +10,7 @@
<library>ole32</library>
<library>advapi32</library>
<library>msvcrt</library>
<library>ksproxy</library>
<group compilerset="gcc">
<compilerflag compiler="cxx">-fno-exceptions</compilerflag>
<compilerflag compiler="cxx">-fno-rtti</compilerflag>
@ -21,7 +22,12 @@
<file>bdaplgin.cpp</file>
<file>bdaplgin.rc</file>
<file>classfactory.cpp</file>
<file>controlnode.cpp</file>
<file>devicecontrol.cpp</file>
<file>digitaldemo.cpp</file>
<file>frequencyfilter.cpp</file>
<file>lnbinfo.cpp</file>
<file>pincontrol.cpp</file>
<file>signalstatistics.cpp</file>
</module>
</group>

View file

@ -0,0 +1,118 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS BDA Proxy
* FILE: dll/directx/bdaplgin/controlnode.cpp
* PURPOSE: ControlNode interface
*
* PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org)
*/
#include "precomp.h"
class CControlNode : public IUnknown
{
public:
STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
STDMETHODIMP_(ULONG) AddRef()
{
InterlockedIncrement(&m_Ref);
return m_Ref;
}
STDMETHODIMP_(ULONG) Release()
{
InterlockedDecrement(&m_Ref);
if (!m_Ref)
{
delete this;
return 0;
}
return m_Ref;
}
CControlNode(IUnknown * pUnkOuter, ULONG NodeType, ULONG PinId) : m_Ref(0), m_pUnkOuter(pUnkOuter), m_NodeType(NodeType), m_PinId(PinId){};
virtual ~CControlNode(){};
protected:
LONG m_Ref;
IUnknown * m_pUnkOuter;
ULONG m_NodeType;
ULONG m_PinId;
};
HRESULT
STDMETHODCALLTYPE
CControlNode::QueryInterface(
IN REFIID refiid,
OUT PVOID* Output)
{
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
*Output = NULL;
if (IsEqualGUID(refiid, IID_IUnknown))
{
*Output = PVOID(this);
reinterpret_cast<IUnknown*>(*Output)->AddRef();
return NOERROR;
}
else if(IsEqualGUID(refiid, IID_IBDA_FrequencyFilter))
{
return CBDAFrequencyFilter_fnConstructor(m_pUnkOuter, refiid, Output);
}
else if(IsEqualGUID(refiid, IID_IBDA_SignalStatistics))
{
return CBDASignalStatistics_fnConstructor(m_pUnkOuter, refiid, Output);
}
else if(IsEqualGUID(refiid, IID_IBDA_LNBInfo))
{
return CBDALNBInfo_fnConstructor(m_pUnkOuter, refiid, Output);
}
else if(IsEqualGUID(refiid, IID_IBDA_DigitalDemodulator))
{
return CBDADigitalDemodulator_fnConstructor(m_pUnkOuter, refiid, Output);
}
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
return E_NOINTERFACE;
}
HRESULT
WINAPI
CControlNode_fnConstructor(
IUnknown * pUnkOuter,
ULONG NodeType,
ULONG PinId,
REFIID riid,
LPVOID * ppv)
{
// sanity check
assert(pUnkOuter);
// construct device control
CControlNode * handler = new CControlNode(pUnkOuter, NodeType, PinId);
OutputDebugStringW(L"CControlNode_fnConstructor\n");
if (!handler)
return E_OUTOFMEMORY;
if (FAILED(handler->QueryInterface(riid, ppv)))
{
/* not supported */
delete handler;
return E_NOINTERFACE;
}
return NOERROR;
}

View file

@ -9,8 +9,18 @@
#include "precomp.h"
const GUID CLSID_DVBTNetworkProvider = {0x216c62df, 0x6d7f, 0x4e9a, {0x85, 0x71, 0x5, 0xf1, 0x4e, 0xdb, 0x76, 0x6a}};
const GUID IID_IAC3Filter = {0xe4539501, 0xc609, 0x46ea, {0xad, 0x2a, 0x0e, 0x97, 0x00, 0x24, 0x56, 0x83}};
const GUID IID_IAsyncReader = {0x56A868AA, 0x0AD4, 0x11CE, {0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}};
const GUID IID_IMatrixMixer = {0xafc57835, 0x2fd1, 0x4541, {0xa6, 0xd9, 0x0d, 0xb7, 0x18, 0x56, 0xe5, 0x89}};
const GUID IID_IBDA_NetworkProvider = {0xfd501041, 0x8ebe, 0x11ce, {0x81, 0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d, 0xa2}};
const GUID IID_IAMOpenProgress = {0x8E1C39A1, 0xDE53, 0x11cf, {0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D}};
const GUID IID_IDistributorNotify = {0x56a868af, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
const GUID IID_IBDA_DeviceControl = {0xFD0A5AF3, 0xB41D, 0x11d2, {0x9C, 0x95, 0x00, 0xC0, 0x4F, 0x79, 0x71, 0xE0}};
const GUID IID_IBDA_Topology = {0x79B56888, 0x7FEA, 0x4690, {0xB4, 0x5D, 0x38, 0xFD, 0x3C, 0x78, 0x49, 0xBE}};
const GUID IID_IKsObject = {0x423c13a2, 0x2070, 0x11d0, {0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}};
const GUID KSPROPSETID_BdaTopology = {0xa14ee835, 0x0a23, 0x11d3, {0x9c, 0xc7, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
const GUID KSMETHODSETID_BdaDeviceConfiguration = {0x71985f45, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
class CBDADeviceControl : public IBDA_DeviceControl,
public IBDA_Topology
@ -54,11 +64,12 @@ public:
HRESULT STDMETHODCALLTYPE CreateTopology(ULONG ulInputPinId, ULONG ulOutputPinId);
HRESULT STDMETHODCALLTYPE GetControlNode(ULONG ulInputPinId, ULONG ulOutputPinId, ULONG ulNodeType, IUnknown **ppControlNode);
CBDADeviceControl(HANDLE hFile) : m_Ref(0), m_Handle(hFile){};
CBDADeviceControl(IUnknown * pUnkOuter, HANDLE hFile) : m_Ref(0), m_pUnkOuter(pUnkOuter), m_Handle(hFile){};
virtual ~CBDADeviceControl(){};
protected:
LONG m_Ref;
IUnknown * m_pUnkOuter;
HANDLE m_Handle;
};
@ -92,6 +103,45 @@ CBDADeviceControl::QueryInterface(
reinterpret_cast<IBDA_Topology*>(*Output)->AddRef();
return NOERROR;
}
#if 0
if (IsEqualIID(refiid, IID_IDistributorNotify))
{
OutputDebugStringW(L"CBDADeviceControl::QueryInterface: No IDistributorNotify interface\n");
return E_NOINTERFACE;
}
if (IsEqualGUID(refiid, IID_IAMOpenProgress))
{
OutputDebugStringW(L"CBDADeviceControl::QueryInterface: No IAMOpenProgress interface\n");
return E_NOINTERFACE;
}
if (IsEqualGUID(refiid, IID_IBDA_NetworkProvider))
{
HRESULT hr = CoCreateInstance(CLSID_DVBTNetworkProvider, 0, CLSCTX_INPROC, IID_IBDA_NetworkProvider, (void**)Output);
swprintf(Buffer, L"CBDADeviceControl::QueryInterface: failed to construct IID_IBDA_NetworkProvider interface with %lx", hr);
OutputDebugStringW(Buffer);
return hr;
}
if (IsEqualGUID(refiid, IID_IMatrixMixer))
{
OutputDebugStringW(L"CBDADeviceControl::QueryInterface: No IID_IMatrixMixer interface\n");
return E_NOINTERFACE;
}
if (IsEqualGUID(refiid, IID_IAsyncReader))
{
OutputDebugStringW(L"CBDADeviceControl::QueryInterface: No IID_IAsyncReader interface\n");
return E_NOINTERFACE;
}
if (IsEqualGUID(refiid, IID_IAC3Filter))
{
OutputDebugStringW(L"CBDADeviceControl::QueryInterface: No IID_IAC3Filter interface\n");
return E_NOINTERFACE;
}
#endif
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CBDADeviceControl::QueryInterface: NoInterface for %s", lpstr);
@ -146,32 +196,102 @@ HRESULT
STDMETHODCALLTYPE
CBDADeviceControl::GetNodeTypes(ULONG *pulcNodeTypes, ULONG ulcNodeTypesMax, ULONG * rgulNodeTypes)
{
OutputDebugStringW(L"CBDADeviceControl::GetNodeTypes: NotImplemented\n");
return E_NOTIMPL;
KSPROPERTY Property;
HRESULT hr;
ULONG BytesReturned;
WCHAR Buffer[100];
// setup request
Property.Set = KSPROPSETID_BdaTopology;
Property.Id = KSPROPERTY_BDA_NODE_TYPES;
Property.Flags = KSPROPERTY_TYPE_GET;
// perform request
hr = KsSynchronousDeviceControl(m_Handle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), rgulNodeTypes, sizeof(ULONG) * ulcNodeTypesMax, &BytesReturned);
*pulcNodeTypes = (BytesReturned / sizeof(ULONG));
swprintf(Buffer, L"CBDADeviceControl::GetNodeTypes: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
return hr;
}
HRESULT
STDMETHODCALLTYPE
CBDADeviceControl::GetNodeDescriptors(ULONG *ulcNodeDescriptors, ULONG ulcNodeDescriptorsMax, BDANODE_DESCRIPTOR * rgNodeDescriptors)
{
OutputDebugStringW(L"CBDADeviceControl::GetNodeDescriptors: NotImplemented\n");
return E_NOTIMPL;
KSPROPERTY Property;
HRESULT hr;
ULONG BytesReturned;
WCHAR Buffer[100];
// setup request
Property.Set = KSPROPSETID_BdaTopology;
Property.Id = KSPROPERTY_BDA_NODE_DESCRIPTORS;
Property.Flags = KSPROPERTY_TYPE_GET;
// perform request
hr = KsSynchronousDeviceControl(m_Handle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), rgNodeDescriptors, sizeof(BDANODE_DESCRIPTOR) * ulcNodeDescriptorsMax, &BytesReturned);
*ulcNodeDescriptors = (BytesReturned / sizeof(BDANODE_DESCRIPTOR));
swprintf(Buffer, L"CBDADeviceControl::GetNodeDescriptors: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
return hr;
}
HRESULT
STDMETHODCALLTYPE
CBDADeviceControl::GetNodeInterfaces(ULONG ulNodeType, ULONG *pulcInterfaces, ULONG ulcInterfacesMax, GUID * rgguidInterfaces)
{
OutputDebugStringW(L"CBDADeviceControl::GetNodeInterfaces: NotImplemented\n");
return E_NOTIMPL;
KSP_NODE Property;
HRESULT hr;
ULONG BytesReturned;
WCHAR Buffer[100];
// setup request
Property.Property.Set = KSPROPSETID_BdaTopology;
Property.Property.Id = KSPROPERTY_BDA_NODE_PROPERTIES;
Property.Property.Flags = KSPROPERTY_TYPE_GET;
Property.NodeId = ulNodeType;
Property.Reserved = 0;
// perform request
hr = KsSynchronousDeviceControl(m_Handle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_NODE), rgguidInterfaces, sizeof(GUID) * ulcInterfacesMax, &BytesReturned);
*pulcInterfaces = (BytesReturned / sizeof(GUID));
swprintf(Buffer, L"CBDADeviceControl::GetNodeInterfaces: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
return hr;
}
HRESULT
STDMETHODCALLTYPE
CBDADeviceControl::GetPinTypes(ULONG *pulcPinTypes, ULONG ulcPinTypesMax, ULONG *rgulPinTypes)
{
OutputDebugStringW(L"CBDADeviceControl::GetPinTypes: NotImplemented\n");
return E_NOTIMPL;
KSPROPERTY Property;
HRESULT hr;
ULONG BytesReturned;
WCHAR Buffer[100];
// setup request
Property.Set = KSPROPSETID_BdaTopology;
Property.Id = KSPROPERTY_BDA_PIN_TYPES;
Property.Flags = KSPROPERTY_TYPE_GET;
// perform request
hr = KsSynchronousDeviceControl(m_Handle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), rgulPinTypes, sizeof(ULONG) * ulcPinTypesMax, &BytesReturned);
*pulcPinTypes = (BytesReturned / sizeof(ULONG));
swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
return hr;
}
HRESULT
@ -216,18 +336,60 @@ CBDADeviceControl::SetMedium(ULONG ulPinId, REGPINMEDIUM *pMedium)
HRESULT
STDMETHODCALLTYPE
CBDADeviceControl::CreateTopology(ULONG ulInputPinId, ULONG ulOutputPinId){
OutputDebugStringW(L"CBDADeviceControl::CreateTopology: NotImplemented\n");
return E_NOTIMPL;
}
CBDADeviceControl::CreateTopology(ULONG ulInputPinId, ULONG ulOutputPinId)
{
KSM_BDA_PIN_PAIR Method;
WCHAR Buffer[100];
HRESULT hr;
ULONG BytesReturned = 0;
Method.Method.Flags = 0;
Method.Method.Id = KSMETHOD_BDA_CREATE_TOPOLOGY;
Method.Method.Set = KSMETHODSETID_BdaDeviceConfiguration;
Method.InputPinId = ulInputPinId;
Method.OutputPinId = ulOutputPinId;
hr = KsSynchronousDeviceControl(m_Handle, IOCTL_KS_METHOD, (PVOID)&Method, sizeof(KSM_BDA_PIN_PAIR), NULL, 0, &BytesReturned);
swprintf(Buffer, L"CBDADeviceControl::CreateTopology: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
return hr;
}
HRESULT
STDMETHODCALLTYPE
CBDADeviceControl::GetControlNode(ULONG ulInputPinId, ULONG ulOutputPinId, ULONG ulNodeType, IUnknown **ppControlNode)
{
OutputDebugStringW(L"CBDADeviceControl::GetControlNode: NotImplemented\n");
return E_NOTIMPL;
KSP_BDA_NODE_PIN Property;
ULONG Dummy = 0;
HRESULT hr;
ULONG PinId = 0;
ULONG BytesReturned;
WCHAR Buffer[100];
//setup request
Property.Property.Set = KSPROPSETID_BdaTopology;
Property.Property.Id = KSPROPERTY_BDA_CONTROLLING_PIN_ID;
Property.Property.Flags = KSPROPERTY_TYPE_GET;
Property.ulInputPinId = ulInputPinId;
Property.ulOutputPinId = ulOutputPinId;
Property.ulNodeType = ulNodeType;
// perform request
hr = KsSynchronousDeviceControl(m_Handle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_BDA_NODE_PIN) + sizeof(ULONG), &PinId, sizeof(ULONG), &BytesReturned);
swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx, BytesReturned %lu PinId %lu Dummy %lu\n", hr, BytesReturned, PinId, Dummy);
OutputDebugStringW(Buffer);
if (FAILED(hr))
return hr;
hr = CControlNode_fnConstructor(m_pUnkOuter, ulNodeType, PinId, IID_IUnknown, (LPVOID*)ppControlNode);
swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx\n", hr);
OutputDebugStringW(Buffer);
return hr;
}
HRESULT
@ -237,7 +399,33 @@ CBDADeviceControl_fnConstructor(
REFIID riid,
LPVOID * ppv)
{
CBDADeviceControl * handler = new CBDADeviceControl(NULL);
HRESULT hr;
IKsObject *pObject = NULL;
HANDLE hFile;
// sanity check
assert(pUnkOuter);
// query for IKsObject
hr = pUnkOuter->QueryInterface(IID_IKsObject, (void**)&pObject);
// sanity check
assert(hr == NOERROR);
// another sanity check
assert(pObject != NULL);
// get file handle
hFile = pObject->KsGetObjectHandle();
// one more sanity check
assert(hFile != NULL && hFile != INVALID_HANDLE_VALUE);
// release IKsObject interface
pObject->Release();
// construct device control
CBDADeviceControl * handler = new CBDADeviceControl(pUnkOuter, hFile);
OutputDebugStringW(L"CBDADeviceControl_fnConstructor\n");

View file

@ -0,0 +1,254 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS BDA Proxy
* FILE: dll/directx/bdaplgin/digitaldemo.cpp
* PURPOSE: IBDA_DigitalDemodulator interface
*
* PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org)
*/
#include "precomp.h"
const GUID IID_IBDA_DigitalDemodulator = {0xef30f379, 0x985b, 0x4d10, {0xb6, 0x40, 0xa7, 0x9d, 0x5e, 0x04, 0xe1, 0xe0}};
class CBDADigitalDemodulator : public IBDA_DigitalDemodulator
{
public:
STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
STDMETHODIMP_(ULONG) AddRef()
{
InterlockedIncrement(&m_Ref);
return m_Ref;
}
STDMETHODIMP_(ULONG) Release()
{
InterlockedDecrement(&m_Ref);
if (!m_Ref)
{
delete this;
return 0;
}
return m_Ref;
}
//IBDA_DigitalDemodulator methods
HRESULT STDMETHODCALLTYPE put_ModulationType(ModulationType *pModulationType);
HRESULT STDMETHODCALLTYPE get_ModulationType(ModulationType *pModulationType);
HRESULT STDMETHODCALLTYPE put_InnerFECMethod(FECMethod *pFECMethod);
HRESULT STDMETHODCALLTYPE get_InnerFECMethod(FECMethod *pFECMethod);
HRESULT STDMETHODCALLTYPE put_InnerFECRate(BinaryConvolutionCodeRate *pFECRate);
HRESULT STDMETHODCALLTYPE get_InnerFECRate(BinaryConvolutionCodeRate *pFECRate);
HRESULT STDMETHODCALLTYPE put_OuterFECMethod(FECMethod *pFECMethod);
HRESULT STDMETHODCALLTYPE get_OuterFECMethod(FECMethod *pFECMethod);
HRESULT STDMETHODCALLTYPE put_OuterFECRate(BinaryConvolutionCodeRate *pFECRate);
HRESULT STDMETHODCALLTYPE get_OuterFECRate(BinaryConvolutionCodeRate *pFECRate);
HRESULT STDMETHODCALLTYPE put_SymbolRate(ULONG *pSymbolRate);
HRESULT STDMETHODCALLTYPE get_SymbolRate(ULONG *pSymbolRate);
HRESULT STDMETHODCALLTYPE put_SpectralInversion(SpectralInversion *pSpectralInversion);
HRESULT STDMETHODCALLTYPE get_SpectralInversion(SpectralInversion *pSpectralInversion);
CBDADigitalDemodulator(HANDLE hFile) : m_Ref(0), m_hFile(hFile){};
~CBDADigitalDemodulator(){};
protected:
LONG m_Ref;
HANDLE m_hFile;
};
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::QueryInterface(
IN REFIID refiid,
OUT PVOID* Output)
{
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
*Output = NULL;
if (IsEqualGUID(refiid, IID_IUnknown))
{
*Output = PVOID(this);
reinterpret_cast<IUnknown*>(*Output)->AddRef();
return NOERROR;
}
if (IsEqualGUID(refiid, IID_IBDA_DigitalDemodulator))
{
*Output = (IBDA_DigitalDemodulator*)(this);
reinterpret_cast<IBDA_DigitalDemodulator*>(*Output)->AddRef();
return NOERROR;
}
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CBDADigitalDemodulator::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::put_ModulationType(ModulationType *pModulationType)
{
OutputDebugStringW(L"CBDADigitalDemodulator::put_ModulationType NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::get_ModulationType(ModulationType *pModulationType)
{
OutputDebugStringW(L"CBDADigitalDemodulator::get_ModulationType NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::put_InnerFECMethod(FECMethod *pFECMethod)
{
OutputDebugStringW(L"CBDADigitalDemodulator::put_InnerFECMethod NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::get_InnerFECMethod(FECMethod *pFECMethod)
{
OutputDebugStringW(L"CBDADigitalDemodulator::get_InnerFECMethod NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::put_InnerFECRate(BinaryConvolutionCodeRate *pFECRate)
{
OutputDebugStringW(L"CBDADigitalDemodulator::put_InnerFECRate NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::get_InnerFECRate(BinaryConvolutionCodeRate *pFECRate)
{
OutputDebugStringW(L"CBDADigitalDemodulator::get_InnerFECRate NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::put_OuterFECMethod(FECMethod *pFECMethod)
{
OutputDebugStringW(L"CBDADigitalDemodulator::put_OuterFECMethod NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE CBDADigitalDemodulator::get_OuterFECMethod(FECMethod *pFECMethod)
{
OutputDebugStringW(L"CBDADigitalDemodulator::get_OuterFECMethod NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::put_OuterFECRate(BinaryConvolutionCodeRate *pFECRate)
{
OutputDebugStringW(L"CBDADigitalDemodulator::put_OuterFECRate NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::get_OuterFECRate(BinaryConvolutionCodeRate *pFECRate)
{
OutputDebugStringW(L"CBDADigitalDemodulator::get_OuterFECRate NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::put_SymbolRate(ULONG *pSymbolRate)
{
OutputDebugStringW(L"CBDADigitalDemodulator::put_SymbolRate NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::get_SymbolRate(ULONG *pSymbolRate)
{
OutputDebugStringW(L"CBDADigitalDemodulator::get_SymbolRate NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::put_SpectralInversion(SpectralInversion *pSpectralInversion)
{
OutputDebugStringW(L"CBDADigitalDemodulator::put_SpectralInversion NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDADigitalDemodulator::get_SpectralInversion(SpectralInversion *pSpectralInversion)
{
OutputDebugStringW(L"CBDADigitalDemodulator::get_SpectralInversion NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
WINAPI
CBDADigitalDemodulator_fnConstructor(
IUnknown * pUnkOuter,
REFIID riid,
LPVOID * ppv)
{
HRESULT hr;
IKsObject *pObject = NULL;
HANDLE hFile;
// sanity check
assert(pUnkOuter);
// query for IKsObject
hr = pUnkOuter->QueryInterface(IID_IKsObject, (void**)&pObject);
// sanity check
assert(hr == NOERROR);
// another sanity check
assert(pObject != NULL);
// get file handle
hFile = pObject->KsGetObjectHandle();
// one more sanity check
assert(hFile != NULL && hFile != INVALID_HANDLE_VALUE);
// release IKsObject interface
pObject->Release();
// construct device control
CBDADigitalDemodulator * handler = new CBDADigitalDemodulator(hFile);
OutputDebugStringW(L"CBDADigitalDemodulator_fnConstructor\n");
if (!handler)
return E_OUTOFMEMORY;
if (FAILED(handler->QueryInterface(riid, ppv)))
{
/* not supported */
delete handler;
return E_NOINTERFACE;
}
return NOERROR;
}

View file

@ -0,0 +1,233 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS BDA Proxy
* FILE: dll/directx/bdaplgin/frequencyfilter.cpp
* PURPOSE: IBDA_FrequencyFilter interface
*
* PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org)
*/
#include "precomp.h"
const GUID IID_IBDA_FrequencyFilter = {0x71985f47, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x00, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
class CBDAFrequencyFilter : public IBDA_FrequencyFilter
{
public:
STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
STDMETHODIMP_(ULONG) AddRef()
{
InterlockedIncrement(&m_Ref);
return m_Ref;
}
STDMETHODIMP_(ULONG) Release()
{
InterlockedDecrement(&m_Ref);
if (!m_Ref)
{
delete this;
return 0;
}
return m_Ref;
}
HRESULT STDMETHODCALLTYPE put_Autotune(ULONG ulTransponder);
HRESULT STDMETHODCALLTYPE get_Autotune(ULONG *pulTransponder);
HRESULT STDMETHODCALLTYPE put_Frequency(ULONG ulFrequency);
HRESULT STDMETHODCALLTYPE get_Frequency(ULONG *pulFrequency);
HRESULT STDMETHODCALLTYPE put_Polarity(Polarisation Polarity);
HRESULT STDMETHODCALLTYPE get_Polarity(Polarisation *pPolarity);
HRESULT STDMETHODCALLTYPE put_Range(ULONG ulRange);
HRESULT STDMETHODCALLTYPE get_Range(ULONG *pulRange);
HRESULT STDMETHODCALLTYPE put_Bandwidth(ULONG ulBandwidth);
HRESULT STDMETHODCALLTYPE get_Bandwidth(ULONG *pulBandwidth);
HRESULT STDMETHODCALLTYPE put_FrequencyMultiplier(ULONG ulMultiplier);
HRESULT STDMETHODCALLTYPE get_FrequencyMultiplier(ULONG *pulMultiplier);
CBDAFrequencyFilter(HANDLE hFile) : m_Ref(0), m_hFile(hFile){};
virtual ~CBDAFrequencyFilter(){};
protected:
LONG m_Ref;
HANDLE m_hFile;
};
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::QueryInterface(
IN REFIID refiid,
OUT PVOID* Output)
{
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
*Output = NULL;
if (IsEqualGUID(refiid, IID_IUnknown))
{
*Output = PVOID(this);
reinterpret_cast<IUnknown*>(*Output)->AddRef();
return NOERROR;
}
if (IsEqualGUID(refiid, IID_IBDA_FrequencyFilter))
{
*Output = (IBDA_FrequencyFilter*)(this);
reinterpret_cast<IBDA_FrequencyFilter*>(*Output)->AddRef();
return NOERROR;
}
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::put_Autotune(ULONG ulTransponder)
{
OutputDebugStringW(L"CBDAFrequencyFilter::put_Autotune: NotImplemented\n");
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::get_Autotune(ULONG *pulTransponder)
{
OutputDebugStringW(L"CBDAFrequencyFilter::get_Autotune\n");
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::put_Frequency(ULONG ulFrequency)
{
OutputDebugStringW(L"CBDAFrequencyFilter::put_Frequency: NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::get_Frequency(ULONG *pulFrequency)
{
OutputDebugStringW(L"CBDAFrequencyFilter::get_Frequency\n");
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::put_Polarity(Polarisation Polarity)
{
OutputDebugStringW(L"CBDAFrequencyFilter::put_Polarity: NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::get_Polarity(Polarisation *pPolarity)
{
OutputDebugStringW(L"CBDAFrequencyFilter::get_Polarity\n");
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::put_Range(ULONG ulRange)
{
OutputDebugStringW(L"CBDAFrequencyFilter::put_Range: NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::get_Range(ULONG *pulRange)
{
OutputDebugStringW(L"CBDAFrequencyFilter::get_Range\n");
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::put_Bandwidth(ULONG ulBandwidth)
{
OutputDebugStringW(L"CBDAFrequencyFilter::put_Bandwidth: NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::get_Bandwidth(ULONG *pulBandwidth)
{
OutputDebugStringW(L"CBDAFrequencyFilter::get_Bandwidth\n");
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::put_FrequencyMultiplier(ULONG ulMultiplier)
{
OutputDebugStringW(L"CBDAFrequencyFilter::put_FrequencyMultiplier: NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDAFrequencyFilter::get_FrequencyMultiplier(ULONG *pulMultiplier)
{
OutputDebugStringW(L"CBDAFrequencyFilter::get_FrequencyMultiplier\n");
return E_NOINTERFACE;
}
HRESULT
WINAPI
CBDAFrequencyFilter_fnConstructor(
IUnknown * pUnkOuter,
REFIID riid,
LPVOID * ppv)
{
HRESULT hr;
IKsObject *pObject = NULL;
HANDLE hFile;
// sanity check
assert(pUnkOuter);
// query for IKsObject
hr = pUnkOuter->QueryInterface(IID_IKsObject, (void**)&pObject);
// sanity check
assert(hr == NOERROR);
// another sanity check
assert(pObject != NULL);
// get file handle
hFile = pObject->KsGetObjectHandle();
// one more sanity check
assert(hFile != NULL && hFile != INVALID_HANDLE_VALUE);
// release IKsObject interface
pObject->Release();
// construct device control
CBDAFrequencyFilter * handler = new CBDAFrequencyFilter(hFile);
OutputDebugStringW(L"CBDAFrequencyFilter_fnConstructor\n");
if (!handler)
return E_OUTOFMEMORY;
if (FAILED(handler->QueryInterface(riid, ppv)))
{
/* not supported */
delete handler;
return E_NOINTERFACE;
}
return NOERROR;
}

View file

@ -0,0 +1,181 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS BDA Proxy
* FILE: dll/directx/bdaplgin/lnbinfo.cpp
* PURPOSE: IBDA_LNBInfo interface
*
* PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org)
*/
#include "precomp.h"
const GUID IID_IBDA_LNBInfo = {0x992cf102, 0x49f9, 0x4719, {0xa6, 0x64, 0xc4, 0xf2, 0x3e, 0x24, 0x08, 0xf4}};
class CBDALNBInfo : public IBDA_LNBInfo
{
public:
STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
STDMETHODIMP_(ULONG) AddRef()
{
InterlockedIncrement(&m_Ref);
return m_Ref;
}
STDMETHODIMP_(ULONG) Release()
{
InterlockedDecrement(&m_Ref);
if (!m_Ref)
{
delete this;
return 0;
}
return m_Ref;
}
//IBDA_LNBInfo methods
HRESULT STDMETHODCALLTYPE put_LocalOscilatorFrequencyLowBand(ULONG ulLOFLow);
HRESULT STDMETHODCALLTYPE get_LocalOscilatorFrequencyLowBand(ULONG *pulLOFLow);
HRESULT STDMETHODCALLTYPE put_LocalOscilatorFrequencyHighBand(ULONG ulLOFHigh);
HRESULT STDMETHODCALLTYPE get_LocalOscilatorFrequencyHighBand(ULONG *pulLOFHigh);
HRESULT STDMETHODCALLTYPE put_HighLowSwitchFrequency(ULONG ulSwitchFrequency);
HRESULT STDMETHODCALLTYPE get_HighLowSwitchFrequency(ULONG *pulSwitchFrequency);
CBDALNBInfo(HANDLE hFile) : m_Ref(0), m_hFile(hFile){};
~CBDALNBInfo(){};
protected:
LONG m_Ref;
HANDLE m_hFile;
};
HRESULT
STDMETHODCALLTYPE
CBDALNBInfo::QueryInterface(
IN REFIID refiid,
OUT PVOID* Output)
{
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
*Output = NULL;
if (IsEqualGUID(refiid, IID_IUnknown))
{
*Output = PVOID(this);
reinterpret_cast<IUnknown*>(*Output)->AddRef();
return NOERROR;
}
if (IsEqualGUID(refiid, IID_IBDA_LNBInfo))
{
*Output = (IBDA_LNBInfo*)(this);
reinterpret_cast<IBDA_LNBInfo*>(*Output)->AddRef();
return NOERROR;
}
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CBDALNBInfo::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDALNBInfo::put_LocalOscilatorFrequencyLowBand(ULONG ulLOFLow)
{
OutputDebugStringW(L"CBDALNBInfo::put_LocalOscilatorFrequencyLowBand NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDALNBInfo::get_LocalOscilatorFrequencyLowBand(ULONG *pulLOFLow)
{
OutputDebugStringW(L"CBDALNBInfo::get_LocalOscilatorFrequencyLowBand NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDALNBInfo::put_LocalOscilatorFrequencyHighBand(ULONG ulLOFHigh)
{
OutputDebugStringW(L"CBDALNBInfo::put_LocalOscilatorFrequencyHighBand NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDALNBInfo::get_LocalOscilatorFrequencyHighBand(ULONG *pulLOFHigh)
{
OutputDebugStringW(L"CBDALNBInfo::get_LocalOscilatorFrequencyHighBand NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDALNBInfo::put_HighLowSwitchFrequency(ULONG ulSwitchFrequency)
{
OutputDebugStringW(L"CBDALNBInfo::put_HighLowSwitchFrequency NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDALNBInfo::get_HighLowSwitchFrequency(ULONG *pulSwitchFrequency)
{
OutputDebugStringW(L"CBDALNBInfo::get_HighLowSwitchFrequency NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
WINAPI
CBDALNBInfo_fnConstructor(
IUnknown * pUnkOuter,
REFIID riid,
LPVOID * ppv)
{
HRESULT hr;
IKsObject *pObject = NULL;
HANDLE hFile;
// sanity check
assert(pUnkOuter);
// query for IKsObject
hr = pUnkOuter->QueryInterface(IID_IKsObject, (void**)&pObject);
// sanity check
assert(hr == NOERROR);
// another sanity check
assert(pObject != NULL);
// get file handle
hFile = pObject->KsGetObjectHandle();
// one more sanity check
assert(hFile != NULL && hFile != INVALID_HANDLE_VALUE);
// release IKsObject interface
pObject->Release();
// construct device control
CBDALNBInfo * handler = new CBDALNBInfo(hFile);
OutputDebugStringW(L"CBDALNBInfo_fnConstructor\n");
if (!handler)
return E_OUTOFMEMORY;
if (FAILED(handler->QueryInterface(riid, ppv)))
{
/* not supported */
delete handler;
return E_NOINTERFACE;
}
return NOERROR;
}

View file

@ -53,6 +53,9 @@ CBDAPinControl::QueryInterface(
IN REFIID refiid,
OUT PVOID* Output)
{
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
if (IsEqualGUID(refiid, IID_IUnknown))
{
*Output = PVOID(this);
@ -65,7 +68,11 @@ CBDAPinControl::QueryInterface(
reinterpret_cast<IBDA_PinControl*>(*Output)->AddRef();
return NOERROR;
}
OutputDebugStringW(L"CBDAPinControl::QueryInterface: NoInterface!!!\n");
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CBDADeviceControl::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
return E_NOINTERFACE;
}
//-------------------------------------------------------------------

View file

@ -12,8 +12,10 @@
#include <wchar.h>
#include <tchar.h>
#include <uuids.h>
#include <bdatypes.h>
#include <bdaiface.h>
#include <bdamedia.h>
#include <assert.h>
typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject);
@ -47,5 +49,50 @@ CBDAPinControl_fnConstructor(
REFIID riid,
LPVOID * ppv);
/* controlnode.cpp */
HRESULT
WINAPI
CControlNode_fnConstructor(
IUnknown * pUnkOuter,
ULONG NodeType,
ULONG PinId,
REFIID riid,
LPVOID * ppv);
/* frequencyfilter.cpp */
HRESULT
WINAPI
CBDAFrequencyFilter_fnConstructor(
IUnknown * pUnkOuter,
REFIID riid,
LPVOID * ppv);
/* signalstatistics.cpp */
HRESULT
WINAPI
CBDASignalStatistics_fnConstructor(
IUnknown * pUnkOuter,
REFIID riid,
LPVOID * ppv);
/* lnbinfo.cpp */
HRESULT
WINAPI
CBDALNBInfo_fnConstructor(
IUnknown * pUnkOuter,
REFIID riid,
LPVOID * ppv);
/* digitaldemo.cpp */
HRESULT
WINAPI
CBDADigitalDemodulator_fnConstructor(
IUnknown * pUnkOuter,
REFIID riid,
LPVOID * ppv);
#endif

View file

@ -0,0 +1,217 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS BDA Proxy
* FILE: dll/directx/bdaplgin/frequencyfilter.cpp
* PURPOSE: IBDA_FrequencyFilter interface
*
* PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org)
*/
#include "precomp.h"
const GUID IID_IBDA_SignalStatistics = {0x1347d106, 0xcf3a, 0x428a, {0xa5, 0xcb, 0xac, 0x0d, 0x9a, 0x2a, 0x43, 0x38}};
class CBDASignalStatistics : public IBDA_SignalStatistics
{
public:
STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
STDMETHODIMP_(ULONG) AddRef()
{
InterlockedIncrement(&m_Ref);
return m_Ref;
}
STDMETHODIMP_(ULONG) Release()
{
InterlockedDecrement(&m_Ref);
if (!m_Ref)
{
delete this;
return 0;
}
return m_Ref;
}
// IBDA_SignalStatistics methods
HRESULT STDMETHODCALLTYPE put_SignalStrength(LONG lDbStrength);
HRESULT STDMETHODCALLTYPE get_SignalStrength(LONG *plDbStrength);
HRESULT STDMETHODCALLTYPE put_SignalQuality(LONG lPercentQuality);
HRESULT STDMETHODCALLTYPE get_SignalQuality(LONG *plPercentQuality);
HRESULT STDMETHODCALLTYPE put_SignalPresent(BOOLEAN fPresent);
HRESULT STDMETHODCALLTYPE get_SignalPresent(BOOLEAN *pfPresent);
HRESULT STDMETHODCALLTYPE put_SignalLocked(BOOLEAN fLocked);
HRESULT STDMETHODCALLTYPE get_SignalLocked(BOOLEAN *pfLocked);
HRESULT STDMETHODCALLTYPE put_SampleTime(LONG lmsSampleTime);
HRESULT STDMETHODCALLTYPE get_SampleTime(LONG *plmsSampleTime);
CBDASignalStatistics(HANDLE hFile) : m_Ref(0), m_hFile(hFile){};
~CBDASignalStatistics(){};
protected:
LONG m_Ref;
HANDLE m_hFile;
};
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::QueryInterface(
IN REFIID refiid,
OUT PVOID* Output)
{
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
*Output = NULL;
if (IsEqualGUID(refiid, IID_IUnknown))
{
*Output = PVOID(this);
reinterpret_cast<IUnknown*>(*Output)->AddRef();
return NOERROR;
}
if (IsEqualGUID(refiid, IID_IBDA_SignalStatistics))
{
*Output = (IBDA_SignalStatistics*)(this);
reinterpret_cast<IBDA_SignalStatistics*>(*Output)->AddRef();
return NOERROR;
}
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CBDASignalStatistics::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
return E_NOINTERFACE;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::put_SignalStrength(LONG lDbStrength)
{
OutputDebugStringW(L"CBDASignalStatistics::put_SignalStrength NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::get_SignalStrength(LONG *plDbStrength)
{
OutputDebugStringW(L"CBDASignalStatistics::get_SignalStrength NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::put_SignalQuality(LONG lPercentQuality)
{
OutputDebugStringW(L"CBDASignalStatistics::put_SignalQuality NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::get_SignalQuality(LONG *plPercentQuality)
{
OutputDebugStringW(L"CBDASignalStatistics::get_SignalQuality NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::put_SignalPresent(BOOLEAN fPresent)
{
OutputDebugStringW(L"CBDASignalStatistics::put_SignalPresent NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::get_SignalPresent(BOOLEAN *pfPresent)
{
OutputDebugStringW(L"CBDASignalStatistics::get_SignalPresent NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::put_SignalLocked(BOOLEAN fLocked)
{
OutputDebugStringW(L"CBDASignalStatistics::put_SignalLocked NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::get_SignalLocked(BOOLEAN *pfLocked)
{
OutputDebugStringW(L"CBDASignalStatistics::get_SignalLocked NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::put_SampleTime(LONG lmsSampleTime)
{
OutputDebugStringW(L"CBDASignalStatistics::put_SampleTime NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
STDMETHODCALLTYPE
CBDASignalStatistics::get_SampleTime(LONG *plmsSampleTime)
{
OutputDebugStringW(L"CBDASignalStatistics::get_SampleTime NotImplemented\n");
return E_NOTIMPL;
}
HRESULT
WINAPI
CBDASignalStatistics_fnConstructor(
IUnknown * pUnkOuter,
REFIID riid,
LPVOID * ppv)
{
HRESULT hr;
IKsObject *pObject = NULL;
HANDLE hFile;
// sanity check
assert(pUnkOuter);
// query for IKsObject
hr = pUnkOuter->QueryInterface(IID_IKsObject, (void**)&pObject);
// sanity check
assert(hr == NOERROR);
// another sanity check
assert(pObject != NULL);
// get file handle
hFile = pObject->KsGetObjectHandle();
// one more sanity check
assert(hFile != NULL && hFile != INVALID_HANDLE_VALUE);
// release IKsObject interface
pObject->Release();
// construct device control
CBDASignalStatistics * handler = new CBDASignalStatistics(hFile);
OutputDebugStringW(L"CBDASignalStatistics_fnConstructor\n");
if (!handler)
return E_OUTOFMEMORY;
if (FAILED(handler->QueryInterface(riid, ppv)))
{
/* not supported */
delete handler;
return E_NOINTERFACE;
}
return NOERROR;
}