17 #pragma warning( disable: 4049 )
21 #ifndef __REQUIRED_RPCNDR_H_VERSION__
22 #define __REQUIRED_RPCNDR_H_VERSION__ 500
26 #ifndef __REQUIRED_RPCSAL_H_VERSION__
27 #define __REQUIRED_RPCSAL_H_VERSION__ 100
33 #ifndef __RPCNDR_H_VERSION__
34 #error this stub requires an updated version of <rpcndr.h>
35 #endif // __RPCNDR_H_VERSION__
37 #ifndef COM_NO_WINDOWS_H
42 #ifndef __mmdeviceapi_h__
43 #define __mmdeviceapi_h__
46 #pragma GCC system_header
49 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
55 #ifndef __IMMNotificationClient_FWD_DEFINED__
56 #define __IMMNotificationClient_FWD_DEFINED__
61 #ifndef __IMMDevice_FWD_DEFINED__
62 #define __IMMDevice_FWD_DEFINED__
67 #ifndef __IMMDeviceCollection_FWD_DEFINED__
68 #define __IMMDeviceCollection_FWD_DEFINED__
73 #ifndef __IMMEndpoint_FWD_DEFINED__
74 #define __IMMEndpoint_FWD_DEFINED__
79 #ifndef __IMMDeviceEnumerator_FWD_DEFINED__
80 #define __IMMDeviceEnumerator_FWD_DEFINED__
85 #ifndef __IMMDeviceActivator_FWD_DEFINED__
86 #define __IMMDeviceActivator_FWD_DEFINED__
91 #ifndef __MMDeviceEnumerator_FWD_DEFINED__
92 #define __MMDeviceEnumerator_FWD_DEFINED__
115 #define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
116 #define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)
117 #define DEVICE_STATE_ACTIVE 0x00000001
118 #define DEVICE_STATE_DISABLED 0x00000002
119 #define DEVICE_STATE_NOTPRESENT 0x00000004
120 #define DEVICE_STATE_UNPLUGGED 0x00000008
121 #define DEVICE_STATEMASK_ALL 0x0000000f
122 #ifdef DEFINE_PROPERTYKEY
123 #undef DEFINE_PROPERTYKEY
126 #define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
128 #define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name
130 DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 0);
131 DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 1);
132 DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 2);
133 DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 3);
134 DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 4);
135 DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 5);
136 #define ENDPOINT_SYSFX_ENABLED 0x00000000 // System Effects are enabled.
137 #define ENDPOINT_SYSFX_DISABLED 0x00000001 // System Effects are disabled.
138 DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 6);
139 DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat, 0xf19f064d, 0x82c, 0x4e27, 0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c, 0);
185 #ifndef __IMMNotificationClient_INTERFACE_DEFINED__
186 #define __IMMNotificationClient_INTERFACE_DEFINED__
194 #if defined(__cplusplus) && !defined(CINTERFACE)
196 MIDL_INTERFACE(
"7991EEC9-7E89-4D85-8390-6C703CEC60C0")
200 virtual HRESULT STDMETHODCALLTYPE OnDeviceStateChanged(
202 __in LPCWSTR pwstrDeviceId,
204 __in DWORD dwNewState) = 0;
206 virtual HRESULT STDMETHODCALLTYPE OnDeviceAdded(
208 __in LPCWSTR pwstrDeviceId) = 0;
210 virtual HRESULT STDMETHODCALLTYPE OnDeviceRemoved(
212 __in LPCWSTR pwstrDeviceId) = 0;
214 virtual HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged(
220 __in LPCWSTR pwstrDefaultDeviceId) = 0;
222 virtual HRESULT STDMETHODCALLTYPE OnPropertyValueChanged(
224 __in LPCWSTR pwstrDeviceId,
236 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
242 ULONG ( STDMETHODCALLTYPE *AddRef )(
245 ULONG ( STDMETHODCALLTYPE *Release )(
248 HRESULT ( STDMETHODCALLTYPE *OnDeviceStateChanged )(
255 HRESULT ( STDMETHODCALLTYPE *OnDeviceAdded )(
260 HRESULT ( STDMETHODCALLTYPE *OnDeviceRemoved )(
265 HRESULT ( STDMETHODCALLTYPE *OnDefaultDeviceChanged )(
274 HRESULT ( STDMETHODCALLTYPE *OnPropertyValueChanged )(
294 #define IMMNotificationClient_QueryInterface(This,riid,ppvObject) \
295 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
297 #define IMMNotificationClient_AddRef(This) \
298 ( (This)->lpVtbl -> AddRef(This) )
300 #define IMMNotificationClient_Release(This) \
301 ( (This)->lpVtbl -> Release(This) )
304 #define IMMNotificationClient_OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) \
305 ( (This)->lpVtbl -> OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) )
307 #define IMMNotificationClient_OnDeviceAdded(This,pwstrDeviceId) \
308 ( (This)->lpVtbl -> OnDeviceAdded(This,pwstrDeviceId) )
310 #define IMMNotificationClient_OnDeviceRemoved(This,pwstrDeviceId) \
311 ( (This)->lpVtbl -> OnDeviceRemoved(This,pwstrDeviceId) )
313 #define IMMNotificationClient_OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) \
314 ( (This)->lpVtbl -> OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) )
316 #define IMMNotificationClient_OnPropertyValueChanged(This,pwstrDeviceId,key) \
317 ( (This)->lpVtbl -> OnPropertyValueChanged(This,pwstrDeviceId,key) )
330 #ifndef __IMMDevice_INTERFACE_DEFINED__
331 #define __IMMDevice_INTERFACE_DEFINED__
339 #if defined(__cplusplus) && !defined(CINTERFACE)
341 MIDL_INTERFACE(
"D666063F-1587-4E43-81F1-B948E807363F")
345 virtual HRESULT STDMETHODCALLTYPE Activate(
353 __out void **ppInterface) = 0;
355 virtual HRESULT STDMETHODCALLTYPE OpenPropertyStore(
357 __in DWORD stgmAccess,
361 virtual HRESULT STDMETHODCALLTYPE GetId(
365 virtual HRESULT STDMETHODCALLTYPE GetState(
367 __out DWORD *pdwState) = 0;
377 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
383 ULONG ( STDMETHODCALLTYPE *AddRef )(
386 ULONG ( STDMETHODCALLTYPE *Release )(
389 HRESULT ( STDMETHODCALLTYPE *Activate )(
400 HRESULT ( STDMETHODCALLTYPE *OpenPropertyStore )(
407 HRESULT ( STDMETHODCALLTYPE *GetId )(
412 HRESULT ( STDMETHODCALLTYPE *GetState )(
430 #define IMMDevice_QueryInterface(This,riid,ppvObject) \
431 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
433 #define IMMDevice_AddRef(This) \
434 ( (This)->lpVtbl -> AddRef(This) )
436 #define IMMDevice_Release(This) \
437 ( (This)->lpVtbl -> Release(This) )
440 #define IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) \
441 ( (This)->lpVtbl -> Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) )
443 #define IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties) \
444 ( (This)->lpVtbl -> OpenPropertyStore(This,stgmAccess,ppProperties) )
446 #define IMMDevice_GetId(This,ppstrId) \
447 ( (This)->lpVtbl -> GetId(This,ppstrId) )
449 #define IMMDevice_GetState(This,pdwState) \
450 ( (This)->lpVtbl -> GetState(This,pdwState) )
463 #ifndef __IMMDeviceCollection_INTERFACE_DEFINED__
464 #define __IMMDeviceCollection_INTERFACE_DEFINED__
472 #if defined(__cplusplus) && !defined(CINTERFACE)
474 MIDL_INTERFACE(
"0BD7A1BE-7A1A-44DB-8397-CC5392387B5E")
478 virtual HRESULT STDMETHODCALLTYPE GetCount(
480 __out UINT *pcDevices) = 0;
482 virtual HRESULT STDMETHODCALLTYPE Item(
496 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
502 ULONG ( STDMETHODCALLTYPE *AddRef )(
505 ULONG ( STDMETHODCALLTYPE *Release )(
508 HRESULT ( STDMETHODCALLTYPE *GetCount )(
513 HRESULT ( STDMETHODCALLTYPE *Item )(
533 #define IMMDeviceCollection_QueryInterface(This,riid,ppvObject) \
534 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
536 #define IMMDeviceCollection_AddRef(This) \
537 ( (This)->lpVtbl -> AddRef(This) )
539 #define IMMDeviceCollection_Release(This) \
540 ( (This)->lpVtbl -> Release(This) )
543 #define IMMDeviceCollection_GetCount(This,pcDevices) \
544 ( (This)->lpVtbl -> GetCount(This,pcDevices) )
546 #define IMMDeviceCollection_Item(This,nDevice,ppDevice) \
547 ( (This)->lpVtbl -> Item(This,nDevice,ppDevice) )
560 #ifndef __IMMEndpoint_INTERFACE_DEFINED__
561 #define __IMMEndpoint_INTERFACE_DEFINED__
569 #if defined(__cplusplus) && !defined(CINTERFACE)
571 MIDL_INTERFACE(
"1BE09788-6894-4089-8586-9A2A6C265AC5")
575 virtual HRESULT STDMETHODCALLTYPE GetDataFlow(
587 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
593 ULONG ( STDMETHODCALLTYPE *AddRef )(
596 ULONG ( STDMETHODCALLTYPE *Release )(
599 HRESULT ( STDMETHODCALLTYPE *GetDataFlow )(
617 #define IMMEndpoint_QueryInterface(This,riid,ppvObject) \
618 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
620 #define IMMEndpoint_AddRef(This) \
621 ( (This)->lpVtbl -> AddRef(This) )
623 #define IMMEndpoint_Release(This) \
624 ( (This)->lpVtbl -> Release(This) )
627 #define IMMEndpoint_GetDataFlow(This,pDataFlow) \
628 ( (This)->lpVtbl -> GetDataFlow(This,pDataFlow) )
641 #ifndef __IMMDeviceEnumerator_INTERFACE_DEFINED__
642 #define __IMMDeviceEnumerator_INTERFACE_DEFINED__
650 #if defined(__cplusplus) && !defined(CINTERFACE)
652 MIDL_INTERFACE(
"A95664D2-9614-4F35-A746-DE8DB63617E6")
656 virtual HRESULT STDMETHODCALLTYPE EnumAudioEndpoints(
660 __in DWORD dwStateMask,
664 virtual HRESULT STDMETHODCALLTYPE GetDefaultAudioEndpoint(
672 virtual HRESULT STDMETHODCALLTYPE GetDevice(
674 __in LPCWSTR pwstrId,
678 virtual HRESULT STDMETHODCALLTYPE RegisterEndpointNotificationCallback(
682 virtual HRESULT STDMETHODCALLTYPE UnregisterEndpointNotificationCallback(
694 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
700 ULONG ( STDMETHODCALLTYPE *AddRef )(
703 ULONG ( STDMETHODCALLTYPE *Release )(
706 HRESULT ( STDMETHODCALLTYPE *EnumAudioEndpoints )(
715 HRESULT ( STDMETHODCALLTYPE *GetDefaultAudioEndpoint )(
724 HRESULT ( STDMETHODCALLTYPE *GetDevice )(
731 HRESULT ( STDMETHODCALLTYPE *RegisterEndpointNotificationCallback )(
736 HRESULT ( STDMETHODCALLTYPE *UnregisterEndpointNotificationCallback )(
754 #define IMMDeviceEnumerator_QueryInterface(This,riid,ppvObject) \
755 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
757 #define IMMDeviceEnumerator_AddRef(This) \
758 ( (This)->lpVtbl -> AddRef(This) )
760 #define IMMDeviceEnumerator_Release(This) \
761 ( (This)->lpVtbl -> Release(This) )
764 #define IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) \
765 ( (This)->lpVtbl -> EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) )
767 #define IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) \
768 ( (This)->lpVtbl -> GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) )
770 #define IMMDeviceEnumerator_GetDevice(This,pwstrId,ppDevice) \
771 ( (This)->lpVtbl -> GetDevice(This,pwstrId,ppDevice) )
773 #define IMMDeviceEnumerator_RegisterEndpointNotificationCallback(This,pClient) \
774 ( (This)->lpVtbl -> RegisterEndpointNotificationCallback(This,pClient) )
776 #define IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(This,pClient) \
777 ( (This)->lpVtbl -> UnregisterEndpointNotificationCallback(This,pClient) )
790 #ifndef __IMMDeviceActivator_INTERFACE_DEFINED__
791 #define __IMMDeviceActivator_INTERFACE_DEFINED__
799 #if defined(__cplusplus) && !defined(CINTERFACE)
801 MIDL_INTERFACE(
"3B0D0EA4-D0A9-4B0E-935B-09516746FAC0")
805 virtual HRESULT STDMETHODCALLTYPE Activate(
813 __out void **ppInterface) = 0;
823 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
829 ULONG ( STDMETHODCALLTYPE *AddRef )(
832 ULONG ( STDMETHODCALLTYPE *Release )(
835 HRESULT ( STDMETHODCALLTYPE *Activate )(
859 #define IMMDeviceActivator_QueryInterface(This,riid,ppvObject) \
860 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
862 #define IMMDeviceActivator_AddRef(This) \
863 ( (This)->lpVtbl -> AddRef(This) )
865 #define IMMDeviceActivator_Release(This) \
866 ( (This)->lpVtbl -> Release(This) )
869 #define IMMDeviceActivator_Activate(This,iid,pDevice,pActivationParams,ppInterface) \
870 ( (This)->lpVtbl -> Activate(This,iid,pDevice,pActivationParams,ppInterface) )
900 #ifndef __MMDeviceAPILib_LIBRARY_DEFINED__
901 #define __MMDeviceAPILib_LIBRARY_DEFINED__
913 class DECLSPEC_UUID("BCDE0395-E52F-467C-8E3D-C4579291692E")