ReactOS  0.4.14-dev-297-g23e575c
CBDAPinControl Class Reference
Inheritance diagram for CBDAPinControl:
Collaboration diagram for CBDAPinControl:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT STDMETHODCALLTYPE GetPinID (ULONG *pulPinID)
 
HRESULT STDMETHODCALLTYPE GetPinType (ULONG *pulPinType)
 
HRESULT STDMETHODCALLTYPE RegistrationContext (ULONG *pulRegistrationCtx)
 
 CBDAPinControl (HANDLE hFile, IBDA_NetworkProvider *pProvider, IPin *pConnectedPin, ULONG RegistrationCtx)
 
virtual ~CBDAPinControl ()
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Protected Attributes

LONG m_Ref
 
HANDLE m_Handle
 
IBDA_NetworkProviderm_pProvider
 
IPinm_pConnectedPin
 
ULONG m_RegistrationCtx
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 19 of file pincontrol.cpp.

Constructor & Destructor Documentation

◆ CBDAPinControl()

CBDAPinControl::CBDAPinControl ( HANDLE  hFile,
IBDA_NetworkProvider pProvider,
IPin pConnectedPin,
ULONG  RegistrationCtx 
)
inline

Definition at line 45 of file pincontrol.cpp.

45 : m_Ref(0), m_Handle(hFile), m_pProvider(pProvider), m_pConnectedPin(pConnectedPin), m_RegistrationCtx(RegistrationCtx){};
IBDA_NetworkProvider * m_pProvider
Definition: pincontrol.cpp:55
_In_ HANDLE hFile
Definition: mswsock.h:90
IPin * m_pConnectedPin
Definition: pincontrol.cpp:56
ULONG m_RegistrationCtx
Definition: pincontrol.cpp:57

◆ ~CBDAPinControl()

virtual CBDAPinControl::~CBDAPinControl ( )
inlinevirtual

Definition at line 46 of file pincontrol.cpp.

47  {
48  //m_pConnectedPin->Release();
49  //m_pProvider->Release();
50  };

Member Function Documentation

◆ GetPinID()

HRESULT STDMETHODCALLTYPE CBDAPinControl::GetPinID ( ULONG pulPinID)

Implements IBDA_PinControl.

Definition at line 87 of file pincontrol.cpp.

88 {
91  HRESULT hr;
92 
93  // setup request
97 
98  // perform request
100 
101 #ifdef BDAPLGIN_TRACE
102  WCHAR Buffer[100];
103  swprintf(Buffer, L"CBDAPinControl::GetPinID: hr %lx pulPinID %lu BytesReturned %lx\n", hr, *pulPinID, BytesReturned);
105 #endif
106 
107  return hr;
108 }
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
HRESULT hr
Definition: shlfolder.c:183
const GUID KSPROPSETID_BdaPinControl
Definition: pincontrol.cpp:13
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
Definition: bufpool.h:45
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define swprintf(buf, format,...)
Definition: sprintf.c:56
static const WCHAR L[]
Definition: oid.c:1250
_In_ DWORD Property
Definition: setupapi.h:1545
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
unsigned int ULONG
Definition: retypes.h:1

◆ GetPinType()

HRESULT STDMETHODCALLTYPE CBDAPinControl::GetPinType ( ULONG pulPinType)

Implements IBDA_PinControl.

Definition at line 112 of file pincontrol.cpp.

113 {
116  HRESULT hr;
117 
118  // setup request
122 
123  // perform request
125 
126 #ifdef BDAPLGIN_TRACE
127  WCHAR Buffer[100];
128  swprintf(Buffer, L"CBDAPinControl::GetPinType: hr %lx pulPinType %lu BytesReturned %lx\n", hr, *pulPinType, BytesReturned);
130 #endif
131 
132  return hr;
133 }
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
HRESULT hr
Definition: shlfolder.c:183
const GUID KSPROPSETID_BdaPinControl
Definition: pincontrol.cpp:13
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
Definition: bufpool.h:45
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define swprintf(buf, format,...)
Definition: sprintf.c:56
static const WCHAR L[]
Definition: oid.c:1250
_In_ DWORD Property
Definition: setupapi.h:1545
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
unsigned int ULONG
Definition: retypes.h:1

