ReactOS 0.4.16-dev-297-gc569aee
controlnode.cpp File Reference
#include "precomp.h"
Include dependency graph for controlnode.cpp:

Go to the source code of this file.

Classes

class  CControlNode
 

Functions

HRESULT WINAPI CControlNode_fnConstructor (IBaseFilter *pFilter, ULONG NodeType, ULONG PinId, REFIID riid, LPVOID *ppv)
 

Variables

const GUID IID_IKsPropertySet = {0x31efac30, 0x515c, 0x11d0, {0xa9,0xaa, 0x00,0xaa,0x00,0x61,0xbe,0x93}}
 

Function Documentation

◆ CControlNode_fnConstructor()

HRESULT WINAPI CControlNode_fnConstructor ( IBaseFilter pFilter,
ULONG  NodeType,
ULONG  PinId,
REFIID  riid,
LPVOID ppv 
)

Definition at line 92 of file controlnode.cpp.

98{
99 WCHAR Buffer[100];
100 HRESULT hr;
101 IPin * pPin = NULL;
103
104 // store pin id
105 swprintf(Buffer, L"%u", PinId);
106
107 // try find target pin
108 hr = pFilter->FindPin(Buffer, &pPin);
109
110 if (FAILED(hr))
111 {
112#ifdef BDAPLGIN_TRACE
113 swprintf(Buffer, L"CControlNode_fnConstructor failed find pin %lu with %lx\n", PinId, hr);
115#endif
116 return hr;
117 }
118
119 // query for IKsPropertySet interface
121 if (FAILED(hr))
122 return hr;
123
124#ifdef BDAPLGIN_TRACE
125 swprintf(Buffer, L"CControlNode_fnConstructor get IID_IKsObject status %lx\n", hr);
127#endif
128
129 // release IPin interface
130 pPin->Release();
131
132 // construct device control
134
135#ifdef BDAPLGIN_TRACE
136 OutputDebugStringW(L"CControlNode_fnConstructor\n");
137#endif
138
139 if (!handler)
140 return E_OUTOFMEMORY;
141
142 if (FAILED(handler->QueryInterface(riid, ppv)))
143 {
144 /* not supported */
145 delete handler;
146 return E_NOINTERFACE;
147 }
148
149 return NOERROR;
150}
NodeType
Definition: Node.h:6
_Must_inspect_result_ _In_ KSP_BDA_NODE_PIN * pProperty
Definition: bdasup.h:156
Definition: bufpool.h:45
const GUID IID_IKsPropertySet
Definition: controlnode.cpp:13
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7512
#define swprintf
Definition: precomp.h:40
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT FindPin([in, string] LPCWSTR Id, [out] IPin **ppPin)
Definition: axcore.idl:92
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
ULONG Release()
#define FAILED(hr)
Definition: intsafe.h:51
#define L(x)
Definition: ntvdm.h:50
HRESULT hr
Definition: shlfolder.c:183
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CBDADeviceControl::GetControlNode().

Variable Documentation

◆ IID_IKsPropertySet