ReactOS 0.4.15-dev-8413-gc1c91f2
mmixer.c File Reference
#include "wdmaud.h"
#include <mmixer.h>
#include <debug.h>
Include dependency graph for mmixer.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

PVOID Alloc (ULONG NumBytes)
 
MIXER_STATUS Close (HANDLE hDevice)
 
VOID Free (PVOID Block)
 
VOID Copy (PVOID Src, PVOID Dst, ULONG NumBytes)
 
MIXER_STATUS Open (IN LPWSTR DevicePath, OUT PHANDLE hDevice)
 
MIXER_STATUS Control (IN HANDLE hMixer, IN ULONG dwIoControlCode, IN PVOID lpInBuffer, IN ULONG nInBufferSize, OUT PVOID lpOutBuffer, ULONG nOutBufferSize, PULONG lpBytesReturned)
 
MIXER_STATUS Enum (IN PVOID EnumContext, IN ULONG DeviceIndex, OUT LPWSTR *DeviceName, OUT PHANDLE OutHandle, OUT PHANDLE OutKey)
 
MIXER_STATUS OpenKey (IN HANDLE hKey, IN LPWSTR SubKey, IN ULONG DesiredAccess, OUT PHANDLE OutKey)
 
MIXER_STATUS CloseKey (IN HANDLE hKey)
 
MIXER_STATUS QueryKeyValue (IN HANDLE hKey, IN LPWSTR KeyName, OUT PVOID *ResultBuffer, OUT PULONG ResultLength, OUT PULONG KeyType)
 
PVOID AllocEventData (IN ULONG ExtraSize)
 
VOID FreeEventData (IN PVOID EventData)
 
VOID CALLBACK EventCallback (IN PVOID MixerEventContext, IN HANDLE hMixer, IN ULONG NotificationType, IN ULONG Value)
 
NTSTATUS WdmAudMixerInitialize (IN PDEVICE_OBJECT DeviceObject)
 
NTSTATUS WdmAudMixerCapabilities (IN PDEVICE_OBJECT DeviceObject, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo, IN PWDMAUD_DEVICE_EXTENSION DeviceExtension)
 
