/* set the input format */
PinRequest.PinId = 0;
- //DPRINT1("InputFormat %p Size %u WaveFormatSize %u DataFormat %u WaveEx %u\n", InputFormat, InputFormat->FormatSize, sizeof(KSDATAFORMAT_WAVEFORMATEX), sizeof(KSDATAFORMAT), sizeof(WAVEFORMATEX));
+ DPRINT("InputFormat %p Size %u WaveFormatSize %u DataFormat %u WaveEx %u\n", InputFormat, InputFormat->FormatSize, sizeof(KSDATAFORMAT_WAVEFORMATEX), sizeof(KSDATAFORMAT), sizeof(WAVEFORMATEX));
Status = KsSynchronousIoControlDevice(FileObject, KernelMode, IOCTL_KS_PROPERTY,
(PVOID)&PinRequest,
sizeof(KSP_PIN),
/* set the the output format */
PinRequest.PinId = 1;
- //DPRINT1("OutputFormat %p Size %u WaveFormatSize %u DataFormat %u WaveEx %u\n", OutputFormat, OutputFormat->FormatSize, sizeof(KSDATAFORMAT_WAVEFORMATEX), sizeof(KSDATAFORMAT), sizeof(WAVEFORMATEX));
+ DPRINT("OutputFormat %p Size %u WaveFormatSize %u DataFormat %u WaveEx %u\n", OutputFormat, OutputFormat->FormatSize, sizeof(KSDATAFORMAT_WAVEFORMATEX), sizeof(KSDATAFORMAT), sizeof(WAVEFORMATEX));
Status = KsSynchronousIoControlDevice(FileObject, KernelMode, IOCTL_KS_PROPERTY,
(PVOID)&PinRequest,
sizeof(KSP_PIN),
Status = KsSynchronousIoControlDevice(DeviceEntry->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&PropertyRequest, sizeof(KSPROPERTY), (PVOID)&Count, sizeof(ULONG), &BytesReturned);
if (!NT_SUCCESS(Status))
{
+ ObDereferenceObject(DeviceEntry->FileObject);
+ ZwClose(DeviceEntry->Handle);
+ ExFreePool(DeviceEntry->DeviceName.Buffer);
ExFreePool(DeviceEntry);
return;
}
if (!Count)
{
+ ObDereferenceObject(DeviceEntry->FileObject);
+ ZwClose(DeviceEntry->Handle);
+ ExFreePool(DeviceEntry->DeviceName.Buffer);
ExFreePool(DeviceEntry);
return;
}
if (!DeviceEntry->Pins)
{
/* no memory */
+ ObDereferenceObject(DeviceEntry->FileObject);
+ ZwClose(DeviceEntry->Handle);
+ ExFreePool(DeviceEntry->DeviceName.Buffer);
ExFreePool(DeviceEntry);
return;
}
}
- DPRINT1("Num Pins %u Num WaveIn Pins %u Name WaveOut Pins %u\n", DeviceEntry->NumberOfPins, DeviceEntry->NumWaveInPin, DeviceEntry->NumWaveOutPin);
+ DPRINT("Num Pins %u Num WaveIn Pins %u Name WaveOut Pins %u\n", DeviceEntry->NumberOfPins, DeviceEntry->NumWaveInPin, DeviceEntry->NumWaveOutPin);
DeviceExtension = (PSYSAUDIODEVEXT)DeviceObject->DeviceExtension;
if (!NT_SUCCESS(Status))
{
- DPRINT1("ZwCreateFile failed with %x\n", Status);
+ DPRINT("ZwCreateFile failed with %x\n", Status);
return Status;
}
if (!NT_SUCCESS(Status))
{
ZwClose(NodeHandle);
- DPRINT1("ObReferenceObjectByHandle failed with %x\n", Status);
+ DPRINT("ObReferenceObjectByHandle failed with %x\n", Status);
return Status;
}
Status = OpenDevice(&DeviceEntry->DeviceName, &DeviceEntry->Handle, &DeviceEntry->FileObject);
if (!NT_SUCCESS(Status))
{
- DPRINT1("ZwCreateFile failed with %x\n", Status);
+ DPRINT("ZwCreateFile failed with %x\n", Status);
+ ExFreePool(DeviceEntry->DeviceName.Buffer);
ExFreePool(DeviceEntry);
return Status;
}
- DPRINT1("Successfully opened audio device %u handle %p file object %p device object %p\n", DeviceExtension->NumberOfKsAudioDevices, DeviceEntry->Handle, DeviceEntry->FileObject, DeviceEntry->FileObject->DeviceObject);
+ DPRINT("Successfully opened audio device %u handle %p file object %p device object %p\n", DeviceExtension->NumberOfKsAudioDevices, DeviceEntry->Handle, DeviceEntry->FileObject, DeviceEntry->FileObject->DeviceObject);
//FIXME
// mutal exclusion
}
else
{
- DPRINT1("Remove interface to audio device!\n");
+ DPRINT("Remove interface to audio device!\n");
UNIMPLEMENTED
return STATUS_SUCCESS;
}
if (!NT_SUCCESS(Status))
{
- DPRINT1("IoRegisterPlugPlayNotification failed with %x\n", Status);
+ DPRINT("IoRegisterPlugPlayNotification failed with %x\n", Status);
}
Status = IoRegisterPlugPlayNotification(EventCategoryDeviceInterfaceChange,
if (!NT_SUCCESS(Status))
{
/* ignore failure for now */
- DPRINT1("IoRegisterPlugPlayNotification failed for DMOCATEGORY_ACOUSTIC_ECHO_CANCEL\n", Status);
+ DPRINT("IoRegisterPlugPlayNotification failed for DMOCATEGORY_ACOUSTIC_ECHO_CANCEL\n", Status);
}
return STATUS_SUCCESS;
}
else
{
- DPRINT1("Failed to register KSCATEGORY_PREFERRED_MIDIOUT_DEVICE interface Status %x\n", Status);
+ DPRINT("Failed to register KSCATEGORY_PREFERRED_MIDIOUT_DEVICE interface Status %x\n", Status);
return Status;
}
}
else
{
- DPRINT1("Failed to register KSCATEGORY_PREFERRED_WAVEIN_DEVICE interface Status %x\n", Status);
+ DPRINT("Failed to register KSCATEGORY_PREFERRED_WAVEIN_DEVICE interface Status %x\n", Status);
return Status;
}
}
else
{
- DPRINT1("Failed to register KSCATEGORY_PREFERRED_WAVEOUT_DEVICE interface Status %x\n", Status);
+ DPRINT("Failed to register KSCATEGORY_PREFERRED_WAVEOUT_DEVICE interface Status %x\n", Status);
}
Status = IoRegisterDeviceInterface(DeviceObject, &KSCATEGORY_SYSAUDIO, NULL, &SymbolicLink);
}
else
{
- DPRINT1("Failed to register KSCATEGORY_SYSAUDIO interface Status %x\n", Status);
+ DPRINT("Failed to register KSCATEGORY_SYSAUDIO interface Status %x\n", Status);
}
return Status;
ExFreePool(DispatchContext);
- //DPRINT1("Index %u DeviceIndex %u Pin %u References %u\n", Index, Client->Devs[Index].DeviceId, SubIndex, Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].References);
+ DPRINT("Index %u DeviceIndex %u Pin %u References %u\n", Index, Client->Devs[Index].DeviceId, SubIndex, Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].References);
if (!Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].References)
{
DPRINT("Closing pin %p\n", Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].PinHandle);
PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
- DPRINT1("Dispatch_fnQuerySecurity called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Dispatch_fnQuerySecurity called DeviceObject %p Irp %p\n", DeviceObject);
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
Irp->IoStatus.Information = 0;
PIRP Irp)
{
- DPRINT1("Dispatch_fnSetSecurity called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Dispatch_fnSetSecurity called DeviceObject %p Irp %p\n", DeviceObject);
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
Irp->IoStatus.Information = 0;
PIO_STATUS_BLOCK IoStatus,
PDEVICE_OBJECT DeviceObject)
{
- DPRINT1("Dispatch_fnFastDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Dispatch_fnFastDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject);
return FALSE;
PIO_STATUS_BLOCK IoStatus,
PDEVICE_OBJECT DeviceObject)
{
- DPRINT1("Dispatch_fnFastRead called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Dispatch_fnFastRead called DeviceObject %p Irp %p\n", DeviceObject);
return FALSE;
PIO_STATUS_BLOCK IoStatus,
PDEVICE_OBJECT DeviceObject)
{
- DPRINT1("Dispatch_fnFastWrite called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Dispatch_fnFastWrite called DeviceObject %p Irp %p\n", DeviceObject);
return FALSE;
}
/* allocate object header */
Status = KsAllocateObjectHeader(&ObjectHeader, 1, CreateItem, Irp, &DispatchTable);
- DPRINT1("KsAllocateObjectHeader result %x\n", Status);
+ DPRINT("KsAllocateObjectHeader result %x\n", Status);
/* complete the irp */
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = Status;
NTAPI
SysAudio_Unload(IN PDRIVER_OBJECT DriverObject)
{
- DPRINT1("SysAudio_Unload called\n");
+ DPRINT("SysAudio_Unload called\n");
}
NTSTATUS
SYSAUDIODEVEXT *DeviceExtension;
- DPRINT1("SysAudio_InstallDevice called\n");
+ DPRINT("SysAudio_InstallDevice called\n");
/* Create the device */
Status = IoCreateDevice(DriverObject,
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath)
{
- DPRINT1("System audio graph builder (sysaudio) started\n");
+ DPRINT("System audio graph builder (sysaudio) started\n");
/* Let ks handle these */
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_CREATE);
PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
- DPRINT1("Pin_fnClose called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Pin_fnClose called DeviceObject %p Irp %p\n", DeviceObject);
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
- DPRINT1("Pin_fnQuerySecurity called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Pin_fnQuerySecurity called DeviceObject %p Irp %p\n", DeviceObject);
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
Irp->IoStatus.Information = 0;
PIRP Irp)
{
- DPRINT1("Pin_fnSetSecurity called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Pin_fnSetSecurity called DeviceObject %p Irp %p\n", DeviceObject);
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
Irp->IoStatus.Information = 0;
PIO_STATUS_BLOCK IoStatus,
PDEVICE_OBJECT DeviceObject)
{
- DPRINT1("Pin_fnFastDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Pin_fnFastDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject);
return FALSE;
PIO_STATUS_BLOCK IoStatus,
PDEVICE_OBJECT DeviceObject)
{
- DPRINT1("Pin_fnFastRead called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Pin_fnFastRead called DeviceObject %p Irp %p\n", DeviceObject);
return FALSE;
PDISPATCH_CONTEXT Context;
NTSTATUS Status;
- //DPRINT1("Pin_fnFastWrite called DeviceObject %p Irp %p\n", DeviceObject);
+ DPRINT("Pin_fnFastWrite called DeviceObject %p Irp %p\n", DeviceObject);
Context = (PDISPATCH_CONTEXT)FileObject->FsContext2;