ReactOS  0.4.14-dev-50-g13bb5e2
ksproxy.cpp
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy
4  * FILE: dll/directx/ksproxy/ksproxy.cpp
5  * PURPOSE: ActiveMovie Proxy functions
6  *
7  * PROGRAMMERS: Dmitry Chapyshev
8  Johannes Anderwald (johannes.anderwald@reactos.org)
9  */
10 
11 #include "precomp.h"
12 
13 
14 const GUID CLSID_KsClockForwarder = {0x877e4351, 0x6fea, 0x11d0, {0xb8, 0x63, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}};
15 const GUID CLSID_KsQualityForwarder = {0xe05592e4, 0xc0b5, 0x11d0, {0xa4, 0x39, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96}};
16 const GUID CLSID_KsIBasicAudioInterfaceHandler = {0xb9f8ac3e, 0x0f71, 0x11d2, {0xb7, 0x2c, 0x00, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d}};
17 
19 {
20  {&MEDIATYPE_Audio, CKsDataTypeHandler_Constructor},
24  {&IID_IVPConfig, CVPConfig_Constructor},
25  {&IID_IVPVBIConfig, CVPVBIConfig_Constructor},
27  {&CLSID_Proxy, CKsProxy_Constructor},
28  {NULL, NULL}
29 };
30 
32 HRESULT
33 WINAPI
35  HANDLE Handle,
36  ULONG IoControl,
37  PVOID InBuffer,
38  ULONG InLength,
39  PVOID OutBuffer,
40  ULONG OutLength,
42 {
43  OVERLAPPED Overlapped;
44  DWORD Transferred;
45 
46  /* zero overlapped */
47  RtlZeroMemory(&Overlapped, sizeof(OVERLAPPED));
48 
49  /* create notification event */
50  Overlapped.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
51 
52  if (!Overlapped.hEvent)
53  {
54  /* failed */
56  }
57 
58  if (!DeviceIoControl(Handle, IoControl, InBuffer, InLength, OutBuffer, OutLength, BytesReturned, &Overlapped))
59  {
60  /* operation failed */
62  {
63  /* failed */
64  CloseHandle(Overlapped.hEvent);
66  }
67  }
68 
69  /* get result of pending operation */
70  if (!GetOverlappedResult(Handle, &Overlapped, &Transferred, TRUE))
71  {
72  /* failed */
73  CloseHandle(Overlapped.hEvent);
75  }
76 
77  /* store number of bytes transferred */
78  *BytesReturned = Transferred;
79 
80  /* close event object */
81  CloseHandle(Overlapped.hEvent);
82 
83  /* done */
84  return NOERROR;
85 }
86 
88 HRESULT
89 WINAPI
91  PKSDATARANGE DataRange,
93 {
94  //UNIMPLEMENTED
95  return NOERROR;
96 }
97 
99 HRESULT
100 WINAPI
102  REFGUID Category,
103  ACCESS_MASK Access,
105 {
106  HDEVINFO hList;
107  SP_DEVICE_INTERFACE_DATA DeviceInterfaceData;
108  PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData;
110 
111  /* open device list */
113 
115  {
116  /* failed */
118  }
119 
120  /* setup parameters */
121  DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
122 
123  if (SetupDiEnumDeviceInterfaces(hList, NULL, &Category, 0, &DeviceInterfaceData))
124  {
125  /* setup interface data struct */
126  DeviceInterfaceDetailData = (PSP_DEVICE_INTERFACE_DETAIL_DATA_W)Path;
127  DeviceInterfaceDetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W);
128 
129  /* get device interface details */
130  if (SetupDiGetDeviceInterfaceDetailW(hList, &DeviceInterfaceData, DeviceInterfaceDetailData, sizeof(Path), NULL, NULL))
131  {
132  /* open device */
134 
136  {
137  /* operation succeeded */
139  return NOERROR;
140  }
141  }
142  }
143 
144  /* free device list */
146 
147  /* failed */
149 }
150 
151 KSDDKAPI
152 HRESULT
153 WINAPI
155  HANDLE FilterHandle,
156  ULONG PinFactoryId,
158  PVOID *Items)
159 {
161  ULONG BytesReturned, NumData;
162  HRESULT hResult;
163 
164  /* zero pin property */
165  RtlZeroMemory(&Property, sizeof(KSP_PIN));
169  Property.PinId = PinFactoryId;
170 
171  /* query pin factory */
172  hResult = KsSynchronousDeviceControl(FilterHandle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_PIN), NULL, 0, &BytesReturned);
173 
175  {
176  /* buffer too small */
177  hResult = KsSynchronousDeviceControl(FilterHandle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_PIN), (PVOID)&NumData, sizeof(ULONG), &BytesReturned);
178 
179  if (SUCCEEDED(hResult))
180  {
181  /* store required data size */
182  BytesReturned = NumData;
184  }
185  }
186 
188  {
189  /* allocate data */
190  *Items = CoTaskMemAlloc(BytesReturned);
191 
192  if (!*Items)
193  {
194  /* no memory */
195  return E_OUTOFMEMORY;
196  }
197 
198  /* retry querying property */
199  hResult = KsSynchronousDeviceControl(FilterHandle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_PIN), (PVOID)*Items, BytesReturned, &BytesReturned);
200 
201  /* check for success */
202  if (FAILED(hResult))
203  {
204  /* free memory */
205  CoTaskMemFree(*Items);
206  }
207  }
208 
209  /* done */
210  return hResult;
211 }
212 
213 KSDDKAPI
214 HRESULT
215 WINAPI
217  HANDLE FilterHandle,
218  ULONG PinFactoryId,
219  ULONG *MediaTypeCount)
220 {
221  PKSMULTIPLE_ITEM MultipleItem;
222  HRESULT hr;
223 
224  /* try get constrained data ranges */
225  hr = KsGetMultiplePinFactoryItems(FilterHandle, PinFactoryId, KSPROPERTY_PIN_CONSTRAINEDDATARANGES, (PVOID*)&MultipleItem);
226 
227  /* check for failure*/
228  if (FAILED(hr))
229  {
230  /* try getting default data ranges */
231  hr = KsGetMultiplePinFactoryItems(FilterHandle, PinFactoryId, KSPROPERTY_PIN_DATARANGES, (PVOID*)&MultipleItem);
232  }
233 
234  if (SUCCEEDED(hr))
235  {
236  /* store number of media types */
237  *MediaTypeCount = MultipleItem->Count;
238 
239  /* free memory */
240  CoTaskMemFree(MultipleItem);
241  }
242 
243  /* done */
244  return hr;
245 }
246 
247 KSDDKAPI
248 HRESULT
249 WINAPI
251  int Position,
252  AM_MEDIA_TYPE *AmMediaType,
253  HANDLE FilterHandle,
254  ULONG PinFactoryId)
255 {
256  HRESULT hr;
257  PKSMULTIPLE_ITEM ItemList;
258  int i = 0;
260 
261  if (Position < 0)
262  return E_INVALIDARG;
263 
264  // get current supported ranges
265  hr = KsGetMultiplePinFactoryItems(FilterHandle, PinFactoryId, KSPROPERTY_PIN_CONSTRAINEDDATARANGES, (PVOID*)&ItemList);
266  if (FAILED(hr))
267  {
268  // get standard dataranges
269  hr = KsGetMultiplePinFactoryItems(FilterHandle, PinFactoryId, KSPROPERTY_PIN_DATARANGES, (PVOID*)&ItemList);
270 
271  //check for success
272  if (FAILED(hr))
273  return hr;
274  }
275 
276  if ((ULONG)Position >= ItemList->Count)
277  {
278  // out of bounds
279  CoTaskMemFree(ItemList);
281  }
282 
283  // goto first datarange
284  DataFormat = (PKSDATAFORMAT)(ItemList + 1);
285 
286  while(i != Position)
287  {
288  // goto next format;
290  i++;
291  }
292 
293 
294  DataFormat->FormatSize -= sizeof(KSDATAFORMAT);
295  if (DataFormat->FormatSize)
296  {
297  // copy extra format buffer
298  AmMediaType->pbFormat = (BYTE*)CoTaskMemAlloc(DataFormat->FormatSize);
299  if (!AmMediaType->pbFormat)
300  {
301  // not enough memory
302  CoTaskMemFree(ItemList);
303  return E_OUTOFMEMORY;
304  }
305  // copy format buffer
306  CopyMemory(AmMediaType->pbFormat, (DataFormat + 1), DataFormat->FormatSize);
307  AmMediaType->cbFormat = DataFormat->FormatSize;
308  }
309  else
310  {
311  // no format buffer
312  AmMediaType->pbFormat = NULL;
313  AmMediaType->cbFormat = 0;
314  }
315 
316  // copy type info
317  CopyMemory(&AmMediaType->majortype, &DataFormat->MajorFormat, sizeof(GUID));
318  CopyMemory(&AmMediaType->subtype, &DataFormat->SubFormat, sizeof(GUID));
319  CopyMemory(&AmMediaType->formattype, &DataFormat->Specifier, sizeof(GUID));
320  AmMediaType->bTemporalCompression = FALSE; //FIXME verify
321  AmMediaType->pUnk = NULL; //FIXME
322  AmMediaType->lSampleSize = DataFormat->SampleSize;
323  AmMediaType->bFixedSizeSamples = (AmMediaType->lSampleSize) ? TRUE : FALSE;
324 
325  // free dataformat list
326  CoTaskMemFree(ItemList);
327 
328  return NOERROR;
329 }
330 
331 extern "C"
332 KSDDKAPI
333 HRESULT
334 WINAPI
336 {
337  ULONG Index = 0;
338  LPOLESTR pStr;
339  HRESULT hr = S_OK;
340  HKEY hClass;
341 
342  if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_SET_VALUE, &hClass) != ERROR_SUCCESS)
343  return E_FAIL;
344 
345  do
346  {
348  if (FAILED(hr))
349  break;
350 
351  RegDeleteKeyW(hClass, pStr);
352  CoTaskMemFree(pStr);
353  Index++;
354  }while(InterfaceTable[Index].lpfnCI != 0);
355 
356  RegCloseKey(hClass);
357  return hr;
358 }
359 
360 extern "C"
361 KSDDKAPI
362 HRESULT
363 WINAPI
365 {
366  ULONG Index = 0;
367  LPOLESTR pStr;
368  HRESULT hr = S_OK;
369  HKEY hClass, hKey, hSubKey;
370  static LPCWSTR ModuleName = L"ksproxy.ax";
371  static LPCWSTR ThreadingModel = L"Both";
372 
373  if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_WRITE, &hClass) != ERROR_SUCCESS)
374  return E_FAIL;
375 
376  do
377  {
379  if (FAILED(hr))
380  break;
381 
382  if (RegCreateKeyExW(hClass, pStr, 0, 0, 0, KEY_WRITE, NULL, &hKey, 0) == ERROR_SUCCESS)
383  {
384  if (RegCreateKeyExW(hKey, L"InprocServer32", 0, 0, 0, KEY_WRITE, NULL, &hSubKey, 0) == ERROR_SUCCESS)
385  {
386  RegSetValueExW(hSubKey, 0, 0, REG_SZ, (const BYTE*)ModuleName, (wcslen(ModuleName) + 1) * sizeof(WCHAR));
387  RegSetValueExW(hSubKey, L"ThreadingModel", 0, REG_SZ, (const BYTE*)ThreadingModel, (wcslen(ThreadingModel) + 1) * sizeof(WCHAR));
388  RegCloseKey(hSubKey);
389  }
390  RegCloseKey(hKey);
391  }
392 
393  CoTaskMemFree(pStr);
394  Index++;
395  }while(InterfaceTable[Index].lpfnCI != 0);
396 
397  RegCloseKey(hClass);
398  return hr;
399 }
400 
401 KSDDKAPI
402 HRESULT
403 WINAPI
405  REFCLSID rclsid,
406  REFIID riid,
407  LPVOID *ppv)
408 {
409  UINT i;
411  IClassFactory * pcf = NULL;
412 
413  if (!ppv)
414  return E_INVALIDARG;
415 
416  *ppv = NULL;
417 
418  for (i = 0; InterfaceTable[i].riid; i++)
419  {
420  if (IsEqualIID(*InterfaceTable[i].riid, rclsid))
421  {
423  break;
424  }
425  }
426 
427  if (!pcf)
428  {
430  }
431 
432  hres = pcf->QueryInterface(riid, ppv);
433  pcf->Release();
434 
435  return hres;
436 }
437 
438 KSDDKAPI
439 HRESULT
440 WINAPI
442 {
443  return S_OK;
444 }
445 
HRESULT WINAPI CKsBasicAudio_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: basicaudio.cpp:272
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
Definition: hubbusif.h:121
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
#define KEY_SET_VALUE
Definition: nt_native.h:1017
WCHAR DevicePath[ANYSIZE_ARRAY]
Definition: setupapi.h:850
Definition: scsiwmi.h:51
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:95
#define NOERROR
Definition: winerror.h:2354
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: classpnp.h:966
HDEVINFO WINAPI SetupDiGetClassDevsW(CONST GUID *class, LPCWSTR enumstr, HWND parent, DWORD flags)
Definition: devinst.c:2297
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
Definition: iocompl.c:204
REFIID riid
Definition: precomp.h:44
#define REFCLSID
Definition: guiddef.h:117
static COORD Position
Definition: mouse.c:34
BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(HDEVINFO DeviceInfoSet, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData, PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData, DWORD DeviceInterfaceDetailDataSize, PDWORD RequiredSize, PSP_DEVINFO_DATA DeviceInfoData)
Definition: devinst.c:3016
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1237
REFIID LPVOID * ppv
Definition: atlbase.h:39
LPFNCREATEINSTANCE lpfnCI
Definition: shellole.c:61
HRESULT WINAPI CKsProxy_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: proxy.cpp:3159
#define KSINTERFACESETID_Standard
Definition: ks.h:280
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char * ModuleName
Definition: acpixf.h:1264
HRESULT WINAPI CVPConfig_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: cvpconfig.cpp:336
static LPOLESTR
Definition: stg_prop.c:27
#define ERROR_IO_PENDING
Definition: dderror.h:15
#define E_FAIL
Definition: ddrawi.h:102
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
#define KSDDKAPI
Definition: ks.h:40
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1091
uint32_t ULONG_PTR
Definition: typedefs.h:63
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_DEVICE_INTERFACE_DETAIL_DATA_W
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const GUID * riid
Definition: precomp.h:26
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
KSDDKAPI HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: ksproxy.cpp:404
#define GENERIC_WRITE
Definition: nt_native.h:90
ULONG Release()
HANDLE hEvent
Definition: winbase.h:792
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI CKsQualityForwarder_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
KSDDKAPI HRESULT WINAPI DllUnregisterServer(void)
Definition: ksproxy.cpp:335
#define OPEN_EXISTING
Definition: compat.h:426
KSDDKAPI HRESULT WINAPI KsResolveRequiredAttributes(PKSDATARANGE DataRange, KSMULTIPLE_ITEM *Attributes OPTIONAL)
Definition: ksproxy.cpp:90
#define KEY_WRITE
Definition: nt_native.h:1031
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4895
const GUID CLSID_KsQualityForwarder
Definition: ksproxy.cpp:15
KSDDKAPI HRESULT WINAPI KsGetMediaTypeCount(HANDLE FilterHandle, ULONG PinFactoryId, ULONG *MediaTypeCount)
Definition: ksproxy.cpp:216
_In_ HANDLE Handle
Definition: extypes.h:390
IClassFactory * CClassFactory_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, IID *riidInst)
HRESULT WINAPI CVPVBIConfig_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
HRESULT hres
Definition: protocol.c:465
Definition: ks.h:642
const GUID CLSID_KsIBasicAudioInterfaceHandler
Definition: ksproxy.cpp:16
KSDDKAPI HRESULT WINAPI KsGetMultiplePinFactoryItems(HANDLE FilterHandle, ULONG PinFactoryId, ULONG PropertyId, PVOID *Items)
Definition: ksproxy.cpp:154
__wchar_t WCHAR
Definition: xmlstorage.h:180
KSDDKAPI HRESULT WINAPI DllRegisterServer(void)
Definition: ksproxy.cpp:364
LONG HRESULT
Definition: typedefs.h:77
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2898
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
#define CopyMemory
Definition: winbase.h:1633
static const UCHAR Index[8]
Definition: usbohci.c:18
unsigned long DWORD
Definition: ntddk_ex.h:95
const GUID CLSID_KsClockForwarder
Definition: ksproxy.cpp:14
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W * PSP_DEVICE_INTERFACE_DETAIL_DATA_W
#define SEVERITY_ERROR
Definition: winerror.h:65
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
KSDDKAPI HRESULT WINAPI KsGetMediaType(int Position, AM_MEDIA_TYPE *AmMediaType, HANDLE FilterHandle, ULONG PinFactoryId)
Definition: ksproxy.cpp:250
static const WCHAR L[]
Definition: oid.c:1250
HRESULT WINAPI CKsDataTypeHandler_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: datatype.cpp:228
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
unsigned char BYTE
Definition: mem.h:68
#define GENERIC_READ
Definition: compat.h:124
#define ERROR_MORE_DATA
Definition: dderror.h:13
_In_ DWORD Property
Definition: setupapi.h:1545
#define FACILITY_WIN32
Definition: winerror.h:27
HWND hList
Definition: livecd.c:10
HRESULT WINAPI CKsInterfaceHandler_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: interface.cpp:478
#define S_OK
Definition: intsafe.h:59
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
PRTL_UNICODE_STRING_BUFFER Path
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, CONST GUID *InterfaceClassGuid, DWORD MemberIndex, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
Definition: devinst.c:2785
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
#define KSPROPSETID_Pin
Definition: ks.h:617
unsigned int * PULONG
Definition: retypes.h:1
unsigned int UINT
Definition: ndis.h:50
#define CreateFileW
Definition: compat.h:400
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define DIGCF_DEVICEINTERFACE
Definition: setupapi.h:174
struct _SP_DEVICE_INTERFACE_DATA SP_DEVICE_INTERFACE_DATA
unsigned int ULONG
Definition: retypes.h:1
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define FILE_FLAG_OVERLAPPED
Definition: disk.h:46
KSDDKAPI HRESULT WINAPI DllCanUnloadNow(void)
Definition: ksproxy.cpp:441
Property(long _type, long _tag, INREAL _value)
Definition: reader.h:125
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
HRESULT WINAPI CKsClockForwarder_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
ULONG ACCESS_MASK
Definition: nt_native.h:40
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
static INTERFACE_TABLE InterfaceTable[]
Definition: ksproxy.cpp:18
#define SUCCEEDED(hr)
Definition: intsafe.h:57
KSDATAFORMAT * PKSDATAFORMAT
#define DIGCF_PRESENT
Definition: setupapi.h:171
KSDDKAPI HRESULT WINAPI KsOpenDefaultDevice(REFGUID Category, ACCESS_MASK Access, PHANDLE DeviceHandle)
Definition: ksproxy.cpp:101
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2321
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define REG_SZ
Definition: layer.c:22
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68