NTSTATUS WdmAudControlOpenMixer (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
 
NTSTATUS WdmAudControlCloseMixer (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo, IN ULONG Index)
 
VOID WdmAudCloseAllMixers (IN PDEVICE_OBJECT DeviceObject, IN PWDMAUD_CLIENT ClientInfo, IN ULONG Index)
 
NTSTATUS NTAPI WdmAudGetControlDetails (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
 
NTSTATUS NTAPI WdmAudGetLineInfo (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
 
NTSTATUS NTAPI WdmAudGetLineControls (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
 
NTSTATUS NTAPI WdmAudSetControlDetails (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
 
NTSTATUS NTAPI WdmAudGetMixerEvent (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
 
ULONG WdmAudGetMixerDeviceCount ()
 
ULONG WdmAudGetWaveInDeviceCount ()
 
ULONG WdmAudGetWaveOutDeviceCount ()
 
ULONG WdmAudGetMidiInDeviceCount ()
 
ULONG WdmAudGetMidiOutDeviceCount ()
 
NTSTATUS WdmAudGetPnpNameByIndexAndType (IN ULONG DeviceIndex, IN SOUND_DEVICE_TYPE DeviceType, OUT LPWSTR *DevicePath)
 
NTSTATUS WdmAudWaveCapabilities (IN PDEVICE_OBJECT DeviceObject, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo, IN PWDMAUD_DEVICE_EXTENSION DeviceExtension)
 
NTSTATUS WdmAudMidiCapabilities (IN PDEVICE_OBJECT DeviceObject, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo, IN PWDMAUD_DEVICE_EXTENSION DeviceExtension)
 
NTSTATUS NTAPI WdmAudGetPosition (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ PWDMAUD_DEVICE_INFO DeviceInfo)
 
MIXER_STATUS CreatePinCallback (IN PVOID Ctx, IN ULONG VirtualDeviceId, IN ULONG PinId, IN HANDLE hFilter, IN PKSPIN_CONNECT PinConnect, IN ACCESS_MASK DesiredAccess, OUT PHANDLE PinHandle)
 
NTSTATUS WdmAudControlOpenWave (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
 
NTSTATUS WdmAudControlOpenMidi (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
 

Variables

MIXER_CONTEXT MixerContext
 
GUID CategoryGuid = {STATIC_KSCATEGORY_AUDIO}
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file mmixer.c.

Function Documentation

◆ Alloc()

PVOID Alloc ( ULONG  NumBytes)

Definition at line 154 of file mmixer.c.

155{
156 return AllocateItem(NonPagedPool, NumBytes);
157}
#define NonPagedPool
Definition: env_spec_w32.h:307
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: misc.c:29

◆ AllocEventData()

PVOID AllocEventData ( IN ULONG  ExtraSize)

Definition at line 302 of file mmixer.c.

304{
306 if (!Data)
307 return NULL;
308
309 Data->EventObject.Event = AllocateItem(NonPagedPool, sizeof(KEVENT));
310 if (!Data->EventHandle.Event)
311 {
312 FreeItem(Data);
313 return NULL;
314 }
315
316 KeInitializeEvent(Data->EventObject.Event, NotificationEvent, FALSE);
317
318 Data->NotificationType = KSEVENTF_EVENT_HANDLE;
319 return Data;
320}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
struct KSEVENTDATA * PKSEVENTDATA
#define KSEVENTF_EVENT_HANDLE
Definition: ks.h:1778
VOID FreeItem(IN PVOID Item)
Definition: misc.c:37
@ NotificationEvent

◆ Close()

MIXER_STATUS Close ( HANDLE  hDevice)

Definition at line 160 of file mmixer.c.

161{
162 if (ZwClose(hDevice) == STATUS_SUCCESS)
163 return MM_STATUS_SUCCESS;
164 else
166}
@ MM_STATUS_UNSUCCESSFUL
Definition: mmixer.h:11
@ MM_STATUS_SUCCESS
Definition: mmixer.h:5
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ CloseKey()

MIXER_STATUS CloseKey ( IN HANDLE  hKey)

Definition at line 144 of file mmixer.c.

146{
148 return MM_STATUS_SUCCESS;
149 else
151}
FxAutoRegKey hKey

◆ Control()

MIXER_STATUS Control ( IN HANDLE  hMixer,
IN ULONG  dwIoControlCode,
IN PVOID  lpInBuffer,
IN ULONG  nInBufferSize,
OUT PVOID  lpOutBuffer,
ULONG  nOutBufferSize,
PULONG  lpBytesReturned 
)

Definition at line 192 of file mmixer.c.

200{
203
204 /* get file object */
206 if (!NT_SUCCESS(Status))
207 {
208 DPRINT("failed to reference %p with %lx\n", hMixer, Status);
210 }
211
212 /* perform request */
213 Status = KsSynchronousIoControlDevice(FileObject, KernelMode, dwIoControlCode, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpBytesReturned);
214
215 /* release object reference */
217
219 {
220 /* more data is available */
222 }
223 else if (Status == STATUS_SUCCESS)
224 {
225 /* operation succeeded */
226 return MM_STATUS_SUCCESS;
227 }
228 else
229 {
230 DPRINT("Failed with %lx\n", Status);
232 }
233}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define GENERIC_READ
Definition: compat.h:135
KSDDKAPI NTSTATUS NTAPI KsSynchronousIoControlDevice(IN PFILE_OBJECT FileObject, IN KPROCESSOR_MODE RequestorMode, IN ULONG IoControl, IN PVOID InBuffer, IN ULONG InSize, OUT PVOID OutBuffer, IN ULONG OutSize, OUT PULONG BytesReturned)
Definition: api.c:1099
Status
Definition: gdiplustypes.h:25
POBJECT_TYPE IoFileObjectType
Definition: iomgr.c:36
@ MM_STATUS_MORE_ENTRIES
Definition: mmixer.h:9
HMIXER hMixer
Definition: test.c:10
#define KernelMode
Definition: asm.h:34
#define GENERIC_WRITE
Definition: nt_native.h:90
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:494
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define DPRINT
Definition: sndvol32.h:73
#define STATUS_MORE_ENTRIES
Definition: udferr_usr.h:124
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_In_ DWORD _In_ DWORD _In_ DWORD _Out_ LPDWORD lpBytesReturned
Definition: winddi.h:1705
_In_ DWORD dwIoControlCode
Definition: winddi.h:1700
* PFILE_OBJECT
Definition: iotypes.h:1998
#define ObDereferenceObject
Definition: obfuncs.h:203

◆ Copy()

VOID Copy ( PVOID  Src,
PVOID  Dst,
ULONG  NumBytes 
)

Definition at line 175 of file mmixer.c.

176{
177 RtlMoveMemory(Src, Dst, NumBytes);
178}
#define Dst
Definition: mesh.h:153
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264

◆ CreatePinCallback()

MIXER_STATUS CreatePinCallback ( IN PVOID  Ctx,
IN ULONG  VirtualDeviceId,
IN ULONG  PinId,
IN HANDLE  hFilter,
IN PKSPIN_CONNECT  PinConnect,
IN ACCESS_MASK  DesiredAccess,
OUT PHANDLE  PinHandle 
)

Definition at line 796 of file mmixer.c.

804{
806 SYSAUDIO_INSTANCE_INFO InstanceInfo;
808 ULONG FreeIndex;
810
811 /* setup property request */
812 InstanceInfo.Property.Set = KSPROPSETID_Sysaudio;
814 InstanceInfo.Property.Flags = KSPROPERTY_TYPE_SET;
815 InstanceInfo.Flags = 0;
816 InstanceInfo.DeviceNumber = VirtualDeviceId;
817
818 /* attach to virtual device */
819 Status = KsSynchronousIoControlDevice(Context->DeviceExtension->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&InstanceInfo, sizeof(SYSAUDIO_INSTANCE_INFO), NULL, 0, &BytesReturned);
820
821 if (!NT_SUCCESS(Status))
823
824 /* close existing pin */
825 FreeIndex = ClosePin(Context->ClientInfo, VirtualDeviceId, PinId, Context->DeviceType);
826
827 /* now create the pin */
828 Status = KsCreatePin(Context->DeviceExtension->hSysAudio, PinConnect, DesiredAccess, PinHandle);
829
830 /* check for success */
831 if (!NT_SUCCESS(Status))
833
834 /* store the handle */
835 Status = InsertPinHandle(Context->ClientInfo, VirtualDeviceId, PinId, Context->DeviceType, *PinHandle, FreeIndex);
836 if (!NT_SUCCESS(Status))
837 {
838 /* failed to insert handle */
839 ZwClose(*PinHandle);
841 }
842
843 return MM_STATUS_SUCCESS;
844}
NTSTATUS InsertPinHandle(IN PWDMAUD_CLIENT ClientInfo, IN ULONG FilterId, IN ULONG PinId, IN SOUND_DEVICE_TYPE DeviceType, IN HANDLE PinHandle, IN ULONG FreeIndex)
Definition: sup.c:96
ULONG ClosePin(IN PWDMAUD_CLIENT ClientInfo, IN ULONG FilterId, IN ULONG PinId, IN SOUND_DEVICE_TYPE DeviceType)
Definition: sup.c:72
struct PIN_CREATE_CONTEXT * PPIN_CREATE_CONTEXT
#define KSPROPERTY_TYPE_SET
Definition: dmksctrl.h:43
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
@ KSPROPERTY_SYSAUDIO_INSTANCE_INFO
Definition: ksmedia.h:1175
#define KSPROPSETID_Sysaudio
Definition: ksmedia.h:1165
KSDDKAPI DWORD NTAPI KsCreatePin(HANDLE FilterHandle, PKSPIN_CONNECT Connect, ACCESS_MASK DesiredAccess, PHANDLE ConnectionHandle)
Definition: ksuser.c:192
ULONG Id
Definition: dmksctrl.h:77
ULONG Flags
Definition: dmksctrl.h:78
GUID Set
Definition: dmksctrl.h:76
KSPROPERTY Property
Definition: ksmedia.h:1180
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_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

Referenced by WdmAudControlOpenMidi(), and WdmAudControlOpenWave().

◆ Enum()

MIXER_STATUS Enum ( IN PVOID  EnumContext,
IN ULONG  DeviceIndex,
OUT LPWSTR DeviceName,
OUT PHANDLE  OutHandle,
OUT PHANDLE  OutKey 
)

Definition at line 236 of file mmixer.c.

242{
247
248 /* get enumeration context */
249 DeviceObject = (PDEVICE_OBJECT)EnumContext;
250
251 /* get device count */
253
254 if (DeviceIndex >= DeviceCount)
255 {
256 /* no more devices */
258 }
259
260 /* get device name */
262
263 if (!NT_SUCCESS(Status))
264 {
265 /* failed to retrieve device name */
267 }
268
269 /* initialize key name */
271
272 /* open device interface key */
274
275 if (!NT_SUCCESS(Status))
276 {
277 *OutKey = NULL;
278 }
279
280#if 0
281 if (!NT_SUCCESS(Status))
282 {
283 /* failed to open key */
284 DPRINT("IoOpenDeviceInterfaceRegistryKey failed with %lx\n", Status);
287 }
288#endif
289
290 /* open device handle */
291 Status = OpenDevice(*DeviceName, OutHandle, NULL);
292 if (!NT_SUCCESS(Status))
293 {
294 /* failed to open device */
296 }
297
298 return MM_STATUS_SUCCESS;
299}
MMRESULT OpenDevice(DeviceInfo **private_data, MIDIOPENDESC *open_desc, DWORD flags)
Definition: beepmidi.c:264
NTSTATUS GetSysAudioDevicePnpName(IN PDEVICE_OBJECT DeviceObject, IN ULONG DeviceIndex, OUT LPWSTR *Device)
Definition: sup.c:346
ULONG GetSysAudioDeviceCount(IN PDEVICE_OBJECT DeviceObject)
Definition: sup.c:35
struct _DEVICE_OBJECT * PDEVICE_OBJECT
@ MM_STATUS_NO_MORE_DEVICES
Definition: mmixer.h:8
ULONG DeviceCount
Definition: mpu401.c:26
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI IoOpenDeviceInterfaceRegistryKey(IN PUNICODE_STRING SymbolicLinkName, IN ACCESS_MASK DesiredAccess, OUT PHANDLE DeviceInterfaceKey)
Definition: deviface.c:241
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_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

◆ EventCallback()

VOID CALLBACK EventCallback ( IN PVOID  MixerEventContext,
IN HANDLE  hMixer,
IN ULONG  NotificationType,
IN ULONG  Value 
)

Definition at line 333 of file mmixer.c.

338{
341 ULONG Index;
342
343 /* get client context */
344 ClientInfo = (PWDMAUD_CLIENT)MixerEventContext;
345
346 /* now search for the mixer which originated the request */
347 for(Index = 0; Index < ClientInfo->NumPins; Index++)
348 {
349 if (ClientInfo->hPins[Index].Handle == hMixer && ClientInfo->hPins[Index].Type == MIXER_DEVICE_TYPE)
350 {
351 if (ClientInfo->hPins[Index].NotifyEvent)
352 {
353 /* allocate event entry */
355 if (!Entry)
356 {
357 /* no memory */
358 break;
359 }
360
361 /* setup event entry */
362 Entry->NotificationType = NotificationType;
363 Entry->Value = Value;
364 Entry->hMixer = hMixer;
365
366 /* insert entry */
367 InsertTailList(&ClientInfo->MixerEventList, &Entry->Entry);
368
369 /* now notify the client */
370 KeSetEvent(ClientInfo->hPins[Index].NotifyEvent, 0, FALSE);
371 }
372 /* done */
373 break;
374 }
375 }
376}
struct WDMAUD_CLIENT * PWDMAUD_CLIENT
#define InsertTailList(ListHead, Entry)
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
CLIENT_DATA ClientInfo
@ MIXER_DEVICE_TYPE
Definition: sndtypes.h:33
Definition: wdmaud.h:38
base of all file and directory entries
Definition: entries.h:83
Entry(ENTRY_TYPE etype)
Definition: entries.cpp:35
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

Referenced by WdmAudCloseAllMixers(), WdmAudControlCloseMixer(), and WdmAudControlOpenMixer().

◆ Free()

VOID Free ( PVOID  Block)

Definition at line 169 of file mmixer.c.

170{
171 FreeItem(Block);
172}

◆ FreeEventData()

VOID FreeEventData ( IN PVOID  EventData)

Definition at line 323 of file mmixer.c.

324{
325 PKSEVENTDATA Data = (PKSEVENTDATA)EventData;
326
327 FreeItem(Data->EventHandle.Event);
328 FreeItem(Data);
329}

◆ Open()

MIXER_STATUS Open ( IN LPWSTR  DevicePath,
OUT PHANDLE  hDevice 
)

Definition at line 181 of file mmixer.c.

184{
185 if (WdmAudOpenSysAudioDevice(DevicePath, hDevice) == STATUS_SUCCESS)
186 return MM_STATUS_SUCCESS;
187 else
189}
NTSTATUS WdmAudOpenSysAudioDevice(IN LPWSTR DeviceName, OUT PHANDLE Handle)
Definition: deviface.c:16

◆ OpenKey()

MIXER_STATUS OpenKey ( IN HANDLE  hKey,
IN LPWSTR  SubKey,
IN ULONG  DesiredAccess,
OUT PHANDLE  OutKey 
)

Definition at line 118 of file mmixer.c.

123{
127
128 /* initialize sub key name */
129 RtlInitUnicodeString(&SubKeyName, lpSubKeyName);
130
131 /* initialize key attributes */
133
134 /* open the key */
135 Status = ZwOpenKey(OutKey, DesiredAccess, &ObjectAttributes);
136
137 if (NT_SUCCESS(Status))
138 return MM_STATUS_SUCCESS;
139 else
141}
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define OBJ_OPENIF
Definition: winternl.h:229
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING SubKeyName
Definition: ndis.h:4725

◆ QueryKeyValue()

MIXER_STATUS QueryKeyValue ( IN HANDLE  hKey,
IN LPWSTR  KeyName,
OUT PVOID ResultBuffer,
OUT PULONG  ResultLength,
OUT PULONG  KeyType 
)

Definition at line 49 of file mmixer.c.

55{
59 PKEY_VALUE_PARTIAL_INFORMATION PartialInformation;
60
61 /* initialize key name */
62 RtlInitUnicodeString(&KeyName, lpKeyName);
63
64 /* now query MatchingDeviceId key */
65 Status = ZwQueryValueKey(hKey, &KeyName, KeyValuePartialInformation, NULL, 0, &Length);
66
67 /* check for success */
70
71 /* allocate a buffer for key data */
72 PartialInformation = AllocateItem(NonPagedPool, Length);
73
74 if (!PartialInformation)
76
77
78 /* now query MatchingDeviceId key */
79 Status = ZwQueryValueKey(hKey, &KeyName, KeyValuePartialInformation, PartialInformation, Length, &Length);
80
81 /* check for success */
82 if (!NT_SUCCESS(Status))
83 {
84 FreeItem(PartialInformation);
86 }
87
88 if (KeyType)
89 {
90 /* return key type */
91 *KeyType = PartialInformation->Type;
92 }
93
94 if (ResultLength)
95 {
96 /* return data length */
97 *ResultLength = PartialInformation->DataLength;
98 }
99
100 *ResultBuffer = AllocateItem(NonPagedPool, PartialInformation->DataLength);
101 if (!*ResultBuffer)
102 {
103 /* not enough memory */
104 FreeItem(PartialInformation);
105 return MM_STATUS_NO_MEMORY;
106 }
107
108 /* copy key value */
109 RtlMoveMemory(*ResultBuffer, PartialInformation->Data, PartialInformation->DataLength);
110
111 /* free key info */
112 FreeItem(PartialInformation);
113
114 return MM_STATUS_SUCCESS;
115}
PKMT_RESULTBUFFER ResultBuffer
@ MM_STATUS_NO_MEMORY
Definition: mmixer.h:12
@ KeyValuePartialInformation
Definition: nt_native.h:1182
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776

◆ WdmAudCloseAllMixers()

VOID WdmAudCloseAllMixers ( IN PDEVICE_OBJECT  DeviceObject,
IN PWDMAUD_CLIENT  ClientInfo,
IN ULONG  Index 
)

Definition at line 501 of file mmixer.c.

505{
506 ULONG DeviceCount, DeviceIndex;
507
508 /* Get all mixers */
510
511 /* Close every mixer attached to the device */
512 for (DeviceIndex = 0; DeviceIndex < DeviceCount; DeviceIndex++)
513 {
515 {
516 DPRINT1("Failed to close mixer for device %lu\n", DeviceIndex);
517 }
518 }
519
520 /* Dereference event */
521 if (ClientInfo->hPins[Index].NotifyEvent)
522 {
523 ObDereferenceObject(ClientInfo->hPins[Index].NotifyEvent);
524 ClientInfo->hPins[Index].NotifyEvent = NULL;
525 }
526}
#define DPRINT1
Definition: precomp.h:8
MIXER_CONTEXT MixerContext
Definition: mmixer.c:41
VOID CALLBACK EventCallback(IN PVOID MixerEventContext, IN HANDLE hMixer, IN ULONG NotificationType, IN ULONG Value)
Definition: mmixer.c:333
MIXER_STATUS MMixerClose(IN PMIXER_CONTEXT MixerContext, IN ULONG MixerId, IN PVOID MixerEventContext, IN PMIXER_EVENT MixerEventRoutine)
Definition: mixer.c:115

Referenced by WdmAudCleanup().

◆ WdmAudControlCloseMixer()

NTSTATUS WdmAudControlCloseMixer ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo,
IN ULONG  Index 
)

Definition at line 475 of file mmixer.c.

481{
482 /* Remove event associated to this client */
484 {
485 DPRINT1("Failed to close mixer\n");
487 }
488
489 /* Dereference event */
490 if (ClientInfo->hPins[Index].NotifyEvent)
491 {
492 ObDereferenceObject(ClientInfo->hPins[Index].NotifyEvent);
493 ClientInfo->hPins[Index].NotifyEvent = NULL;
494 }
495
496 /* FIXME: do we need to free ClientInfo->hPins ? */
498}
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS SetIrpIoStatus(IN PIRP Irp, IN NTSTATUS Status, IN ULONG Length)
Definition: sup.c:59
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132

Referenced by WdmAudIoctlClose().

◆ WdmAudControlOpenMidi()

NTSTATUS WdmAudControlOpenMidi ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo 
)

Definition at line 869 of file mmixer.c.

874{
877
878 Context.ClientInfo = ClientInfo;
879 Context.DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
880 Context.DeviceType = DeviceInfo->DeviceType;
881
883
886 else
888}
MIXER_STATUS CreatePinCallback(IN PVOID Ctx, IN ULONG VirtualDeviceId, IN ULONG PinId, IN HANDLE hFilter, IN PKSPIN_CONNECT PinConnect, IN ACCESS_MASK DesiredAccess, OUT PHANDLE PinHandle)
Definition: mmixer.c:796
struct WDMAUD_DEVICE_EXTENSION * PWDMAUD_DEVICE_EXTENSION
MIXER_STATUS
Definition: mmixer.h:4
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
MIXER_STATUS MMixerOpenMidi(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, IN ULONG bMidiIn, IN PIN_CREATE_CALLBACK CreateCallback, IN PVOID Context, OUT PHANDLE PinHandle)
Definition: midi.c:454
@ MIDI_IN_DEVICE_TYPE
Definition: sndtypes.h:30

Referenced by WdmAudControlOpen().

◆ WdmAudControlOpenMixer()

NTSTATUS WdmAudControlOpenMixer ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo 
)

Definition at line 411 of file mmixer.c.

416{
418 PWDMAUD_HANDLE Handles;
419 //PWDMAUD_DEVICE_EXTENSION DeviceExtension;
421 PKEVENT EventObject = NULL;
422
423 DPRINT("WdmAudControlOpenMixer\n");
424
425 //DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
426
427 if (DeviceInfo->u.hNotifyEvent)
428 {
430
431 if (!NT_SUCCESS(Status))
432 {
433 DPRINT1("Invalid notify event passed %p from client %p\n", DeviceInfo->u.hNotifyEvent, ClientInfo);
436 }
437 }
438
440 {
441 ObDereferenceObject(EventObject);
442 DPRINT1("Failed to open mixer\n");
444 }
445
446
447 Handles = AllocateItem(NonPagedPool, sizeof(WDMAUD_HANDLE) * (ClientInfo->NumPins+1));
448
449 if (Handles)
450 {
451 if (ClientInfo->NumPins)
452 {
453 RtlMoveMemory(Handles, ClientInfo->hPins, sizeof(WDMAUD_HANDLE) * ClientInfo->NumPins);
454 FreeItem(ClientInfo->hPins);
455 }
456
457 ClientInfo->hPins = Handles;
458 ClientInfo->hPins[ClientInfo->NumPins].Handle = hMixer;
459 ClientInfo->hPins[ClientInfo->NumPins].Type = MIXER_DEVICE_TYPE;
460 ClientInfo->hPins[ClientInfo->NumPins].NotifyEvent = EventObject;
461 ClientInfo->NumPins++;
462 }
463 else
464 {
465 ObDereferenceObject(EventObject);
467 }
468
469 DeviceInfo->hDevice = hMixer;
470
472}
NTSYSAPI void WINAPI DbgBreakPoint(void)
#define UserMode
Definition: asm.h:35
POBJECT_TYPE ExEventObjectType
Definition: event.c:18
MIXER_STATUS MMixerOpen(IN PMIXER_CONTEXT MixerContext, IN ULONG MixerId, IN PVOID MixerEventContext, IN PMIXER_EVENT MixerEventRoutine, OUT PHANDLE MixerHandle)
Definition: mixer.c:77
#define EVENT_MODIFY_STATE
Definition: winbase.h:163

Referenced by WdmAudControlOpen().

◆ WdmAudControlOpenWave()

NTSTATUS WdmAudControlOpenWave ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo 
)

Definition at line 847 of file mmixer.c.

852{
855
856 Context.ClientInfo = ClientInfo;
857 Context.DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
858 Context.DeviceType = DeviceInfo->DeviceType;
859
860 Status = MMixerOpenWave(&MixerContext, DeviceInfo->DeviceIndex, DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE, &DeviceInfo->u.WaveFormatEx, CreatePinCallback, &Context, &DeviceInfo->hDevice);
861
864 else
866}
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
@ WAVE_IN_DEVICE_TYPE
Definition: sndtypes.h:28

Referenced by WdmAudControlOpen().

◆ WdmAudGetControlDetails()

NTSTATUS NTAPI WdmAudGetControlDetails ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo 
)

Definition at line 530 of file mmixer.c.

535{
537
538 /* clear hmixer type flag */
539 DeviceInfo->Flags &= ~MIXER_OBJECTF_HMIXER;
540
541 /* query mmixer library */
542 Status = MMixerGetControlDetails(&MixerContext, DeviceInfo->hDevice, DeviceInfo->DeviceIndex, DeviceInfo->Flags, &DeviceInfo->u.MixDetails);
543
546 else
548}
MIXER_STATUS MMixerGetControlDetails(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERCONTROLDETAILS MixerControlDetails)
Definition: mixer.c:565

◆ WdmAudGetLineControls()

NTSTATUS NTAPI WdmAudGetLineControls ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo 
)

Definition at line 574 of file mmixer.c.

579{
581
582 /* clear hmixer type flag */
583 DeviceInfo->Flags &= ~MIXER_OBJECTF_HMIXER;
584
585 /* query mixer library */
586 Status = MMixerGetLineControls(&MixerContext, DeviceInfo->hDevice, DeviceInfo->DeviceIndex, DeviceInfo->Flags, &DeviceInfo->u.MixControls);
587
590 else
592
593
594}
MIXER_STATUS MMixerGetLineControls(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERLINECONTROLSW MixerLineControls)
Definition: mixer.c:331

◆ WdmAudGetLineInfo()

NTSTATUS NTAPI WdmAudGetLineInfo ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo 
)

Definition at line 552 of file mmixer.c.

557{
559
560 /* clear hmixer type flag */
561 DeviceInfo->Flags &= ~MIXER_OBJECTF_HMIXER;
562
563 /* query mixer library */
564 Status = MMixerGetLineInfo(&MixerContext, DeviceInfo->hDevice, DeviceInfo->DeviceIndex, DeviceInfo->Flags, &DeviceInfo->u.MixLine);
565
568 else
570}
MIXER_STATUS MMixerGetLineInfo(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERLINEW MixerLine)
Definition: mixer.c:148

◆ WdmAudGetMidiInDeviceCount()

ULONG WdmAudGetMidiInDeviceCount ( )

Definition at line 681 of file mmixer.c.

682{
684}
ULONG MMixerGetMidiInCount(IN PMIXER_CONTEXT MixerContext)
Definition: midi.c:502

Referenced by WdmAudControlDeviceType().

◆ WdmAudGetMidiOutDeviceCount()

ULONG WdmAudGetMidiOutDeviceCount ( )

Definition at line 687 of file mmixer.c.

688{
690}
ULONG MMixerGetWaveOutCount(IN PMIXER_CONTEXT MixerContext)
Definition: wave.c:596

Referenced by WdmAudControlDeviceType().

◆ WdmAudGetMixerDeviceCount()

ULONG WdmAudGetMixerDeviceCount ( )

Definition at line 663 of file mmixer.c.

664{
666}
ULONG MMixerGetCount(IN PMIXER_CONTEXT MixerContext)
Definition: mixer.c:15

Referenced by WdmAudControlDeviceType(), and WdmAudInitWorkerRoutine().

◆ WdmAudGetMixerEvent()

NTSTATUS NTAPI WdmAudGetMixerEvent ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo 
)

