#include "audiosrv.h"
#include <winreg.h>
#include <winuser.h>
#include <mmsystem.h>
#include <setupapi.h>
#include <ks.h>
#include <ksmedia.h>
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
Definition at line 17 of file pnp.c.
◆ HandleDeviceEvent()
Definition at line 176 of file pnp.c.
179{
180 switch (dwEventType)
181 {
183 {
186
188 }
189
190 default :
191 {
192 break;
193 }
194 }
195
197}
DWORD ProcessDeviceArrival(DEV_BROADCAST_DEVICEINTERFACE *device)
#define DBT_DEVICEARRIVAL
Referenced by ServiceControlHandler().
◆ ProcessDeviceArrival()
Definition at line 111 of file pnp.c.
112{
117
119}
BOOL AppendAudioDeviceToList(PnP_AudioDevice *device)
#define DestroyDeviceDescriptor(descriptor)
VOID * CreateDeviceDescriptor(WCHAR *path, BOOL is_enabled)
Referenced by HandleDeviceEvent().
◆ ProcessExistingDevices()
Definition at line 28 of file pnp.c.
29{
36
38
46
47 interface_data.
cbSize =
sizeof(interface_data);
49
50
52
55
58 0,
60
62 {
63 DPRINT(
"failed to allocate detail_data\n");
65 }
66
67 while (
70 &category_guid,
72 &interface_data) )
73 {
75
77
78
80 device_data.
cbSize =
sizeof(device_data);
83 &interface_data,
87 &device_data);
88
92
93
94
96 };
97
99
101
103}
#define HeapFree(x, y, z)
BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, CONST GUID *InterfaceClassGuid, DWORD MemberIndex, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
HDEVINFO WINAPI SetupDiGetClassDevsExW(CONST GUID *class, PCWSTR enumstr, HWND parent, DWORD flags, HDEVINFO deviceset, PCWSTR machine, PVOID reserved)
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)
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
GLuint GLsizei GLsizei * length
SP_DEVICE_INTERFACE_DETAIL_DATA_A SP_DEVICE_INTERFACE_DETAIL_DATA
#define DIGCF_DEVICEINTERFACE
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_DEVICE_INTERFACE_DETAIL_DATA_W
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W * PSP_DEVICE_INTERFACE_DETAIL_DATA_W
Referenced by ServiceMain().
◆ RegisterForDeviceNotifications()
BOOL RegisterForDeviceNotifications |
( |
VOID |
| ) |
|
Definition at line 127 of file pnp.c.
128{
130
132
133 ZeroMemory(¬ification_filter,
sizeof(notification_filter));
137
140 ¬ification_filter,
141 DEVICE_NOTIFY_SERVICE_HANDLE
142
143);
145 {
147 }
148
150}
SERVICE_STATUS_HANDLE service_status_handle
static HDEVNOTIFY device_notification_handle
#define DBT_DEVTYP_DEVICEINTERFACE
DEV_BROADCAST_DEVICEINTERFACE_A DEV_BROADCAST_DEVICEINTERFACE
HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE hRecipient, LPVOID NotificationFilter, DWORD Flags)
DWORD WINAPI GetLastError(void)
Referenced by ServiceMain().
◆ UnregisterDeviceNotifications()
VOID UnregisterDeviceNotifications |
( |
VOID |
| ) |
|
◆ device_notification_handle
HDEVNOTIFY device_notification_handle = NULL |
|
static |