Closed tonychen007 closed 1 year ago
When the client melody calls closeHandle, the kmelody method will block:
PlaybackState.cpp: status = KeWaitForMultipleObjects(2, objects, WaitAny, ...
status = KeWaitForMultipleObjects(2, objects, WaitAny, ...
I found stop is never call. So I added in KMelody.cpp::MelodyCreateClose:
NTSTATUS MelodyCreateClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) { auto status = STATUS_SUCCESS; UCHAR func = IoGetCurrentIrpStackLocation(Irp)->MajorFunction; if (func == IRP_MJ_CREATE) { // // create the "playback" thread (if needed) // status = g_State->Start(DeviceObject); } if (func == IRP_MJ_CLOSE) { g_State->Stop(); } return CompleteRequest(Irp, status); }
It solves the issue
Thank you :)
When the client melody calls closeHandle, the kmelody method will block:
PlaybackState.cpp:
status = KeWaitForMultipleObjects(2, objects, WaitAny, ...
I found stop is never call. So I added in KMelody.cpp::MelodyCreateClose:
It solves the issue