◆ QueryInterface()

HRESULT STDMETHODCALLTYPE CBDAPinControl::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

Definition at line 62 of file pincontrol.cpp.

65 {
66  *Output = NULL;
67  if (IsEqualGUID(refiid, IID_IUnknown))
68  {
69  *Output = PVOID(this);
70  reinterpret_cast<IUnknown*>(*Output)->AddRef();
71  return NOERROR;
72  }
73  if (IsEqualGUID(refiid, IID_IBDA_PinControl))
74  {
75  *Output = (IBDA_PinControl*)(this);
76  reinterpret_cast<IBDA_PinControl*>(*Output)->AddRef();
77  return NOERROR;
78  }
79 DebugBreak();
80  return E_NOINTERFACE;
81 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354
const GUID IID_IBDA_PinControl
Definition: pincontrol.cpp:14
void WINAPI DebugBreak(void)
smooth NULL
Definition: ftsmooth.c:416
void * PVOID
Definition: retypes.h:9
const GUID IID_IUnknown
Definition: arc.h:85
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ RegistrationContext()

HRESULT STDMETHODCALLTYPE CBDAPinControl::RegistrationContext ( ULONG pulRegistrationCtx)

Implements IBDA_PinControl.

Definition at line 137 of file pincontrol.cpp.

138 {
139 #ifdef BDAPLGIN_TRACE
140  OutputDebugStringW(L"CBDAPinControl::RegistrationContext\n");
141 #endif
142 
143  if (!pulRegistrationCtx)
144  {
145  // invalid argument
146  return E_POINTER;
147  }
148 
149  if (m_RegistrationCtx)
150  {
151  // is registered
152  *pulRegistrationCtx = m_RegistrationCtx;
153  return NOERROR;
154  }
155 
156  //pin not registered
157  return E_FAIL;
158 }
#define NOERROR
Definition: winerror.h:2354
#define E_FAIL
Definition: ddrawi.h:102
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
static const WCHAR L[]
Definition: oid.c:1250
#define E_POINTER
Definition: winerror.h:2365
ULONG m_RegistrationCtx
Definition: pincontrol.cpp:57

◆ STDMETHODIMP_() [1/2]

CBDAPinControl::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 24 of file pincontrol.cpp.

25  {
27  return m_Ref;
28  }
#define InterlockedIncrement
Definition: armddk.h:53

◆ STDMETHODIMP_() [2/2]

CBDAPinControl::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 29 of file pincontrol.cpp.

30  {
32  if (!m_Ref)
33  {
34  delete this;
35  return 0;
36  }
37  return m_Ref;
38  }
#define InterlockedDecrement
Definition: armddk.h:52

Member Data Documentation

◆ m_Handle

HANDLE CBDAPinControl::m_Handle
protected

Definition at line 54 of file pincontrol.cpp.

Referenced by GetPinID(), and GetPinType().

◆ m_pConnectedPin

IPin* CBDAPinControl::m_pConnectedPin
protected

Definition at line 56 of file pincontrol.cpp.

◆ m_pProvider

IBDA_NetworkProvider* CBDAPinControl::m_pProvider
protected

Definition at line 55 of file pincontrol.cpp.

◆ m_Ref

LONG CBDAPinControl::m_Ref
protected

Definition at line 50 of file pincontrol.cpp.

Referenced by STDMETHODIMP_().

◆ m_RegistrationCtx

ULONG CBDAPinControl::m_RegistrationCtx
protected

Definition at line 57 of file pincontrol.cpp.

Referenced by RegistrationContext().


The documentation for this class was generated from the following file: