KEVENT UnloadEvent;
LONG Unloading;
-PWSTR Cunc = L"\\??\\C:";
+static const WCHAR Cunc[] = L"\\??\\C:";
/*
* TODO:
- * - MountMgrQueryDosVolumePath
* - MountMgrQueryDosVolumePaths
* - MountMgrQueryVolumePaths
* - MountMgrValidateBackPointer
}
}
- /* If caller didn't provide a letter, let's find one for him.
- * If device is a floppy, start with letter A
- */
+ /* If caller didn't provide a letter, let's find one for him */
+
if (RtlPrefixUnicodeString(&DeviceFloppy, DeviceName, TRUE))
{
+ /* If the device is a floppy, start with letter A */
Letter = 'A';
}
+ else if (RtlPrefixUnicodeString(&DeviceCdRom, DeviceName, TRUE))
+ {
+ /* If the device is a CD-ROM, start with letter D */
+ Letter = 'D';
+ }
else
{
- /* Otherwise, if device is a cd rom, then, start with D.
- * Finally, if a disk, use C
- */
- Letter = RtlPrefixUnicodeString(&DeviceCdRom, DeviceName, TRUE) + 'C';
+ /* Finally, if it's a disk, use C */
+ Letter = 'C';
}
/* Try to affect a letter (up to Z, ofc) until it's possible */
PDEVICE_INFORMATION DeviceInformation;
PSAVED_LINK_INFORMATION SavedLinkInformation;
+ UNREFERENCED_PARAMETER(DriverObject);
+
/* Don't get notification any longer */
IoUnregisterShutdownNotification(gdeviceObject);
PIO_STACK_LOCATION Stack;
NTSTATUS Status = STATUS_SUCCESS;
+ UNREFERENCED_PARAMETER(DeviceObject);
+
Stack = IoGetCurrentIrpStackLocation(Irp);
/* Allow driver opening for communication
MountMgrCancel(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
+ UNREFERENCED_PARAMETER(DeviceObject);
+
RemoveEntryList(&(Irp->Tail.Overlay.ListEntry));
IoReleaseCancelSpinLock(Irp->CancelIrql);