ReactOS 0.4.15-dev-7660-g0086d05
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
14const GUID CLSID_KsClockForwarder = {0x877e4351, 0x6fea, 0x11d0, {0xb8, 0x63, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}};
15const GUID CLSID_KsQualityForwarder = {0xe05592e4, 0xc0b5, 0x11d0, {0xa4, 0x39, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96}};
16const 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
36 ULONG IoControl,
37 PVOID InBuffer,
38 ULONG InLength,
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
91 PKSDATARANGE DataRange,
93{
94 //UNIMPLEMENTED
95 return NOERROR;
96}
97
100WINAPI
102 REFGUID Category,
103 ACCESS_MASK Access,
105{
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
153WINAPI
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 */
191
192 if (!*Items)
193 {
194 /* no memory */
195 return E_OUTOFMEMORY;
196 }
197
198 /* retry querying property */
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
215WINAPI
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
249WINAPI
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
331extern "C"
334WINAPI
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
360extern "C"
363WINAPI
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 }
391 }
392
393 CoTaskMemFree(pStr);
394 Index++;
395 }while(InterfaceTable[Index].lpfnCI != 0);
396
397 RegCloseKey(hClass);
398 return hr;
399}
400
403WINAPI
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
440WINAPI
442{
443 return S_OK;
444}
445
PRTL_UNICODE_STRING_BUFFER Path
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:1280
HRESULT WINAPI CKsBasicAudio_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: basicaudio.cpp:272
IClassFactory * CClassFactory_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, IID *riidInst)
#define RegCloseKey(hKey)
Definition: registry.h:49
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: cdrom.h:932
HRESULT WINAPI CKsClockForwarder_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
HRESULT WINAPI CVPConfig_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: cvpconfig.cpp:336
HRESULT WINAPI CVPVBIConfig_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
HRESULT WINAPI CKsDataTypeHandler_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: datatype.cpp:228
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define ERROR_IO_PENDING
Definition: dderror.h:15
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
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
KSDATAFORMAT * PKSDATAFORMAT
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HRESULT WINAPI CKsProxy_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: proxy.cpp:3159
HRESULT WINAPI CKsQualityForwarder_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
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:1096
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3362
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:4911
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1239
#define CloseHandle
Definition: compat.h:739
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
#define GENERIC_READ
Definition: compat.h:135
#define MAX_PATH
Definition: compat.h:34
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, CONST GUID *InterfaceClassGuid, DWORD MemberIndex, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
Definition: devinst.c:2780
HDEVINFO WINAPI SetupDiGetClassDevsW(CONST GUID *class, LPCWSTR enumstr, HWND parent, DWORD flags)
Definition: devinst.c:2292
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:3011
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2893
LPFNCREATEINSTANCE lpfnCI
Definition: shellole.c:61
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
ULONG Handle
Definition: gdb_input.c:15
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
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
Definition: hubbusif.h:121
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
ULONG Release()
HRESULT WINAPI CKsInterfaceHandler_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: interface.cpp:478
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
Definition: iocompl.c:221
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
#define KSPROPSETID_Pin
Definition: ks.h:617
@ KSPROPERTY_PIN_CONSTRAINEDDATARANGES
Definition: ks.h:638
@ KSPROPERTY_PIN_DATARANGES
Definition: ks.h:628
#define KSDDKAPI
Definition: ks.h:40
#define KSINTERFACESETID_Standard
Definition: ks.h:280
static INTERFACE_TABLE InterfaceTable[]
Definition: ksproxy.cpp:18
const GUID CLSID_KsQualityForwarder
Definition: ksproxy.cpp:15
KSDDKAPI HRESULT WINAPI DllRegisterServer(void)
Definition: ksproxy.cpp:364
KSDDKAPI HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: ksproxy.cpp:404
KSDDKAPI HRESULT WINAPI KsGetMultiplePinFactoryItems(HANDLE FilterHandle, ULONG PinFactoryId, ULONG PropertyId, PVOID *Items)
Definition: ksproxy.cpp:154
const GUID CLSID_KsIBasicAudioInterfaceHandler
Definition: ksproxy.cpp:16
KSDDKAPI HRESULT WINAPI DllCanUnloadNow(void)
Definition: ksproxy.cpp:441
KSDDKAPI HRESULT WINAPI KsGetMediaTypeCount(HANDLE FilterHandle, ULONG PinFactoryId, ULONG *MediaTypeCount)
Definition: ksproxy.cpp:216
const GUID CLSID_KsClockForwarder
Definition: ksproxy.cpp:14
KSDDKAPI HRESULT WINAPI DllUnregisterServer(void)
Definition: ksproxy.cpp:335
KSDDKAPI HRESULT WINAPI KsResolveRequiredAttributes(PKSDATARANGE DataRange, KSMULTIPLE_ITEM *Attributes OPTIONAL)
Definition: ksproxy.cpp:90
KSDDKAPI HRESULT WINAPI KsGetMediaType(int Position, AM_MEDIA_TYPE *AmMediaType, HANDLE FilterHandle, ULONG PinFactoryId)
Definition: ksproxy.cpp:250
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
KSDDKAPI HRESULT WINAPI KsOpenDefaultDevice(REFGUID Category, ACCESS_MASK Access, PHANDLE DeviceHandle)
Definition: ksproxy.cpp:101
#define REG_SZ
Definition: layer.c:22
HWND hList
Definition: livecd.c:10
#define FILE_FLAG_OVERLAPPED
Definition: disk.h:46
HRESULT hres
Definition: protocol.c:465
static LPOLESTR
Definition: stg_prop.c:27
unsigned int UINT
Definition: ndis.h:50
ULONG ACCESS_MASK
Definition: nt_native.h:40
#define KEY_WRITE
Definition: nt_native.h:1031
#define GENERIC_WRITE
Definition: nt_native.h:90
#define KEY_SET_VALUE
Definition: nt_native.h:1017
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
#define L(x)
Definition: ntvdm.h:50
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
#define DIGCF_DEVICEINTERFACE
Definition: setupapi.h:174
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_DEVICE_INTERFACE_DETAIL_DATA_W
#define DIGCF_PRESENT
Definition: setupapi.h:171
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W * PSP_DEVICE_INTERFACE_DETAIL_DATA_W
struct _SP_DEVICE_INTERFACE_DATA SP_DEVICE_INTERFACE_DATA
HRESULT hr
Definition: shlfolder.c:183
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
const GUID * riid
Definition: precomp.h:26
ULONG Count
Definition: ks.h:1980
Definition: ks.h:642
Property(long _type, long _tag, INREAL _value)
Definition: reader.h:125
Definition: scsiwmi.h:51
HANDLE hEvent
Definition: winbase.h:820
WCHAR DevicePath[ANYSIZE_ARRAY]
Definition: setupapi.h:855
static COORD Position
Definition: mouse.c:34
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
uint32_t * PULONG
Definition: typedefs.h:59
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_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
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define CopyMemory
Definition: winbase.h:1710
#define WINAPI
Definition: msvc.h:6
#define NOERROR
Definition: winerror.h:2354
#define SEVERITY_ERROR
Definition: winerror.h:65
#define FACILITY_WIN32
Definition: winerror.h:27
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193