Definition at line 620 of file mmixer.c.

625{
627 PEVENT_ENTRY EventEntry;
628
629 /* enumerate event list and check if there is a new event */
630 Entry = ClientInfo->MixerEventList.Flink;
631
632 while(Entry != &ClientInfo->MixerEventList)
633 {
634 /* grab event entry */
636
637 if (EventEntry->hMixer == DeviceInfo->hDevice)
638 {
639 /* found an entry */
640 DeviceInfo->u.MixerEvent.hMixer = EventEntry->hMixer;
641 DeviceInfo->u.MixerEvent.NotificationType = EventEntry->NotificationType;
642 DeviceInfo->u.MixerEvent.Value = EventEntry->Value;
643
644 /* remove entry from list */
645 RemoveEntryList(&EventEntry->Entry);
646
647 /* free event entry */
648 FreeItem(EventEntry);
649
650 /* done */
652 }
653
654 /* move to next */
655 Entry = Entry->Flink;
656 }
657
658 /* no event entry available */
660}
struct EVENT_ENTRY * PEVENT_ENTRY
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
ULONG Value
Definition: wdmaud.h:41
HANDLE hMixer
Definition: wdmaud.h:42
LIST_ENTRY Entry
Definition: wdmaud.h:39
ULONG NotificationType
Definition: wdmaud.h:40
Definition: typedefs.h:120
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by WdmAudDeviceControl().

