Okay, despite earlier doubts I suppose I can believe the file-based
IRPs cannot be concurrent with IRP_MN_REMOVE_DEVICE, but I still have
questions about the earliest OS version where this applies and about
exactly which IRPs are file-based.

Assuming Windows 2000 or later, here's what I interpret for every IRP
major code, but I have questions about some cases, and some are not
even documented (just found in the .h file so maybe don't matter?)

IRP_MJ_CREATE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_READ
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_WRITE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_DEVICE_CONTROL
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_INTERNAL_DEVICE_CONTROL (IRP_MJ_SCSI)
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_FLUSH_BUFFERS
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_CLEANUP
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_CLOSE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_QUERY_INFORMATION
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_SET_INFORMATION
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_PNP
IRP_MN_CANCEL_REMOVE_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_CANCEL_STOP_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_QUERY_REMOVE_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_QUERY_STOP_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_START_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_STOP_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_SURPRISE_REMOVAL
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
<other IRP_MJ_PNP minor IRPs>
- can be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_SYSTEM_CONTROL
- can be concurrent with IRP_MN_REMOVE_DEVICE, but
IoWMIRegistrationControl(..., WMIREG_ACTION_DEREGISTER) can
be used in place of a remove lock
IRP_MJ_POWER
- can be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_SHUTDOWN
- ?
IRP_MJ_CREATE_NAMED_PIPE
- ?
IRP_MJ_QUERY_EA
- ?
IRP_MJ_SET_EA
- ?
IRP_MJ_QUERY_VOLUME_INFORMATION
- ?
IRP_MJ_SET_VOLUME_INFORMATION
- ?
IRP_MJ_DIRECTORY_CONTROL
- ?
IRP_MJ_FILE_SYSTEM_CONTROL
- ?
IRP_MJ_LOCK_CONTROL
- ?
IRP_MJ_CREATE_MAILSLOT
- ?
IRP_MJ_QUERY_SECURITY
- ?
IRP_MJ_SET_SECURITY
- ?
IRP_MJ_DEVICE_CHANGE
- ?
IRP_MJ_QUERY_QUOTA
- ?
IRP_MJ_SET_QUOTA
- ?

Are any cases different in Windows 98 or Me?

Re: Remove locks IRP-by-IRP by BubbaGump

BubbaGump
Tue Dec 19 12:54:49 CST 2006

Instead of "be concurrent", I should have phrased the question "happen
during or after".




On Tue, 19 Dec 2006 13:16:49 -0500, BubbaGump <> wrote:

>Okay, despite earlier doubts I suppose I can believe the file-based
>IRPs cannot be concurrent with IRP_MN_REMOVE_DEVICE, but I still have
>questions about the earliest OS version where this applies and about
>exactly which IRPs are file-based.
>
>...