ReactOS  0.4.14-dev-49-gfb4591c
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
120  hr = pPin->QueryInterface(IID_IKsPropertySet, (void**)&pProperty);
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 }
HRESULT FindPin([in, string] LPCWSTR Id, [out] IPin **ppPin)
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT hr
Definition: shlfolder.c:183
#define NOERROR
Definition: winerror.h:2354
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
ULONG Release()
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
NodeType
Definition: Node.h:5
_Must_inspect_result_ _In_ KSP_BDA_NODE_PIN * pProperty
Definition: bdasup.h:156
__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
const GUID IID_IKsPropertySet
Definition: controlnode.cpp:13
Definition: axcore.idl:91
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7786

Referenced by CBDADeviceControl::GetControlNode().

Variable Documentation

◆ IID_IKsPropertySet