◆ WdmAudGetPnpNameByIndexAndType()

NTSTATUS WdmAudGetPnpNameByIndexAndType ( IN ULONG  DeviceIndex,
IN SOUND_DEVICE_TYPE  DeviceType,
OUT LPWSTR DevicePath 
)

Definition at line 693 of file mmixer.c.

697{
699 {
701 return STATUS_SUCCESS;
702 else
703 return STATUS_UNSUCCESSFUL;
704 }
706 {
708 return STATUS_SUCCESS;
709 else
710 return STATUS_UNSUCCESSFUL;
711 }
712 else if (DeviceType == MIXER_DEVICE_TYPE)
713 {
715 }
716
717 return STATUS_UNSUCCESSFUL;
718}
#define UNIMPLEMENTED
Definition: debug.h:118
DeviceType
Definition: mmdrv.h:42
MIXER_STATUS MMixerGetWaveDevicePath(IN PMIXER_CONTEXT MixerContext, IN ULONG bWaveIn, IN ULONG DeviceId, OUT LPWSTR *DevicePath)
Definition: wave.c:704
MIXER_STATUS MMixerGetMidiDevicePath(IN PMIXER_CONTEXT MixerContext, IN ULONG bMidiIn, IN ULONG DeviceId, OUT LPWSTR *DevicePath)
Definition: midi.c:380
@ MIDI_OUT_DEVICE_TYPE
Definition: sndtypes.h:31
@ WAVE_OUT_DEVICE_TYPE
Definition: sndtypes.h:29

