ReactOS 0.4.16-dev-91-g764881a
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 ()
 
HRESULT GetPinID ([in, out] ULONG *pulPinID)
 
HRESULT GetPinType ([in, out] ULONG *pulPinType)
 
HRESULT RegistrationContext ([in, out] ULONG *pulRegistrationCtx)
 
- 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){};
IPin * m_pConnectedPin
Definition: pincontrol.cpp:56
ULONG m_RegistrationCtx
Definition: pincontrol.cpp:57
IBDA_NetworkProvider * m_pProvider
Definition: pincontrol.cpp:55
FxWmiProvider * pProvider
Definition: fxwmiapi.cpp:54
_In_ HANDLE hFile
Definition: mswsock.h:90

◆ ~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}
@ KSPROPERTY_BDA_PIN_ID
Definition: bdamedia.h:194
Definition: bufpool.h:45
#define swprintf
Definition: precomp.h:40
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
#define L(x)
Definition: ntvdm.h:50
const GUID KSPROPSETID_BdaPinControl
Definition: pincontrol.cpp:13
HRESULT hr
Definition: shlfolder.c:183
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
Definition: wdfiotarget.h:1052
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ 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}
@ KSPROPERTY_BDA_PIN_TYPE
Definition: bdamedia.h:195

◆ 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 }
74 {
75 *Output = (IBDA_PinControl*)(this);
76 reinterpret_cast<IBDA_PinControl*>(*Output)->AddRef();
77 return NOERROR;
78 }
80 return E_NOINTERFACE;
81}
const GUID IID_IUnknown
#define NULL
Definition: types.h:112
ULONG AddRef()
const GUID IID_IBDA_PinControl
Definition: pincontrol.cpp:14
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
@ Output
Definition: arc.h:85
void * PVOID
Definition: typedefs.h:50
void WINAPI DebugBreak(void)
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354

◆ 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
150 {
151 // is registered
152 *pulRegistrationCtx = m_RegistrationCtx;
153 return NOERROR;
154 }
155
156 //pin not registered
157 return E_FAIL;
158}
#define E_FAIL
Definition: ddrawi.h:102
#define E_POINTER
Definition: winerror.h:2365

◆ 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 53 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: