Add a hack to be able to use serial mice again (IRP_MJ_CLOSE is not set after IoGetDeviceObjectPointer() + ObDereferenceObject())

svn path=/trunk/; revision=23215
This commit is contained in:
Hervé Poussineau
2006-07-21 19:49:32 +00:00
parent 2f2139d851
commit 4dfbe6ea8c
+8
View File
@@ -1000,6 +1000,14 @@ IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName,
ObDereferenceObject(FileObject);
/* hpoussin, July 2006. Dereferencing the FileObject once
* is not enough to trigger the sending of IRP_MJ_CLEANUP.
* So, do it once more... According to Alex, it's because
* FileObjects should start with a ref count of 1 instead
* of 2 at the moment...
*/
ObDereferenceObject(FileObject);
return STATUS_SUCCESS;
}