Referenced by WdmAudGetDeviceInterface().

◆ WdmAudGetPosition()

NTSTATUS NTAPI WdmAudGetPosition ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp,
_In_ PWDMAUD_DEVICE_INFO  DeviceInfo 
)

Definition at line 774 of file mmixer.c.

778{
781
782 /* Get position */
784
786 {
787 DeviceInfo->u.Position = (ULONGLONG)Position;
789 }
790 else
792}
MIXER_STATUS MMixerGetWavePosition(_In_ PMIXER_CONTEXT MixerContext, _In_ HANDLE PinHandle, _Out_ PDWORD Position)
Definition: wave.c:618
static COORD Position
Definition: mouse.c:34
uint64_t ULONGLONG
Definition: typedefs.h:67

Referenced by WdmAudDeviceControl().

◆ WdmAudGetWaveInDeviceCount()

ULONG WdmAudGetWaveInDeviceCount ( )

Definition at line 669 of file mmixer.c.

670{
672}
ULONG MMixerGetWaveInCount(IN PMIXER_CONTEXT MixerContext)
Definition: wave.c:574

Referenced by WdmAudControlDeviceType(), and WdmAudInitWorkerRoutine().

◆ WdmAudGetWaveOutDeviceCount()

ULONG WdmAudGetWaveOutDeviceCount ( )

