ReactOS 0.4.16-dev-338-g34e76ad
mmixer.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Sound System
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/win32/wdmaud.drv/mmixer.c
5 *
6 * PURPOSE: WDM Audio Mixer API (User-mode part)
7 * PROGRAMMERS: Johannes Anderwald
8 */
9
10#include "wdmaud.h"
11
12#include <winreg.h>
13#include <setupapi.h>
14#include <mmixer.h>
15#define NTOS_MODE_USER
16#include <ndk/rtlfuncs.h>
17#include <ndk/iofuncs.h>
18
19#define NDEBUG
20#include <debug.h>
21#include <mmebuddy_debug.h>
22
23
25
26
27
28PVOID Alloc(ULONG NumBytes);
30VOID Free(PVOID Block);
31VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes);
32MIXER_STATUS Open(IN LPWSTR DevicePath, OUT PHANDLE hDevice);
33MIXER_STATUS Control(IN HANDLE hMixer, IN ULONG dwIoControlCode, IN PVOID lpInBuffer, IN ULONG nInBufferSize, OUT PVOID lpOutBuffer, ULONG nOutBufferSize, PULONG lpBytesReturned);
34MIXER_STATUS Enum(IN PVOID EnumContext, IN ULONG DeviceIndex, OUT LPWSTR * DeviceName, OUT PHANDLE OutHandle, OUT PHANDLE OutKey);
38PVOID AllocEventData(IN ULONG ExtraSize);
39VOID FreeEventData(IN PVOID EventData);
40
42{
43 sizeof(MIXER_CONTEXT),
44 NULL,
45 Alloc,
46 Control,
47 Free,
48 Open,
49 Close,
50 Copy,
51 OpenKey,
56};
57
59
66 OUT PULONG KeyType)
67{
70
72 if (*ResultBuffer == NULL)
74
76 {
79 }
80 return MM_STATUS_SUCCESS;
81}
82
86 IN LPWSTR SubKey,
88 OUT PHANDLE OutKey)
89{
90 if (RegOpenKeyExW((HKEY)hKey, SubKey, 0, DesiredAccess, (PHKEY)OutKey) == ERROR_SUCCESS)
91 return MM_STATUS_SUCCESS;
92
94}
95
99{
101 return MM_STATUS_SUCCESS;
102}
103
104
106{
107 return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, NumBytes);
108}
109
111Close(HANDLE hDevice)
112{
113 if (CloseHandle(hDevice))
114 return MM_STATUS_SUCCESS;
115 else
117}
118
119VOID
121{
122 HeapFree(GetProcessHeap(), 0, Block);
123}
124
125VOID
126Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
127{
128 RtlMoveMemory(Src, Dst, NumBytes);
129}
130
133 IN LPWSTR DevicePath,
134 OUT PHANDLE hDevice)
135{
136 DevicePath[1] = L'\\';
137 *hDevice = CreateFileW(DevicePath,
139 0,
140 NULL,
143 NULL);
144 if (*hDevice == INVALID_HANDLE_VALUE)
145 {
147 }
148
149 return MM_STATUS_SUCCESS;
150}
151
156 IN PVOID lpInBuffer,
157 IN ULONG nInBufferSize,
158 OUT PVOID lpOutBuffer,
159 ULONG nOutBufferSize,
161{
162 OVERLAPPED Overlapped;
163 BOOLEAN IoResult;
164 DWORD Transferred = 0;
165
166 /* Overlapped I/O is done here - this is used for waiting for completion */
167 ZeroMemory(&Overlapped, sizeof(OVERLAPPED));
168 Overlapped.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
169
170 if ( ! Overlapped.hEvent )
171 return MM_STATUS_NO_MEMORY;
172
173 /* Talk to the device */
174 IoResult = DeviceIoControl(hMixer,
176 lpInBuffer,
177 nInBufferSize,
178 lpOutBuffer,
179 nOutBufferSize,
180 &Transferred,
181 &Overlapped);
182
183 /* If failure occurs, make sure it's not just due to the overlapped I/O */
184 if ( ! IoResult )
185 {
187 {
188 CloseHandle(Overlapped.hEvent);
189
191 {
192 if ( lpBytesReturned )
193 *lpBytesReturned = Transferred;
195 }
196
198 }
199 }
200
201 /* Wait for the I/O to complete */
202 IoResult = GetOverlappedResult(hMixer,
203 &Overlapped,
204 &Transferred,
205 TRUE);
206
207 /* Don't need this any more */
208 CloseHandle(Overlapped.hEvent);
209
210 if ( ! IoResult )
212
213 if ( lpBytesReturned )
214 *lpBytesReturned = Transferred;
215
216 return MM_STATUS_SUCCESS;
217}
218
221 IN PVOID EnumContext,
222 IN ULONG DeviceIndex,
224 OUT PHANDLE OutHandle,
225 OUT PHANDLE OutKey)
226{
227 SP_DEVICE_INTERFACE_DATA InterfaceData;
230 BOOL Result;
233
234 //printf("Enum EnumContext %p DeviceIndex %lu OutHandle %p\n", EnumContext, DeviceIndex, OutHandle);
235
236 InterfaceData.cbSize = sizeof(InterfaceData);
237 InterfaceData.Reserved = 0;
238
240 NULL,
242 DeviceIndex,
243 &InterfaceData);
244
245 if (!Result)
246 {
248 {
250 }
252 }
253
256 0,
257 Length);
258 DetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W);
259 DeviceData.cbSize = sizeof(DeviceData);
260 DeviceData.Reserved = 0;
261
263 &InterfaceData,
264 DetailData,
265 Length,
266 NULL,
267 &DeviceData);
268
269 if (!Result)
270 {
271 DPRINT("SetupDiGetDeviceInterfaceDetailW failed with %lu\n", GetLastError());
273 }
274
275
276 *OutKey = SetupDiOpenDeviceInterfaceRegKey(EnumContext, &InterfaceData, 0, KEY_READ);
277 if ((HKEY)*OutKey == INVALID_HANDLE_VALUE)
278 {
279 HeapFree(GetProcessHeap(), 0, DetailData);
281 }
282
283 Status = Open(DetailData->DevicePath, OutHandle);
284
286 {
287 RegCloseKey((HKEY)*OutKey);
288 HeapFree(GetProcessHeap(), 0, DetailData);
289 return Status;
290 }
291
292 *DeviceName = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(DetailData->DevicePath)+1) * sizeof(WCHAR));
293 if (*DeviceName == NULL)
294 {
295 CloseHandle(*OutHandle);
296 RegCloseKey((HKEY)*OutKey);
297 HeapFree(GetProcessHeap(), 0, DetailData);
298 return MM_STATUS_NO_MEMORY;
299 }
300 wcscpy(*DeviceName, DetailData->DevicePath);
301 HeapFree(GetProcessHeap(), 0, DetailData);
302
303 return Status;
304}
305
306PVOID
308 IN ULONG ExtraSize)
309{
311 if (!Data)
312 return NULL;
313
314 Data->EventHandle.Event = CreateEventW(NULL, FALSE, FALSE, NULL);
315 if (!Data->EventHandle.Event)
316 {
318 return NULL;
319 }
320
321 Data->NotificationType = KSEVENTF_EVENT_HANDLE;
322 return Data;
323}
324
325VOID
327{
328 PKSEVENTDATA Data = (PKSEVENTDATA)EventData;
329
330 CloseHandle(Data->EventHandle.Event);
332}
333
334
335BOOL
337{
340
342 {
343 /* library is already initialized */
344 return TRUE;
345 }
346
347
348 /* create a device list */
350 NULL,
351 NULL,
352 DIGCF_DEVICEINTERFACE/* FIXME |DIGCF_PRESENT*/);
353
355 {
356 /* failed to create a device list */
357 return FALSE;
358 }
359
360
361 /* initialize the mixer library */
363
364 /* free device list */
366
368 {
369 /* failed to initialize mixer library */
370 DPRINT1("Failed to initialize mixer library with %x\n", Status);
371 return FALSE;
372 }
373
374 /* library is now initialized */
376
377 /* completed successfully */
378 return TRUE;
379}
380
383{
384 /* TODO */
385 return MMSYSERR_NOERROR;
386}
387
390 IN ULONG DeviceId,
392{
394 return MMSYSERR_NOERROR;
395
397}
398
402 IN DWORD MixerId,
403 IN LPMIXERLINEW MixLine,
404 IN ULONG Flags)
405{
406 if (MMixerGetLineInfo(&MixerContext, hMixer, MixerId, Flags, MixLine) == MM_STATUS_SUCCESS)
407 return MMSYSERR_NOERROR;
408
409 return MMSYSERR_ERROR;
410}
411
415 IN DWORD MixerId,
416 IN LPMIXERLINECONTROLSW MixControls,
417 IN ULONG Flags)
418{
419 if (MMixerGetLineControls(&MixerContext, hMixer, MixerId, Flags, MixControls) == MM_STATUS_SUCCESS)
420 return MMSYSERR_NOERROR;
421
422 return MMSYSERR_ERROR;
423}
424
428 IN DWORD MixerId,
429 IN LPMIXERCONTROLDETAILS MixDetails,
430 IN ULONG Flags)
431{
432 if (MMixerSetControlDetails(&MixerContext, hMixer, MixerId, Flags, MixDetails) == MM_STATUS_SUCCESS)
433 return MMSYSERR_NOERROR;
434
435 return MMSYSERR_ERROR;
436
437}
438
442 IN DWORD MixerId,
443 IN LPMIXERCONTROLDETAILS MixDetails,
444 IN ULONG Flags)
445{
446 if (MMixerGetControlDetails(&MixerContext, hMixer, MixerId, Flags, MixDetails) == MM_STATUS_SUCCESS)
447 return MMSYSERR_NOERROR;
448
449 return MMSYSERR_ERROR;
450}
451
454 IN ULONG DeviceId,
456{
458 return MMSYSERR_NOERROR;
459
460 return MMSYSERR_ERROR;
461
462}
463
466 IN ULONG DeviceId,
468{
470 return MMSYSERR_NOERROR;
471
472 return MMSYSERR_ERROR;
473}
474
478 IN DWORD DeviceId,
479 IN PWAVEFORMATEX WaveFormat,
480 IN DWORD WaveFormatSize)
481{
483 PSOUND_DEVICE SoundDevice;
485 BOOL bWaveIn;
486
488
489 if ( ! MMSUCCESS(Result) )
490 {
492 }
493
494 Result = GetSoundDeviceType(SoundDevice, &DeviceType);
496
497 bWaveIn = (DeviceType == WAVE_IN_DEVICE_TYPE ? TRUE : FALSE);
498
499 if (MMixerOpenWave(&MixerContext, DeviceId, bWaveIn, WaveFormat, NULL, NULL, &Instance->Handle) == MM_STATUS_SUCCESS)
500 {
502 {
506 }
507 return MMSYSERR_NOERROR;
508 }
509 return MMSYSERR_ERROR;
510}
511
512
515 IN PSOUND_DEVICE SoundDevice,
516 IN DWORD DeviceId,
518 IN DWORD CapabilitiesSize)
519{
522
523 Result = GetSoundDeviceType(SoundDevice, &DeviceType);
525
527 {
529 }
531 {
533 }
535 {
537 }
538 else
539 {
540 // not supported
541 return MMSYSERR_ERROR;
542 }
543}
544
547 IN struct _SOUND_DEVICE* SoundDevice,
549{
551 return MMSYSERR_NOERROR;
552 else
553 return MMSYSERR_ERROR;
554}
555
558 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
560{
562 PSOUND_DEVICE SoundDevice;
564
565 Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice);
566
567 if ( ! MMSUCCESS(Result) )
568 {
570 }
571
572 Result = GetSoundDeviceType(SoundDevice, &DeviceType);
574
576 {
577 /* no op */
578 return MMSYSERR_NOERROR;
579 }
581 {
582 /* make sure the pin is stopped */
583 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_PAUSE);
584 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_ACQUIRE);
585 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_STOP);
586
588 return MMSYSERR_NOERROR;
589 }
590
591 /* midi is not supported */
592 return MMSYSERR_ERROR;
593}
594
599{
600 switch(DeviceType)
601 {
604 break;
607 break;
610 break;
611 default:
612 *DeviceCount = 0;
613 }
614 return MMSYSERR_NOERROR;
615}
616
619 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
620 IN DWORD MixerId,
621 IN UINT uMsg,
623 IN DWORD Flags)
624{
625 LPMIXERLINEW MixLine;
626 LPMIXERLINECONTROLSW MixControls;
627 LPMIXERCONTROLDETAILS MixDetails;
629
630 MixLine = (LPMIXERLINEW)Parameter;
631 MixControls = (LPMIXERLINECONTROLSW)Parameter;
632 MixDetails = (LPMIXERCONTROLDETAILS)Parameter;
633
634 /* FIXME param checks */
635
636 if (SoundDeviceInstance)
637 {
638 hMixer = SoundDeviceInstance->Handle;
639 }
640
641 switch(uMsg)
642 {
643 case MXDM_GETLINEINFO:
644 return WdmAudGetLineInfo(hMixer, MixerId, MixLine, Flags);
646 return WdmAudGetLineControls(hMixer, MixerId, MixControls, Flags);
648 return WdmAudSetControlDetails(hMixer, MixerId, MixDetails, Flags);
650 return WdmAudGetControlDetails(hMixer, MixerId, MixDetails, Flags);
651 default:
652 DPRINT1("MixerId %lu, uMsg %lu, Parameter %p, Flags %lu\n", MixerId, uMsg, Parameter, Flags);
653 SND_ASSERT(0);
655 }
656}
657
661 IN DWORD DeviceId,
663 IN DWORD InterfaceLength,
664 OUT DWORD * InterfaceSize)
665{
666 /* FIXME */
668}
669
670VOID
673 IN PVOID MixerEventContext,
676 IN ULONG Value)
677{
679
680 DriverCallback(Instance->WinMM.ClientCallback,
681 HIWORD(Instance->WinMM.Flags),
682 Instance->WinMM.Handle,
684 Instance->WinMM.ClientCallbackInstanceData,
686 0);
687}
688
692 IN DWORD DeviceId,
693 IN PWAVEFORMATEX WaveFormat,
694 IN DWORD WaveFormatSize)
695{
697 return MMSYSERR_NOERROR;
698
700}
701
704 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
705 IN BOOL bStart)
706{
708 PSOUND_DEVICE SoundDevice;
710
711 Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice);
713
714
715 Result = GetSoundDeviceType(SoundDevice, &DeviceType);
717
719 {
720 if (bStart)
721 {
722 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_ACQUIRE);
723 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_PAUSE);
724 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_RUN);
725 }
726 else
727 {
728 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_PAUSE);
729 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_ACQUIRE);
730 MMixerSetWaveStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_STOP);
731 }
732 }
734 {
735 if (bStart)
736 {
737 MMixerSetMidiStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_ACQUIRE);
738 MMixerSetMidiStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_PAUSE);
739 MMixerSetMidiStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_RUN);
740 }
741 else
742 {
743 MMixerSetMidiStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_PAUSE);
744 MMixerSetMidiStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_ACQUIRE);
745 MMixerSetMidiStatus(&MixerContext, SoundDeviceInstance->Handle, KSSTATE_STOP);
746 }
747 }
748
749 return MMSYSERR_NOERROR;
750}
751
754 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
756 IN BOOLEAN bStartReset)
757{
759
761 {
762 Status = MMixerSetWaveResetState(&MixerContext, SoundDeviceInstance->Handle, bStartReset);
764 {
765 /* completed successfully */
766 return MMSYSERR_NOERROR;
767 }
768 }
769
770
772}
773
776 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
777 IN MMTIME* Time)
778{
779 PSOUND_DEVICE SoundDevice;
784
785 Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice);
786 if (!MMSUCCESS(Result))
788
789 Result = GetSoundDeviceType(SoundDevice, &DeviceType);
791
793 {
794 Status = MMixerGetWavePosition(&MixerContext, SoundDeviceInstance->Handle, &Position);
796 {
797 /* Store position */
798 Time->wType = TIME_BYTES;
799 Time->u.cb = Position;
800
801 /* Completed successfully */
802 return MMSYSERR_NOERROR;
803 }
804 }
806}
807
810 _In_ PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
811 _In_ DWORD DeviceId,
812 _Out_ PDWORD pdwVolume)
813{
815 MIXERLINE MixLine;
816 MIXERCONTROL MixControl;
817 MIXERLINECONTROLS MixLineControls;
818 MIXERCONTROLDETAILS MixControlDetails;
819 MIXERCONTROLDETAILS_UNSIGNED MixControlDetailsU[2]; // For 2 (stereo) channels
820
821 MixLine.cbStruct = sizeof(MixLine);
823
824 /* Get line info */
825 Result = WdmAudGetLineInfo(SoundDeviceInstance->Handle,
826 DeviceId,
827 &MixLine,
829 if (!MMSUCCESS(Result))
831
832 MixLineControls.cbStruct = sizeof(MixLineControls);
833 MixLineControls.dwLineID = MixLine.dwLineID;
835 MixLineControls.cControls = 1;
836 MixLineControls.cbmxctrl = sizeof(MixControl);
837 MixLineControls.pamxctrl = &MixControl;
838
839 /* Get line controls */
840 Result = WdmAudGetLineControls(SoundDeviceInstance->Handle,
841 DeviceId,
842 &MixLineControls,
844 if (!MMSUCCESS(Result))
846
847 MixControlDetails.cbStruct = sizeof(MixControlDetails);
848 MixControlDetails.dwControlID = MixControl.dwControlID;
849 MixControlDetails.cChannels = MixLine.cChannels;
850 MixControlDetails.cMultipleItems = 0;
851 MixControlDetails.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
852 MixControlDetails.paDetails = MixControlDetailsU;
853
854 /* Get volume control details */
855 Result = WdmAudGetControlDetails(SoundDeviceInstance->Handle,
856 DeviceId,
857 &MixControlDetails,
859 if (MMSUCCESS(Result))
860 *pdwVolume = MAKELONG(LOWORD(MixControlDetailsU[0].dwValue), HIWORD(MixControlDetailsU[1].dwValue));
861
862 return Result;
863}
864
867 _In_ PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
868 _In_ DWORD DeviceId,
869 _In_ DWORD dwVolume)
870{
872 MIXERLINE MixLine;
873 MIXERCONTROL MixControl;
874 MIXERLINECONTROLS MixLineControls;
875 MIXERCONTROLDETAILS MixControlDetails;
876 MIXERCONTROLDETAILS_UNSIGNED MixControlDetailsU[2]; // For 2 (stereo) channels
877
878 MixLine.cbStruct = sizeof(MixLine);
880
881 /* Get line info */
882 Result = WdmAudGetLineInfo(SoundDeviceInstance->Handle,
883 DeviceId,
884 &MixLine,
886 if (!MMSUCCESS(Result))
888
889 MixLineControls.cbStruct = sizeof(MixLineControls);
890 MixLineControls.dwLineID = MixLine.dwLineID;
892 MixLineControls.cControls = 1;
893 MixLineControls.cbmxctrl = sizeof(MixControl);
894 MixLineControls.pamxctrl = &MixControl;
895
896 /* Get line controls */
897 Result = WdmAudGetLineControls(SoundDeviceInstance->Handle,
898 DeviceId,
899 &MixLineControls,
901 if (!MMSUCCESS(Result))
903
904 /* Convert volume level to be set */
905 MixControlDetailsU[0].dwValue = LOWORD(dwVolume); // Left channel
906 MixControlDetailsU[1].dwValue = HIWORD(dwVolume); // Right channel
907
908 MixControlDetails.cbStruct = sizeof(MixControlDetails);
909 MixControlDetails.dwControlID = MixControl.dwControlID;
910 MixControlDetails.cChannels = MixLine.cChannels;
911 MixControlDetails.cMultipleItems = 0;
912 MixControlDetails.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
913 MixControlDetails.paDetails = MixControlDetailsU;
914
915 /* Set volume control details */
916 Result = WdmAudSetControlDetails(SoundDeviceInstance->Handle,
917 DeviceId,
918 &MixControlDetails,
920 return Result;
921}
922
923static
928{
929 DWORD dwErrorCode;
930 PSOUND_OVERLAPPED Overlap;
932
935 lpHeader = Overlap->CompletionContext;
936
937 /* Call mmebuddy overlap routine */
938 Overlap->OriginalCompletionRoutine(dwErrorCode,
939 lpHeader->DataUsed, &Overlap->Standard);
940
942}
943
946 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
947 IN PVOID OffsetPtr,
949 IN PSOUND_OVERLAPPED Overlap,
951{
952 PSOUND_DEVICE SoundDevice;
955 ULONG IoCtl;
958
959 Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice);
960
961 if ( ! MMSUCCESS(Result) )
962 {
964 }
965
966 Result = GetSoundDeviceType(SoundDevice, &DeviceType);
968
970 if ( ! lpHeader )
971 {
972 /* no memory */
973 return MMSYSERR_NOMEM;
974 }
975
976 /* setup stream packet */
977 lpHeader->Size = sizeof(KSSTREAM_HEADER);
978 lpHeader->PresentationTime.Numerator = 1;
979 lpHeader->PresentationTime.Denominator = 1;
980 lpHeader->Data = OffsetPtr;
981 lpHeader->FrameExtent = Length;
982 Overlap->CompletionContext = lpHeader;
983 Overlap->OriginalCompletionRoutine = CompletionRoutine;
985
987 {
988 lpHeader->DataUsed = Length;
989 }
990
991 Status = NtDeviceIoControlFile(SoundDeviceInstance->Handle,
992 NULL,
994 NULL,
995 (PIO_STATUS_BLOCK)Overlap,
996 IoCtl,
997 NULL,
998 0,
999 lpHeader,
1000 sizeof(KSSTREAM_HEADER));
1001
1002 if (!NT_SUCCESS(Status))
1003 {
1004 DPRINT1("NtDeviceIoControlFile() failed with status %08lx\n", Status);
1005 return MMSYSERR_ERROR;
1006 }
1007
1008 return MMSYSERR_NOERROR;
1009}
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define RegCloseKey(hKey)
Definition: registry.h:49
TCHAR lpHeader[80]
Definition: ctm.c:66
#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 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
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define CloseHandle
Definition: compat.h:739
#define GetProcessHeap()
Definition: compat.h:736
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define HeapAlloc
Definition: compat.h:733
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
#define GENERIC_READ
Definition: compat.h:135
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CreateFileW
Definition: compat.h:741
#define CALLBACK
Definition: compat.h:35
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define MXDM_GETCONTROLDETAILS
Definition: mmddk.h:197
#define MXDM_GETLINECONTROLS
Definition: mmddk.h:196
#define MXDM_SETCONTROLDETAILS
Definition: mmddk.h:198
#define MXDM_GETLINEINFO
Definition: mmddk.h:195
BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev, UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, CONST GUID *InterfaceClassGuid, DWORD MemberIndex, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
Definition: devinst.c:2780
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
HKEY WINAPI SetupDiOpenDeviceInterfaceRegKey(IN HDEVINFO DeviceInfoSet, IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData, IN DWORD Reserved, IN REGSAM samDesired)
Definition: interface.c:547
MMRESULT WdmAudGetLineControls(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERLINECONTROLSW MixControls, IN ULONG Flags)
Definition: mmixer.c:413
MMRESULT WdmAudGetControlDetails(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERCONTROLDETAILS MixDetails, IN ULONG Flags)
Definition: mmixer.c:440
MMRESULT WdmAudGetVolumeByMMixer(_In_ PSOUND_DEVICE_INSTANCE SoundDeviceInstance, _In_ DWORD DeviceId, _Out_ PDWORD pdwVolume)
Definition: mmixer.c:809
MMRESULT WdmAudSetMixerDeviceFormatByMMixer(IN PSOUND_DEVICE_INSTANCE Instance, IN DWORD DeviceId, IN PWAVEFORMATEX WaveFormat, IN DWORD WaveFormatSize)
Definition: mmixer.c:690
VOID FreeEventData(IN PVOID EventData)
Definition: mmixer.c:326
MMRESULT WdmAudGetDeviceInterfaceStringByMMixer(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN LPWSTR Interface, IN DWORD InterfaceLength, OUT DWORD *InterfaceSize)
Definition: mmixer.c:659
MMRESULT WdmAudGetCapabilitiesByMMixer(IN PSOUND_DEVICE SoundDevice, IN DWORD DeviceId, OUT PVOID Capabilities, IN DWORD CapabilitiesSize)
Definition: mmixer.c:514
MMRESULT WdmAudQueryMixerInfoByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN DWORD MixerId, IN UINT uMsg, IN LPVOID Parameter, IN DWORD Flags)
Definition: mmixer.c:618
MIXER_STATUS Enum(IN PVOID EnumContext, IN ULONG DeviceIndex, OUT LPWSTR *DeviceName, OUT PHANDLE OutHandle, OUT PHANDLE OutKey)
Definition: mmixer.c:220
MMRESULT WdmAudGetLineInfo(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERLINEW MixLine, IN ULONG Flags)
Definition: mmixer.c:400
MMRESULT WdmAudCloseSoundDeviceByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN PVOID Handle)
Definition: mmixer.c:557
MMRESULT WdmAudGetWaveInCapabilities(IN ULONG DeviceId, LPWAVEINCAPSW Capabilities)
Definition: mmixer.c:465
MMRESULT WdmAudSetVolumeByMMixer(_In_ PSOUND_DEVICE_INSTANCE SoundDeviceInstance, _In_ DWORD DeviceId, _In_ DWORD dwVolume)
Definition: mmixer.c:866
MMRESULT WdmAudSetControlDetails(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERCONTROLDETAILS MixDetails, IN ULONG Flags)
Definition: mmixer.c:426
GUID CategoryGuid
Definition: mmixer.c:58
MMRESULT WdmAudGetWavePositionByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN MMTIME *Time)
Definition: mmixer.c:775
MMRESULT WdmAudGetMixerCapabilities(IN ULONG DeviceId, LPMIXERCAPSW Capabilities)
Definition: mmixer.c:389
MMRESULT WdmAudCommitWaveBufferByMMixer(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PVOID OffsetPtr, IN DWORD Length, IN PSOUND_OVERLAPPED Overlap, IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine)
Definition: mmixer.c:945
PVOID AllocEventData(IN ULONG ExtraSize)
Definition: mmixer.c:307
MMRESULT WdmAudOpenSoundDeviceByMMixer(IN struct _SOUND_DEVICE *SoundDevice, OUT PVOID *Handle)
Definition: mmixer.c:546
VOID CALLBACK MixerEventCallback(IN PVOID MixerEventContext, IN HANDLE hMixer, IN ULONG NotificationType, IN ULONG Value)
Definition: mmixer.c:672
static VOID WINAPI CommitWaveBufferApc(PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved)
Definition: mmixer.c:925
MIXER_STATUS OpenKey(IN HANDLE hKey, IN LPWSTR SubKey, IN ULONG DesiredAccess, OUT PHANDLE OutKey)
Definition: mmixer.c:84
MMRESULT WdmAudGetWaveOutCapabilities(IN ULONG DeviceId, LPWAVEOUTCAPSW Capabilities)
Definition: mmixer.c:453
PVOID Alloc(ULONG NumBytes)
Definition: mmixer.c:105
MMRESULT WdmAudGetNumWdmDevsByMMixer(IN MMDEVICE_TYPE DeviceType, OUT DWORD *DeviceCount)
Definition: mmixer.c:596
MMRESULT WdmAudCleanupByMMixer()
Definition: mmixer.c:382
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
Definition: mmixer.c:126
BOOL WdmAudInitUserModeMixer()
Definition: mmixer.c:336
MIXER_STATUS CloseKey(IN HANDLE hKey)
Definition: mmixer.c:97
BOOL MMixerLibraryInitialized
Definition: mmixer.c:24
MMRESULT WdmAudSetWaveStateByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN BOOL bStart)
Definition: mmixer.c:703
MIXER_CONTEXT MixerContext
Definition: mmixer.c:41
MMRESULT WdmAudResetStreamByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN MMDEVICE_TYPE DeviceType, IN BOOLEAN bStartReset)
Definition: mmixer.c:753
MIXER_STATUS QueryKeyValue(IN HANDLE hKey, IN LPWSTR KeyName, OUT PVOID *ResultBuffer, OUT PULONG ResultLength, OUT PULONG KeyType)
Definition: mmixer.c:61
MMRESULT WdmAudSetWaveDeviceFormatByMMixer(IN PSOUND_DEVICE_INSTANCE Instance, IN DWORD DeviceId, IN PWAVEFORMATEX WaveFormat, IN DWORD WaveFormatSize)
Definition: mmixer.c:476
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
ULONG Handle
Definition: gdb_input.c:15
Status
Definition: gdiplustypes.h:25
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
Definition: hubbusif.h:121
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
Definition: iocompl.c:221
PKMT_RESULTBUFFER ResultBuffer
@ KSSTATE_ACQUIRE
Definition: ks.h:1216
@ KSSTATE_PAUSE
Definition: ks.h:1217
@ KSSTATE_RUN
Definition: ks.h:1218
@ KSSTATE_STOP
Definition: ks.h:1215
struct KSEVENTDATA * PKSEVENTDATA
#define KSEVENTF_EVENT_HANDLE
Definition: ks.h:1778
#define IOCTL_KS_READ_STREAM
Definition: ks.h:142
#define IOCTL_KS_WRITE_STREAM
Definition: ks.h:139
#define STATIC_KSCATEGORY_AUDIO
Definition: ksmedia.h:169
#define Open
Definition: syshdrs.h:62
#define Dst
Definition: mesh.h:153
DeviceType
Definition: mmdrv.h:42
struct _SOUND_DEVICE_INSTANCE * PSOUND_DEVICE_INSTANCE
struct _SOUND_OVERLAPPED * PSOUND_OVERLAPPED
UCHAR MMDEVICE_TYPE
Definition: mmebuddy.h:88
MMRESULT GetSoundDeviceFromInstance(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, OUT PSOUND_DEVICE *SoundDevice)
MMRESULT TranslateInternalMmResult(IN MMRESULT Result)
Definition: utility.c:132
MMRESULT GetSoundDeviceType(IN PSOUND_DEVICE SoundDevice, OUT PMMDEVICE_TYPE DeviceType)
Definition: devicelist.c:346
#define MMSUCCESS(result)
Definition: mmebuddy.h:80
#define SND_ASSERT(condition)
MIXER_STATUS MMixerSetWaveStatus(IN PMIXER_CONTEXT MixerContext, IN HANDLE PinHandle, IN KSSTATE State)
Definition: wave.c:652
ULONG MMixerGetWaveInCount(IN PMIXER_CONTEXT MixerContext)
Definition: wave.c:574
MIXER_STATUS MMixerWaveOutCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPWAVEOUTCAPSW Caps)
Definition: wave.c:538
MIXER_STATUS MMixerOpenWave(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, IN ULONG bWaveIn, IN LPWAVEFORMATEX WaveFormat, IN PIN_CREATE_CALLBACK CreateCallback, IN PVOID Context, OUT PHANDLE PinHandle)
Definition: wave.c:453
MIXER_STATUS MMixerWaveInCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPWAVEINCAPSW Caps)
Definition: wave.c:502
MIXER_STATUS
Definition: mmixer.h:4
@ MM_STATUS_UNSUCCESSFUL
Definition: mmixer.h:11
@ MM_STATUS_NO_MEMORY
Definition: mmixer.h:12
@ MM_STATUS_SUCCESS
Definition: mmixer.h:5
@ MM_STATUS_NO_MORE_DEVICES
Definition: mmixer.h:8
@ MM_STATUS_MORE_ENTRIES
Definition: mmixer.h:9
MIXER_STATUS MMixerSetWaveResetState(IN PMIXER_CONTEXT MixerContext, IN HANDLE PinHandle, IN ULONG bBegin)
Definition: wave.c:679
ULONG MMixerGetWaveOutCount(IN PMIXER_CONTEXT MixerContext)
Definition: wave.c:596
MIXER_STATUS MMixerGetWavePosition(_In_ PMIXER_CONTEXT MixerContext, _In_ HANDLE PinHandle, _Out_ PDWORD Position)
Definition: wave.c:618
#define TIME_BYTES
Definition: mmsystem.h:30
#define MMSYSERR_NOMEM
Definition: mmsystem.h:103
#define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS
Definition: mmsystem.h:319
#define MIXER_OBJECTF_MIXER
Definition: mmsystem.h:300
struct tagMIXERLINECONTROLSW * LPMIXERLINECONTROLSW
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define MIXERCONTROL_CONTROLTYPE_VOLUME
Definition: mmsystem.h:398
#define MIXER_GETLINEINFOF_COMPONENTTYPE
Definition: mmsystem.h:347
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
struct tagMIXERLINEW * LPMIXERLINEW
struct tMIXERCONTROLDETAILS_UNSIGNED MIXERCONTROLDETAILS_UNSIGNED
struct tMIXERCONTROLDETAILS * LPMIXERCONTROLDETAILS
#define MIXER_GETLINECONTROLSF_ONEBYTYPE
Definition: mmsystem.h:410
#define MMSYSERR_BADDEVICEID
Definition: mmsystem.h:98
#define FILE_FLAG_OVERLAPPED
Definition: disk.h:46
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
HMIXER hMixer
Definition: test.c:10
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
static PLARGE_INTEGER Time
Definition: time.c:105
ULONG DeviceCount
Definition: mpu401.c:26
unsigned int UINT
Definition: ndis.h:50
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID ApcContext
Definition: iofuncs.h:727
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define KEY_READ
Definition: nt_native.h:1023
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
#define GENERIC_WRITE
Definition: nt_native.h:90
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
DWORD * PDWORD
Definition: pedump.c:68
@ Close
Definition: sacdrv.h:268
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
MIXER_STATUS MMixerSetMidiStatus(IN PMIXER_CONTEXT MixerContext, IN HANDLE PinHandle, IN KSSTATE State)
Definition: midi.c:437
MIXER_STATUS MMixerGetControlDetails(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERCONTROLDETAILS MixerControlDetails)
Definition: mixer.c:565
MIXER_STATUS MMixerOpen(IN PMIXER_CONTEXT MixerContext, IN ULONG MixerId, IN PVOID MixerEventContext, IN PMIXER_EVENT MixerEventRoutine, OUT PHANDLE MixerHandle)
Definition: mixer.c:77
MIXER_STATUS MMixerGetLineControls(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERLINECONTROLSW MixerLineControls)
Definition: mixer.c:331
MIXER_STATUS MMixerSetControlDetails(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERCONTROLDETAILS MixerControlDetails)
Definition: mixer.c:495
MIXER_STATUS MMixerGetCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG MixerIndex, OUT LPMIXERCAPSW MixerCaps)
Definition: mixer.c:38
ULONG MMixerGetCount(IN PMIXER_CONTEXT MixerContext)
Definition: mixer.c:15
MIXER_STATUS MMixerGetLineInfo(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERLINEW MixerLine)
Definition: mixer.c:148
MIXER_STATUS MMixerInitialize(IN PMIXER_CONTEXT MixerContext, IN PMIXER_ENUM EnumFunction, IN PVOID EnumContext)
Definition: mixer.c:768
#define DIGCF_DEVICEINTERFACE
Definition: setupapi.h:174
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_DEVICE_INTERFACE_DETAIL_DATA_W
#define SetupDiGetClassDevs
Definition: setupapi.h:2593
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W * PSP_DEVICE_INTERFACE_DETAIL_DATA_W
@ MIXER_DEVICE_TYPE
Definition: sndtypes.h:33
@ MIDI_OUT_DEVICE_TYPE
Definition: sndtypes.h:31
@ WAVE_IN_DEVICE_TYPE
Definition: sndtypes.h:28
@ WAVE_OUT_DEVICE_TYPE
Definition: sndtypes.h:29
@ MIDI_IN_DEVICE_TYPE
Definition: sndtypes.h:30
#define DPRINT
Definition: sndvol32.h:73
HANDLE hEvent
Definition: winbase.h:845
OVERLAPPED Standard
Definition: mmebuddy.h:120
PVOID CompletionContext
Definition: mmebuddy.h:125
LPOVERLAPPED_COMPLETION_ROUTINE OriginalCompletionRoutine
Definition: mmebuddy.h:124
WCHAR DevicePath[ANYSIZE_ARRAY]
Definition: setupapi.h:855
DWORD dwComponentType
Definition: mmsystem.h:1238
DWORD dwLineID
Definition: mmsystem.h:1235
DWORD cbStruct
Definition: mmsystem.h:1232
DWORD cChannels
Definition: mmsystem.h:1239
LPMIXERCONTROLA pamxctrl
Definition: mmsystem.h:1338
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
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define OUT
Definition: typedefs.h:40
struct _LARGE_INTEGER::@2304 u
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:895
_In_ WDF_WMI_PROVIDER_CONTROL Control
Definition: wdfwmi.h:166
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481
#define ZeroMemory
Definition: winbase.h:1737
void(CALLBACK * LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD, DWORD, LPOVERLAPPED)
Definition: winbase.h:1476
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define CreateEvent
Definition: winbase.h:3773
_In_ DWORD _In_ DWORD _In_ DWORD _Out_ LPDWORD lpBytesReturned
Definition: winddi.h:1705
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_In_ DWORD dwIoControlCode
Definition: winddi.h:1700
#define WINAPI
Definition: msvc.h:6
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:336
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184