ReactOS 0.4.15-dev-8236-g99f0937
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){};
LONG m_Ref
Definition: node.cpp:45
IUnknown * m_pUnkOuter
Definition: node.cpp:46
HANDLE m_Handle
Definition: node.cpp:47
ULONG Handle
Definition: gdb_input.c:15

◆ ~CKsNode()

virtual CKsNode::~CKsNode ( )
inlinevirtual

Definition at line 39 of file node.cpp.

40 {
42 };
#define CloseHandle
Definition: compat.h:739

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}
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
#define NULL
Definition: types.h:112
#define assert(x)
Definition: debug.h:53
#define IOCTL_KS_ENABLE_EVENT
Definition: ks.h:130
#define IOCTL_KS_DISABLE_EVENT
Definition: ks.h:133
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
_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

◆ 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 IOCTL_KS_METHOD
Definition: ks.h:136

◆ 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}
_In_ WDFDEVICE _In_ PWDF_DEVICE_INTERFACE_PROPERTY_DATA PropertyData
#define IOCTL_KS_PROPERTY
Definition: ks.h:127

◆ QueryInterface()

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

Definition at line 52 of file node.cpp.

55{
56 if (IsEqualGUID(refiid, IID_IUnknown) ||
58 {
59 *Output = PVOID(this);
60 reinterpret_cast<IUnknown*>(*Output)->AddRef();
61 return NOERROR;
62 }
63
64 return E_NOINTERFACE;
65}
const GUID IID_IUnknown
const GUID IID_IKsControl
Definition: filter.c:44
ULONG AddRef()
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
@ Output
Definition: arc.h:85
void * PVOID
Definition: typedefs.h:50
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354

◆ STDMETHODIMP_() [1/2]

CKsNode::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 16 of file node.cpp.

17 {
19 return m_Ref;
20 }
#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 }
#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 45 of file node.cpp.

Referenced by STDMETHODIMP_().


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