Definition at line 675 of file mmixer.c.

676{
678}

Referenced by WdmAudControlDeviceType(), and WdmAudInitWorkerRoutine().

◆ WdmAudMidiCapabilities()

NTSTATUS WdmAudMidiCapabilities ( IN PDEVICE_OBJECT  DeviceObject,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo,
IN PWDMAUD_DEVICE_EXTENSION  DeviceExtension 
)

Definition at line 747 of file mmixer.c.

752{
754
755 if (DeviceInfo->DeviceType == MIDI_IN_DEVICE_TYPE)
756 {
757 /* get capabilities */
758 Status = MMixerMidiInCapabilities(&MixerContext, DeviceInfo->DeviceIndex, &DeviceInfo->u.MidiInCaps);
759 }
760 else if (DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE)
761 {
762 /* get capabilities */
763 Status = MMixerMidiOutCapabilities(&MixerContext, DeviceInfo->DeviceIndex, &DeviceInfo->u.MidiOutCaps);
764 }
765
767 return STATUS_SUCCESS;
768 else
769 return STATUS_UNSUCCESSFUL;
770}
MIXER_STATUS MMixerMidiInCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPMIDIINCAPSW Caps)
Definition: midi.c:344
MIXER_STATUS MMixerMidiOutCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPMIDIOUTCAPSW Caps)
Definition: midi.c:308

