#include "precomp.h"
#include <mment4.h>
#include <mmebuddy_debug.h>
Go to the source code of this file.
◆ DetectNt4SoundDevices()
Definition at line 151 of file detect.c.
155{
156 SIZE_T DeviceNameLength = 0;
161
163
164 DeviceNameLength =
wcslen(BaseDeviceName);
165
167
169
171 {
173 }
174
175 while ( DoSearch )
176 {
177
180
184 {
185
188
190
192 }
193 else
194 {
196 }
197 }
198
200
202}
static VOID FreeMemory(PCREATE_DATA Data)
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
MMRESULT OpenKernelSoundDeviceByName(IN PWSTR DevicePath, IN BOOLEAN ReadOnly, OUT PHANDLE Handle)
#define VALIDATE_MMSYS_PARAMETER(parameter_condition)
#define AllocateWideString(string_length)
UINT GetDigitCount(IN UINT Number)
#define IsValidSoundDeviceType
#define ZeroWideString(string)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
◆ EnumerateNt4ServiceSoundDevices()
Definition at line 26 of file detect.c.
30{
33
35
36
39
41 {
44 DWORD MaxNameLength = 0, ValueNameLength = 0;
48
51 0,
54 {
55
58 &MaxNameLength,
60 {
61 SND_ERR(
L"Failed to query registry key information\n");
64
66 }
67
70
71
72 if ( ! DevicePath )
73 {
74
77
79 }
80
81
83
84
86
87
88 ValueNameLength = MaxNameLength +
sizeof(
WCHAR);
89
90 SND_TRACE(
L"Interested in devices beginning with %wS\n", DevicePath);
91
93 ValueIndex,
95 &ValueNameLength,
100 {
101
103 ( ValueDataLength ==
sizeof(
DWORD) ) )
104 {
107 {
108 SND_TRACE(
L"Found device: %wS\n", DevicePath);
109 SoundDeviceDetectedProc(
ValueData, DevicePath);
110 }
111 }
112
113
114 ValueNameLength = MaxNameLength +
sizeof(
WCHAR);
116
117 ValueDataLength =
sizeof(
DWORD);
120
121 ++ ValueIndex;
122 }
123
125
127 }
128 else
129 {
130 SND_WARN(
L"Unable to open the Devices key!\n");
131 }
132
133 ++ KeyIndex;
134
136 }
137
139}
ACPI_SIZE strlen(const char *String)
static WCHAR ServiceName[]
#define RegCloseKey(hKey)
_In_ GUID _In_ PVOID ValueData
MMRESULT OpenSoundDeviceRegKey(IN LPWSTR ServiceName, IN DWORD DeviceIndex, OUT PHKEY KeyHandle)
#define REG_DEVICES_KEY_NAME_U
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Referenced by DriverProc().