[MOUNTMGR] Introduce MountMgrSendSyncDeviceIoCtl() to replace repeated code (#6960)

See https://www.osr.com/blog/2018/02/14/beware-iobuilddeviceiocontrolrequest/
for some details about IRQL requirements.
This commit is contained in:
Hermès Bélusca-Maïto 2024-05-26 22:18:46 +02:00
parent 50271949e7
commit ab0e04c81d
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
5 changed files with 234 additions and 448 deletions

View file

@ -179,6 +179,17 @@ extern LONG Unloading;
CODE_SEG("INIT")
DRIVER_INITIALIZE DriverEntry;
_IRQL_requires_(PASSIVE_LEVEL)
NTSTATUS
MountMgrSendSyncDeviceIoCtl(
_In_ ULONG IoControlCode,
_In_ PDEVICE_OBJECT DeviceObject,
_In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer,
_In_ ULONG InputBufferLength,
_Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer,
_In_ ULONG OutputBufferLength,
_In_opt_ PFILE_OBJECT FileObject);
VOID
NTAPI
MountMgrCancel(