80 WCHAR IndexStringBuffer[5];
87 DPRINT(
"Unexpected NULL parameter");
103 sizeof(IndexStringBuffer) +
112 DPRINT(
"Couldn't allocate memory for device name string");
120 UnicodeIndex.
Buffer = IndexStringBuffer;
151 String->MaximumLength = 0;
174 DPRINT(
"Invalid device type");
178 if ( DeviceNameBody )
180 DPRINT(
"Reporting device name\n");
182 DPRINT(
"%ws\n", *DeviceNameBody);
185 if ( DosDeviceNameBody )
187 DPRINT(
"Reporting DOS device name\n");
189 DPRINT(
"%ws\n", *DosDeviceNameBody);
217 if ( ( ! DeviceNameBody ) || ( ! DosDeviceNameBody ) ||
218 ( ! FullDeviceName ) || ( ! FullDosDeviceName ) )
220 DPRINT(
"Unexpected NULL parameter");
276 ( ! WideDeviceName ) || ( ! WideDosDeviceName ) )
278 DPRINT(
"Unexpected NULL parameter");
363 DPRINT(
"Unexpected NULL parameter");
413 DPRINT(
"Unexpected NULL parameter");
434 DPRINT(
"Status of symlink deletion is 0x%08x\n",
Status);
456 DPRINT(
"Unexpected NULL parameter");
477 DPRINT(
"DOS device name at %p\n", WideDosDeviceName);
479 DPRINT(
"DOS device name is based on %ws\n", WideDosDeviceName);
PRTL_UNICODE_STRING_BUFFER Path
NTSTATUS CreateSoundDeviceWithDefaultName(IN PDRIVER_OBJECT DriverObject, IN UCHAR DeviceType, IN UCHAR Index, IN ULONG ExtensionSize, OUT PDEVICE_OBJECT *DeviceObject)
struct _DEVICE_NAME_GROUP DEVICE_NAME_GROUP
NTSTATUS CreateSoundDevice(IN PDRIVER_OBJECT DriverObject, IN PCWSTR WideDeviceName, IN PCWSTR WideDosDeviceName, IN UCHAR Index, IN ULONG ExtensionSize, OUT PDEVICE_OBJECT *DeviceObject)
NTSTATUS GetDefaultSoundDeviceNameBodies(IN UCHAR DeviceType, OUT PCWSTR *DeviceNameBody, OUT PCWSTR *DosDeviceNameBody)
NTSTATUS ConstructDeviceName(IN PCWSTR Path, IN UCHAR Index, OUT PUNICODE_STRING DeviceName)
NTSTATUS DestroySoundDevice(IN PDEVICE_OBJECT DeviceObject, IN PCWSTR WideDosDeviceName, IN UCHAR Index)
NTSTATUS ConstructSoundDeviceNames(IN PCWSTR DeviceNameBody, IN PCWSTR DosDeviceNameBody, IN UCHAR Index, OUT PUNICODE_STRING FullDeviceName, OUT PUNICODE_STRING FullDosDeviceName)
DEVICE_NAME_GROUP SoundDeviceNameBodies[6]
VOID FreeUnicodeStringBuffer(IN PUNICODE_STRING String)
NTSTATUS DestroySoundDeviceWithDefaultName(IN PDEVICE_OBJECT DeviceObject, IN UCHAR DeviceType, IN UCHAR Index)
#define NT_SUCCESS(StatCode)
#define ExAllocatePool(type, size)
static char DosDeviceName[DEVICE_SIZE]
#define SOUND_MAX_DEVICES
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicodeString(ULONG Value, ULONG Base, PUNICODE_STRING String)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
#define FILE_DEVICE_SOUND
#define DD_MIX_DEVICE_NAME_U
#define DD_MIDI_OUT_DEVICE_NAME_U
#define DD_WAVE_OUT_DOS_DEVICE_NAME_U
#define DD_WAVE_IN_DOS_DEVICE_NAME_U
#define DD_WAVE_IN_DEVICE_NAME_U
#define DD_AUX_DEVICE_NAME_U
#define DD_MIDI_IN_DEVICE_NAME_U
#define DD_MIX_DOS_DEVICE_NAME_U
#define DD_MIDI_IN_DOS_DEVICE_NAME_U
#define DD_WAVE_OUT_DEVICE_NAME_U
#define DD_AUX_DOS_DEVICE_NAME_U
#define DD_MIDI_OUT_DOS_DEVICE_NAME_U
#define IS_VALID_SOUND_DEVICE_TYPE(x)
#define STATUS_INVALID_PARAMETER
#define STATUS_INSUFFICIENT_RESOURCES
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject