ReactOS  0.4.14-dev-342-gdc047f9
CKsNode Class Reference
Inheritance diagram for CKsNode:
Collaboration diagram for CKsNode:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT STDMETHODCALLTYPE KsProperty (PKSPROPERTY Property, ULONG PropertyLength, LPVOID PropertyData, ULONG DataLength, ULONG *BytesReturned)
 
HRESULT STDMETHODCALLTYPE KsMethod (PKSMETHOD Method, ULONG MethodLength, LPVOID MethodData, ULONG DataLength, ULONG *BytesReturned)
 
HRESULT STDMETHODCALLTYPE KsEvent (PKSEVENT Event, ULONG EventLength, LPVOID EventData, ULONG DataLength, ULONG *BytesReturned)
 
 CKsNode (IUnknown *pUnkOuter, HANDLE Handle)
 
virtual ~CKsNode ()
 
- Public Member Functions inherited from IKsControl
HRESULT KsProperty ([in] PKSPROPERTY Property, [in] ULONG PropertyLength, [in, out] void *PropertyData, [in] ULONG DataLength, [out] ULONG *BytesReturned)
 
HRESULT KsMethod ([in] PKSMETHOD Method, [in] ULONG MethodLength, [in, out] void *MethodData, [in] ULONG DataLength, [out] ULONG *BytesReturned)
 
HRESULT KsEvent ([in] PKSEVENT Event, [in] ULONG EventLength, [in, out] void *EventData, [in] ULONG DataLength, [out] ULONG *BytesReturned)
 
- 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
 
IUnknownm_pUnkOuter
 
HANDLE m_Handle
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 11 of file node.cpp.

Constructor & Destructor Documentation

◆ CKsNode()

CKsNode::CKsNode ( IUnknown pUnkOuter,
HANDLE  Handle 
)
inline

Definition at line 38 of file node.cpp.

38 : m_Ref(0), m_pUnkOuter(pUnkOuter), m_Handle(Handle){};
IUnknown * m_pUnkOuter
Definition: node.cpp:46
LONG m_Ref
Definition: node.cpp:42
_In_ HANDLE Handle
Definition: extypes.h:390
HANDLE m_Handle
Definition: node.cpp:47

◆ ~CKsNode()

virtual CKsNode::~CKsNode ( )
inlinevirtual

Definition at line 39 of file node.cpp.

40  {
42  };
#define CloseHandle
Definition: compat.h:406
HANDLE m_Handle
Definition: node.cpp:47

Member Function Documentation

◆ KsEvent()

HRESULT STDMETHODCALLTYPE CKsNode::KsEvent ( PKSEVENT  Event,
ULONG  EventLength,
LPVOID  EventData,
ULONG  DataLength,
ULONG BytesReturned 
)

Definition at line 98 of file node.cpp.

104 {
105  assert(m_Handle != 0);
106 
107  if (EventLength)
109  else
111 }
#define IOCTL_KS_DISABLE_EVENT
Definition: ks.h:133
#define assert(x)
Definition: debug.h:53
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
smooth NULL
Definition: ftsmooth.c:416
#define IOCTL_KS_ENABLE_EVENT
Definition: ks.h:130
HANDLE m_Handle
Definition: node.cpp:47
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG DataLength
Definition: hidpi.h:333

◆ KsMethod()

HRESULT STDMETHODCALLTYPE CKsNode::KsMethod ( PKSMETHOD  Method,
ULONG  MethodLength,
LPVOID  MethodData,
ULONG  DataLength,
ULONG BytesReturned 
)

Definition at line 85 of file node.cpp.

91 {
92  assert(m_Handle != 0);
93  return KsSynchronousDeviceControl(m_Handle, IOCTL_KS_METHOD, (PVOID)Method, MethodLength, (PVOID)MethodData, DataLength, BytesReturned);
94 }
#define assert(x)
Definition: debug.h:53
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
#define IOCTL_KS_METHOD
Definition: ks.h:136
HANDLE m_Handle
Definition: node.cpp:47
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG DataLength
Definition: hidpi.h:333

◆ KsProperty()

HRESULT STDMETHODCALLTYPE CKsNode::KsProperty ( PKSPROPERTY  Property,
ULONG  PropertyLength,
LPVOID  PropertyData,
ULONG  DataLength,
ULONG BytesReturned 
)

Definition at line 72 of file node.cpp.

78 {
79  assert(m_Handle != 0);
81 }
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
#define assert(x)
Definition: debug.h:53
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
HANDLE m_Handle
Definition: node.cpp:47
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG DataLength
Definition: hidpi.h:333

◆ QueryInterface()

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

Definition at line 52 of file node.cpp.

55 {
56  if (IsEqualGUID(refiid, IID_IUnknown) ||
57  IsEqualGUID(refiid, IID_IKsControl))
58  {
59  *Output = PVOID(this);
60  reinterpret_cast<IUnknown*>(*Output)->AddRef();
61  return NOERROR;
62  }
63 
64  return E_NOINTERFACE;
65 }
#define E_NOINTERFACE
Definition: winerror.h:2364
const GUID IID_IKsControl
Definition: filter.c:44
#define NOERROR
Definition: winerror.h:2354
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

◆ STDMETHODIMP_() [1/2]

CKsNode::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 16 of file node.cpp.

17  {
19  return m_Ref;
20  }
LONG m_Ref
Definition: node.cpp:42
#define InterlockedIncrement
Definition: armddk.h:53

◆ STDMETHODIMP_() [2/2]

CKsNode::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 21 of file node.cpp.

22  {
24 
25  if (!m_Ref)
26  {
27  delete this;
28  return 0;
29  }
30  return m_Ref;
31  }
LONG m_Ref
Definition: node.cpp:42
#define InterlockedDecrement
Definition: armddk.h:52

Member Data Documentation

◆ m_Handle

HANDLE CKsNode::m_Handle
protected

Definition at line 47 of file node.cpp.

Referenced by KsEvent(), KsMethod(), KsProperty(), and ~CKsNode().

◆ m_pUnkOuter

IUnknown* CKsNode::m_pUnkOuter
protected

Definition at line 46 of file node.cpp.

◆ m_Ref

LONG CKsNode::m_Ref
protected

Definition at line 42 of file node.cpp.

Referenced by STDMETHODIMP_().


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