ReactOS  0.4.13-dev-482-ge57f103
devicecontrol.cpp File Reference
#include "precomp.h"
Include dependency graph for devicecontrol.cpp:

Go to the source code of this file.

Classes

class  CBDADeviceControl
 

Functions

HRESULT WINAPI CBDADeviceControl_fnConstructor (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
 

Variables

const GUID IID_IKsObject = {0x423c13a2, 0x2070, 0x11d0, {0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}}
 
const GUID CLSID_DVBTNetworkProvider = {0x216c62df, 0x6d7f, 0x4e9a, {0x85, 0x71, 0x5, 0xf1, 0x4e, 0xdb, 0x76, 0x6a}}
 
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}}
 
const GUID KSMETHODSETID_BdaChangeSync = {0xfd0a5af3, 0xb41d, 0x11d2, {0x9c, 0x95, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}}
 
const GUID IID_IBaseFilter = {0x56a86895, 0x0ad4, 0x11ce, {0xb0,0x3a, 0x00,0x20,0xaf,0x0b,0xa7,0x70}}
 
const GUID IID_IAsyncReader = {0x56A868AA, 0x0AD4, 0x11CE, {0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}}
 
const GUID IID_IAMOpenProgress = {0x8E1C39A1, 0xDE53, 0x11cf, {0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D}}
 
const GUID IID_IBDA_Topology = {0x79B56888, 0x7FEA, 0x4690, {0xB4, 0x5D, 0x38, 0xFD, 0x3C, 0x78, 0x49, 0xBE}}
 
const GUID IID_IBDA_NetworkProvider = {0xfd501041, 0x8ebe, 0x11ce, {0x81, 0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d, 0xa2}}
 
const GUID IID_IBDA_DeviceControl = {0xFD0A5AF3, 0xB41D, 0x11d2, {0x9C, 0x95, 0x00, 0xC0, 0x4F, 0x79, 0x71, 0xE0}}
 
const GUID IID_IDistributorNotify = {0x56a868af, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}
 

Function Documentation

◆ CBDADeviceControl_fnConstructor()

HRESULT WINAPI CBDADeviceControl_fnConstructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv 
)

Definition at line 495 of file devicecontrol.cpp.

499 {
500  HRESULT hr;
501  IKsObject *pObject = NULL;
502  IBaseFilter *pFilter = NULL;
503  HANDLE hFile;
504 
505 #ifdef BDAPLGIN_TRACE
506  OutputDebugStringW(L"CBDADeviceControl_fnConstructor\n");
507 #endif
508 
509  //DebugBreak();
510 
511  // sanity check
512  assert(pUnkOuter);
513 
514  // query for IKsObject
515  hr = pUnkOuter->QueryInterface(IID_IKsObject, (void**)&pObject);
516 
517  if (FAILED(hr))
518  return E_NOINTERFACE;
519 
520  // sanity check
521  assert(hr == NOERROR);
522 
523  // query for IBaseFilter interface support
524  hr = pUnkOuter->QueryInterface(IID_IBaseFilter, (void**)&pFilter);
525 
526  if (FAILED(hr))
527  {
528  // release
529  pObject->Release();
530  return E_NOINTERFACE;
531  }
532 
533  // another sanity check
534  assert(pObject != NULL);
535 
536  // get file handle
537  hFile = pObject->KsGetObjectHandle();
538 
539  // one more sanity check
541 
542  // release IKsObject interface
543  pObject->Release();
544 
545  // release filter
546  pFilter->Release();
547 
548  // construct device control
549  CBDADeviceControl * handler = new CBDADeviceControl(pUnkOuter, pFilter, hFile);
550 
551  if (!handler)
552  return E_OUTOFMEMORY;
553 
554  if (FAILED(handler->QueryInterface(riid, ppv)))
555  {
556  /* not supported */
557  delete handler;
558  return E_NOINTERFACE;
559  }
560 
561  return NOERROR;
562 }
const GUID IID_IBaseFilter
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT hr
Definition: shlfolder.c:183
#define NOERROR
Definition: winerror.h:2354
const GUID IID_IKsObject
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
#define assert(x)
Definition: debug.h:53
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
nsrefcnt Release()
static const WCHAR L[]
Definition: oid.c:1250
_In_ HANDLE hFile
Definition: mswsock.h:90
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7786

Variable Documentation

◆ CLSID_DVBTNetworkProvider

const GUID CLSID_DVBTNetworkProvider = {0x216c62df, 0x6d7f, 0x4e9a, {0x85, 0x71, 0x5, 0xf1, 0x4e, 0xdb, 0x76, 0x6a}}

Definition at line 15 of file devicecontrol.cpp.

Referenced by CNetworkProvider_fnConstructor().

◆ IID_IAMOpenProgress

const GUID IID_IAMOpenProgress = {0x8E1C39A1, 0xDE53, 0x11cf, {0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D}}

Definition at line 22 of file devicecontrol.cpp.

◆ IID_IAsyncReader

const GUID IID_IAsyncReader = {0x56A868AA, 0x0AD4, 0x11CE, {0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}}

◆ IID_IBaseFilter

◆ IID_IBDA_DeviceControl

const GUID IID_IBDA_DeviceControl = {0xFD0A5AF3, 0xB41D, 0x11d2, {0x9C, 0x95, 0x00, 0xC0, 0x4F, 0x79, 0x71, 0xE0}}

◆ IID_IBDA_NetworkProvider

const GUID IID_IBDA_NetworkProvider = {0xfd501041, 0x8ebe, 0x11ce, {0x81, 0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d, 0xa2}}

◆ IID_IBDA_Topology

const GUID IID_IBDA_Topology = {0x79B56888, 0x7FEA, 0x4690, {0xB4, 0x5D, 0x38, 0xFD, 0x3C, 0x78, 0x49, 0xBE}}

◆ IID_IDistributorNotify

const GUID IID_IDistributorNotify = {0x56a868af, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}

◆ IID_IKsObject

◆ KSMETHODSETID_BdaChangeSync

const GUID KSMETHODSETID_BdaChangeSync = {0xfd0a5af3, 0xb41d, 0x11d2, {0x9c, 0x95, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}}

◆ KSMETHODSETID_BdaDeviceConfiguration

const GUID KSMETHODSETID_BdaDeviceConfiguration = {0x71985f45, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}}

Definition at line 18 of file devicecontrol.cpp.

Referenced by CBDADeviceControl::CreateTopology().

◆ KSPROPSETID_BdaTopology

const GUID KSPROPSETID_BdaTopology = {0xa14ee835, 0x0a23, 0x11d3, {0x9c, 0xc7, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}}