44 DWORD MaxNameLength = 0, ValueNameLength = 0;
61 SND_ERR(
L"Failed to query registry key information\n");
88 ValueNameLength = MaxNameLength +
sizeof(
WCHAR);
90 SND_TRACE(
L"Interested in devices beginning with %wS\n", DevicePath);
103 ( ValueDataLength ==
sizeof(
DWORD) ) )
108 SND_TRACE(
L"Found device: %wS\n", DevicePath);
109 SoundDeviceDetectedProc(
ValueData, DevicePath);
114 ValueNameLength = MaxNameLength +
sizeof(
WCHAR);
117 ValueDataLength =
sizeof(
DWORD);
130 SND_WARN(
L"Unable to open the Devices key!\n");
156 SIZE_T DeviceNameLength = 0;
164 DeviceNameLength =
wcslen(BaseDeviceName);
ACPI_SIZE strlen(const char *String)
static VOID FreeMemory(PCREATE_DATA Data)
static WCHAR ServiceName[]
#define RegCloseKey(hKey)
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
_In_ GUID _In_ PVOID ValueData
_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)
MMRESULT OpenSoundDeviceRegKey(IN LPWSTR ServiceName, IN DWORD DeviceIndex, OUT PHKEY KeyHandle)
BOOLEAN(* SOUND_DEVICE_DETECTED_PROC)(UCHAR DeviceType, PWSTR DevicePath)
MMRESULT DetectNt4SoundDevices(IN MMDEVICE_TYPE DeviceType, IN PWSTR BaseDeviceName, IN SOUND_DEVICE_DETECTED_PROC SoundDeviceDetectedProc)
MMRESULT EnumerateNt4ServiceSoundDevices(IN LPWSTR ServiceName, IN MMDEVICE_TYPE DeviceType, IN SOUND_DEVICE_DETECTED_PROC SoundDeviceDetectedProc)
#define REG_DEVICES_KEY_NAME_U
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_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