Referenced by WdmAudCapabilities().

◆ WdmAudMixerCapabilities()

NTSTATUS WdmAudMixerCapabilities ( IN PDEVICE_OBJECT  DeviceObject,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo,
IN PWDMAUD_DEVICE_EXTENSION  DeviceExtension 
)

Definition at line 398 of file mmixer.c.

403{
405 return STATUS_SUCCESS;
406
408}
MIXER_STATUS MMixerGetCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG MixerIndex, OUT LPMIXERCAPSW MixerCaps)
Definition: mixer.c:38
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

Referenced by WdmAudCapabilities().

◆ WdmAudMixerInitialize()

NTSTATUS WdmAudMixerInitialize ( IN PDEVICE_OBJECT  DeviceObject)

Definition at line 380 of file mmixer.c.

382{
384
385 /* initialize the mixer library */
387
389 {
390 /* failed to initialize mmixer library */
391 DPRINT("MMixerInitialize failed with %lx\n", Status);
392 }
393
394 return Status;
395}
MIXER_STATUS Enum(IN PVOID EnumContext, IN ULONG DeviceIndex, OUT LPWSTR *DeviceName, OUT PHANDLE OutHandle, OUT PHANDLE OutKey)
Definition: mmixer.c:220
MIXER_STATUS MMixerInitialize(IN PMIXER_CONTEXT MixerContext, IN PMIXER_ENUM EnumFunction, IN PVOID EnumContext)
Definition: mixer.c:768

Referenced by WdmAudInitWorkerRoutine().

◆ WdmAudSetControlDetails()

NTSTATUS NTAPI WdmAudSetControlDetails ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo 
)

Definition at line 598 of file mmixer.c.

603{
605
606 /* clear hmixer type flag */
607 DeviceInfo->Flags &= ~MIXER_OBJECTF_HMIXER;
608
609 /* query mixer library */
610 Status = MMixerSetControlDetails(&MixerContext, DeviceInfo->hDevice, DeviceInfo->DeviceIndex, DeviceInfo->Flags, &DeviceInfo->u.MixDetails);
611
614 else
616}
MIXER_STATUS MMixerSetControlDetails(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERCONTROLDETAILS MixerControlDetails)
Definition: mixer.c:495

◆ WdmAudWaveCapabilities()

NTSTATUS WdmAudWaveCapabilities ( IN PDEVICE_OBJECT  DeviceObject,
IN PWDMAUD_DEVICE_INFO  DeviceInfo,
IN PWDMAUD_CLIENT  ClientInfo,
IN PWDMAUD_DEVICE_EXTENSION  DeviceExtension 
)

Definition at line 721 of file mmixer.c.

726{
728
729 if (DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE)
730 {
731 /* get capabilities */
732 Status = MMixerWaveInCapabilities(&MixerContext, DeviceInfo->DeviceIndex, &DeviceInfo->u.WaveInCaps);
733 }
734 else if (DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE)
735 {
736 /* get capabilities */
737 Status = MMixerWaveOutCapabilities(&MixerContext, DeviceInfo->DeviceIndex, &DeviceInfo->u.WaveOutCaps);
738 }
739
741 return STATUS_SUCCESS;
742 else
743 return Status;
744}
MIXER_STATUS MMixerWaveOutCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPWAVEOUTCAPSW Caps)
Definition: wave.c:538
MIXER_STATUS MMixerWaveInCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPWAVEINCAPSW Caps)
Definition: wave.c:502

Referenced by WdmAudCapabilities().

Variable Documentation

◆ CategoryGuid

GUID CategoryGuid = {STATIC_KSCATEGORY_AUDIO}

Definition at line 46 of file mmixer.c.

◆ MixerContext

MIXER_CONTEXT MixerContext
Initial value:
=
{
sizeof(MIXER_CONTEXT),
}
VOID FreeEventData(IN PVOID EventData)
Definition: mmixer.c:326
PVOID AllocEventData(IN ULONG ExtraSize)
Definition: mmixer.c:307
MIXER_STATUS OpenKey(IN HANDLE hKey, IN LPWSTR SubKey, IN ULONG DesiredAccess, OUT PHANDLE OutKey)
Definition: mmixer.c:84
PVOID Alloc(ULONG NumBytes)
Definition: mmixer.c:105
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
Definition: mmixer.c:126
MIXER_STATUS CloseKey(IN HANDLE hKey)
Definition: mmixer.c:97
MIXER_STATUS QueryKeyValue(IN HANDLE hKey, IN LPWSTR KeyName, OUT PVOID *ResultBuffer, OUT PULONG ResultLength, OUT PULONG KeyType)
Definition: mmixer.c:61
#define Open
Definition: syshdrs.h:62
@ Close
Definition: sacdrv.h:268
_In_ WDF_WMI_PROVIDER_CONTROL Control
Definition: wdfwmi.h:166
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815

Definition at line 29 of file mmixer.c.