26#include "../../../filesystems/fs_rec/fs_rec.h"
31#define DO_XIP 0x00020000
35#define RAMDISK_SESSION_SIZE \
36 FIELD_OFFSET(CDROM_TOC, TrackData) + sizeof(TRACK_DATA)
38#define RAMDISK_TOC_SIZE \
39 FIELD_OFFSET(CDROM_TOC, TrackData) + 2 * sizeof(TRACK_DATA)
41#define TOC_DATA_TRACK (0x04)
64 0x80, 0xE4, 0x05, 0xF8, 0x10, 0xE7, 0xA8, 0x8A);
70 0x9E, 0xD4, 0x7D, 0x65, 0x47, 0x6C, 0xA7, 0x68);
135 ULONG MinView, DefView, MinViewLength, DefViewLength, MaxViewLength;
228 MinViewLength = 0x10000u;
240 DefViewLength = MinViewLength;
252 MaxViewLength = DefViewLength;
285 ActualOffset.
QuadPart = DeviceExtension->DiskOffset +
Offset.QuadPart;
329 ActualOffset.
QuadPart = DeviceExtension->DiskOffset +
Offset.QuadPart;
360 WCHAR LocalBuffer[16];
367 ULONG CylinderCount, SizeByCylinders;
370 DiskType =
Input->DiskType;
377 BasePage =
Input->BasePage;
382 Input->Options.Readonly =
Input->Options.ExportAsCd |
383 Input->Options.Readonly;
441 (
Input->Options.ExportAsCd) ?
452 if (!
Input->Options.NoDosDevice)
465 L"\\GLOBAL??\\Ramdisk",
489 if (!
Input->Options.NoDriveLetter)
494 L"\\DosDevices\\%wc:",
512 *NewDriveExtension = DriveExtension;
514 DiskLength =
Input->DiskLength;
539 if (!(
Input->Options.ExportAsCd) &&
556 Heads = BiosBlock.
Heads;
584 if (
Input->Options.ExportAsCd)
605 SizeByCylinders = CylinderSize.
QuadPart * CylinderCount;
606 DriveExtension->
Cylinders = CylinderCount;
607 if ((DiskLength.
HighPart > 0) || (SizeByCylinders < DiskLength.
LowPart))
618 InsertTailList(&DeviceExtension->DiskList, &DriveExtension->DiskList);
645 PWCHAR FileNameStart, FileNameEnd;
662 DiskType =
Input->DiskType;
688 FileNameEnd =
Input->FileName + 1;
689 while ((FileNameEnd < FileNameStart) && *(FileNameEnd)) FileNameEnd++;
729 Irp->IoStatus.Information = 0;
740 Irp->IoStatus.Information = 0;
746 PartitionInfo->StartingOffset.QuadPart = DeviceExtension->BytesPerSector;
747 PartitionInfo->PartitionLength.QuadPart = DeviceExtension->BytesPerSector *
748 DeviceExtension->SectorsPerTrack *
749 DeviceExtension->NumberOfHeads *
750 DeviceExtension->Cylinders;
751 PartitionInfo->HiddenSectors = DeviceExtension->HiddenSectors;
807 Irp->IoStatus.Information = 0;
900 Irp->IoStatus.Information = 0;
907 Irp->IoStatus.Information = 0;
955 SystemVa =
Mdl->MappedSystemVa;
969 CurrentBase = SystemVa;
973 Irp->IoStatus.Information = 0;
1016 BytesLeft = CopyLength;
1029 if (!BytesLeft)
return Status;
1039 Irp->IoStatus.Information = 1;
1106 return ReturnStatus;
1127 Irp->IoStatus.Information = 0;
1190 DiskGeometry =
Irp->AssociatedIrp.SystemBuffer;
1216 Toc =
Irp->AssociatedIrp.SystemBuffer;
1301 GptInformation =
Irp->AssociatedIrp.SystemBuffer;
1306 GptInformation->
GptAttributes |= GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY;
1308 GptInformation->
GptAttributes |= GPT_BASIC_DATA_ATTRIBUTE_HIDDEN;
1310 GptInformation->
GptAttributes |= GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER;
1336 DPRINT1(
"IOCTL: 0x%lx is UNSUPPORTED!\n",
1396 sizeof(*DeviceRelations),
1398 if (DeviceRelations !=
NULL)
1403 DeviceRelations->
Count = 1;
1412 Irp->IoStatus.Information = (
ULONG_PTR)DeviceRelations;
1427 if (DeviceRelations)
1440 ListHead = &DeviceExtension->DiskList;
1441 NextEntry = ListHead->
Flink;
1442 while (NextEntry != ListHead)
1451 NextEntry = NextEntry->
Flink;
1455 FinalCount =
Count + DiskCount;
1464 if (!OurDeviceRelations)
1484 OurDeviceRelations->
Count = FinalCount;
1487 ListHead = &DeviceExtension->DiskList;
1488 NextEntry = ListHead->
Flink;
1489 while (NextEntry != ListHead)
1492 DriveDeviceObject = &OurDeviceRelations->
Objects[
Count];
1498 State = DriveExtension->State;
1516 *DriveDeviceObject++ = DriveExtension->PhysicalDeviceObject;
1522 NextEntry = NextEntry->
Flink;
1530 if (DeviceRelations)
ExFreePool(DeviceRelations);
1533 Irp->IoStatus.Information = (
ULONG_PTR)OurDeviceRelations;
1568 ListHead = &DeviceExtension->DiskList;
1569 NextEntry = ListHead->
Flink;
1570 while (NextEntry != ListHead)
1605 if (DeviceExtension->DriveDeviceName.Buffer)
1646 if (OutputString ==
NULL)
1652 wcsncpy(OutputString,
L"Ramdisk\\", StringLength /
sizeof(
WCHAR));
1655 wcsncat(OutputString,
L"RamVolume", StringLength /
sizeof(
WCHAR));
1659 wcsncat(OutputString,
L"RamDisk", StringLength /
sizeof(
WCHAR));
1675 if (OutputString ==
NULL)
1681 wcsncpy(OutputString,
L"Ramdisk\\", StringLength /
sizeof(
WCHAR));
1684 wcsncat(OutputString,
L"RamVolume", StringLength /
sizeof(
WCHAR));
1688 wcsncat(OutputString,
L"RamDisk", StringLength /
sizeof(
WCHAR));
1703 StringLength =
sizeof(
L"GenDisk");
1705 if (OutputString ==
NULL)
1711 wcsncpy(OutputString,
L"GenDisk", StringLength /
sizeof(
WCHAR));
1720 DriveExtension->GuidString.MaximumLength,
1722 if (OutputString ==
NULL)
1729 DriveExtension->GuidString.Buffer,
1730 DriveExtension->GuidString.MaximumLength /
sizeof(
WCHAR));
1801 switch (DeviceTextType)
1806 if (OutputString ==
NULL)
1812 wcsncpy(OutputString,
L"RamDisk",
sizeof(
L"RamDisk") /
sizeof(
WCHAR));
1820 if (OutputString ==
NULL)
1826 wcsncpy(OutputString,
L"RamDisk\\0",
sizeof(
L"RamDisk\\0") /
sizeof(
WCHAR));
1848 if (PnpBusInfo ==
NULL)
1914 Irp->IoStatus.Information = 0;
1932 if (DriveExtension->DriveDeviceName.Buffer)
1934 ExFreePool(DriveExtension->DriveDeviceName.Buffer);
1941 &GUID_DEVINTERFACE_VOLUME,
1943 &DriveExtension->DriveDeviceName);
1948 &RamdiskDiskInterface,
1950 &DriveExtension->DriveDeviceName);
1956 DriveExtension->DriveDeviceName.Buffer ==
NULL)
1966 sizeof(InstallState),
2090 QueryDeviceRelations.
Type,
2093 goto ReleaseAndReturn;
2111 goto ReleaseAndReturn;
2123 if (DeviceExtension->AttachedDevice)
2149 if (DeviceExtension !=
NULL)
2157 return PoCallDriver(DeviceExtension->AttachedDevice,
Irp);
2220 if (DeviceExtension !=
NULL)
2272 Irp->IoStatus.Information = 0;
2296 Irp->IoStatus.Information = 0;
2307 Irp->IoStatus.Information = 0;
2368 &RamdiskBusInterface,
2370 &DeviceExtension->BusDeviceName);
2381 DeviceExtension->AttachedDevice = AttachedDevice;
2382 if (!AttachedDevice)
2399 DPRINT1(
"FIXME: RamdiskAddDevice is UNSUPPORTED when being started from SETUPLDR!\n");
2417 PCHAR BootDeviceName, CommandLine;
2420 DPRINT(
"RAM Disk Driver Initialized\n");
2458 if ((
strlen(BootDeviceName) >= 10) &&
2459 !(
_strnicmp(BootDeviceName,
"ramdisk(0)", 10)))
2469 if (
strstr(CommandLine,
"RDEXPORTASCD"))
2476 if (
strstr(CommandLine,
"MININT"))
2489 DPRINT1(
"FIXME: Installing from RamDisk is UNSUPPORTED!\n");
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
PDEVICE_OBJECT PhysicalDeviceObject
#define FILE_DEVICE_SECURE_OPEN
#define IOCTL_DISK_CHECK_VERIFY
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
#define IOCTL_DISK_GET_MEDIA_TYPES
#define IOCTL_DISK_IS_WRITABLE
#define NT_SUCCESS(StatCode)
#define _strnicmp(_String1, _String2, _MaxCount)
DRIVER_INITIALIZE DriverEntry
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
#define FatUnpackBios(Bios, Pbios)
PACKED_BOOT_SECTOR * PPACKED_BOOT_SECTOR
#define UNIMPLEMENTED_DBGBREAK(...)
BOOLEAN ExportBootDiskAsCd
ULONG MarkRamdisksAsRemovable
VOID NTAPI RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
VOID NTAPI QueryParameters(IN PUNICODE_STRING RegistryPath)
NTSTATUS NTAPI RamdiskScsi(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI RamdiskCreateRamdisk(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN BOOLEAN ValidateOnly)
NTSTATUS NTAPI RamdiskGetPartitionInfo(IN PIRP Irp, IN PRAMDISK_DRIVE_EXTENSION DeviceExtension)
NTSTATUS NTAPI RamdiskSetPartitionInfo(IN PIRP Irp, IN PRAMDISK_DRIVE_EXTENSION DeviceExtension)
NTSTATUS NTAPI RamdiskQueryId(IN PRAMDISK_DRIVE_EXTENSION DriveExtension, IN PIRP Irp)
NTSTATUS NTAPI RamdiskDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
enum _RAMDISK_DEVICE_TYPE RAMDISK_DEVICE_TYPE
NTSTATUS NTAPI RamdiskQueryBusInformation(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
struct _RAMDISK_BUS_EXTENSION * PRAMDISK_BUS_EXTENSION
NTSTATUS NTAPI RamdiskCreateDiskDevice(IN PRAMDISK_BUS_EXTENSION DeviceExtension, IN PRAMDISK_CREATE_INPUT Input, IN BOOLEAN ValidateOnly, OUT PRAMDISK_DRIVE_EXTENSION *NewDriveExtension)
NTSTATUS NTAPI RamdiskQueryDeviceRelations(IN DEVICE_RELATION_TYPE Type, IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI RamdiskReadWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI RamdiskSystemControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI RamdiskFlushBuffers(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
UNICODE_STRING DriverRegistryPath
struct _RAMDISK_DRIVE_EXTENSION RAMDISK_DRIVE_EXTENSION
NTSTATUS NTAPI RamdiskRemoveBusDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI SendIrpToThread(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI RamdiskIoCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
NTSTATUS NTAPI RamdiskDeleteDiskDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
PDEVICE_OBJECT RamdiskBusFdo
ULONG ReportDetectedDevice
ULONG MaximumPerDiskViewLength
struct _RAMDISK_DRIVE_EXTENSION * PRAMDISK_DRIVE_EXTENSION
VOID NTAPI RamdiskUnload(IN PDRIVER_OBJECT DriverObject)
NTSTATUS NTAPI RamdiskReadWriteReal(IN PIRP Irp, IN PRAMDISK_DRIVE_EXTENSION DeviceExtension)
PVOID NTAPI RamdiskMapPages(IN PRAMDISK_DRIVE_EXTENSION DeviceExtension, IN LARGE_INTEGER Offset, IN ULONG Length, OUT PULONG OutputLength)
struct _RAMDISK_EXTENSION * PRAMDISK_EXTENSION
NTSTATUS NTAPI RamdiskAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
NTSTATUS NTAPI RamdiskOpenClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI RamdiskQueryCapabilities(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI RamdiskQueryDeviceText(IN PRAMDISK_DRIVE_EXTENSION DriveExtension, IN PIRP Irp)
struct _RAMDISK_BUS_EXTENSION RAMDISK_BUS_EXTENSION
@ RamdiskStateUninitialized
NTSTATUS NTAPI RamdiskPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
struct _RAMDISK_EXTENSION RAMDISK_EXTENSION
enum _RAMDISK_DEVICE_STATE RAMDISK_DEVICE_STATE
VOID NTAPI RamdiskUnmapPages(IN PRAMDISK_DRIVE_EXTENSION DeviceExtension, IN PVOID BaseAddress, IN LARGE_INTEGER Offset, IN ULONG Length)
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define DO_DEVICE_INITIALIZING
#define InitializeListHead(ListHead)
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
#define IOCTL_STORAGE_CHECK_VERIFY2
pRequest Complete(RequestStatus)
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
#define KeLeaveCriticalRegion()
#define KeEnterCriticalRegion()
PLOADER_PARAMETER_BLOCK KeLoaderBlock
PVOID NTAPI MmMapLockedPagesSpecifyCache(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN MEMORY_CACHING_TYPE CacheType, IN PVOID BaseAddress, IN ULONG BugCheckOnFailure, IN ULONG Priority)
#define ExFreePoolWithTag(_P, _T)
struct _GET_LENGTH_INFORMATION GET_LENGTH_INFORMATION
#define IOCTL_MOUNTDEV_QUERY_STABLE_GUID
#define IOCTL_DISK_GET_LENGTH_INFO
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
#define IOCTL_MOUNTDEV_QUERY_UNIQUE_ID
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define RTL_REGISTRY_OPTIONAL
#define IOCTL_CDROM_CHECK_VERIFY
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY
#define IOCTL_CDROM_READ_TOC
#define IOCTL_DISK_SET_PARTITION_INFO
#define IsRecognizedPartition(PartitionType)
struct _DISK_GEOMETRY DISK_GEOMETRY
#define IOCTL_DISK_GET_DRIVE_LAYOUT
struct _PARTITION_INFORMATION PARTITION_INFORMATION
#define IOCTL_DISK_GET_PARTITION_INFO
struct _PARTITION_INFORMATION * PPARTITION_INFORMATION
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define RAMDISK_MEMORY_MAPPED_DISK
#define RAMDISK_BOOT_DISK
struct _RAMDISK_CREATE_INPUT * PRAMDISK_CREATE_INPUT
#define RAMDISK_REGISTRY_DISK
struct _RAMDISK_CREATE_INPUT RAMDISK_CREATE_INPUT
#define FSCTL_CREATE_RAM_DISK
#define IOCTL_STORAGE_QUERY_PROPERTY
#define IOCTL_STORAGE_CHECK_VERIFY
#define IOCTL_STORAGE_GET_MEDIA_TYPES
#define IOCTL_VOLUME_GET_GPT_ATTRIBUTES
#define IOCTL_VOLUME_SET_GPT_ATTRIBUTES
#define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
#define IOCTL_VOLUME_OFFLINE
struct _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION VOLUME_GET_GPT_ATTRIBUTES_INFORMATION
#define IRP_MN_SURPRISE_REMOVAL
#define IoSkipCurrentIrpStackLocation(Irp)
#define IoCopyCurrentIrpStackLocationToNext(Irp)
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoDetachDevice(IN PDEVICE_OBJECT TargetDevice)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI IoRegisterDeviceInterface(IN PDEVICE_OBJECT PhysicalDeviceObject, IN CONST GUID *InterfaceClassGuid, IN PUNICODE_STRING ReferenceString OPTIONAL, OUT PUNICODE_STRING SymbolicLinkName)
NTSTATUS NTAPI IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, IN BOOLEAN Enable)
#define IoCompleteRequest
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
#define STATUS_DELETE_PENDING
#define STATUS_DEVICE_ALREADY_ATTACHED
#define STATUS_DEVICE_DOES_NOT_EXIST
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
NTSTATUS NTAPI IoReportDetectedDevice(_In_ PDRIVER_OBJECT DriverObject, _In_ INTERFACE_TYPE LegacyBusType, _In_ ULONG BusNumber, _In_ ULONG SlotNumber, _In_opt_ PCM_RESOURCE_LIST ResourceList, _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements, _In_ BOOLEAN ResourceAssigned, _Inout_ PDEVICE_OBJECT *DeviceObject)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define FILE_DEVICE_BUS_EXTENDER
#define FILE_DEVICE_CD_ROM
#define IRP_MJ_DEVICE_CONTROL
#define IOCTL_SCSI_MINIPORT
_CRTIMP wchar_t *__cdecl wcsncat(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
#define STATUS_MORE_PROCESSING_REQUIRED
#define STATUS_BUFFER_TOO_SMALL
TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS]
PDEVICE_OBJECT Objects[1]
struct _IO_STACK_LOCATION::@3974::@4001 DeviceCapabilities
struct _IO_STACK_LOCATION::@3974::@4005 QueryId
struct _IO_STACK_LOCATION::@3974::@3978 Read
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
struct _IO_STACK_LOCATION::@3974::@4006 QueryDeviceText
union _IO_STACK_LOCATION::@1575 Parameters
DEVICE_RELATION_TYPE Type
struct _LIST_ENTRY * Flink
struct _SETUP_LOADER_BLOCK * SetupLdrBlock
RAMDISK_CREATE_OPTIONS DiskOptions
UNICODE_STRING SymbolicLinkName
UNICODE_STRING GuidString
UNICODE_STRING BusDeviceName
UNICODE_STRING DriveDeviceName
RAMDISK_DEVICE_STATE State
PDEVICE_OBJECT DeviceObject
PDEVICE_OBJECT PhysicalDeviceObject
PDEVICE_OBJECT AttachedDevice
IO_REMOVE_LOCK RemoveLock
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_MEDIA_WRITE_PROTECTED
#define STATUS_INVALID_PARAMETER
#define STATUS_NO_SUCH_DEVICE
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING SymbolicLinkName
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
#define DeviceCapabilities
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
#define IoAcquireRemoveLock(RemoveLock, Tag)
#define IoReleaseRemoveLockAndWait(_RemoveLock, _Tag)
_In_ ULONG _In_ ULONG SectorsPerTrack
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo
#define IoReleaseRemoveLock(_RemoveLock, _Tag)
#define IoInitializeRemoveLock(Lock, AllocateTag, MaxLockedMinutes, HighWatermark)
#define IRP_MN_CANCEL_STOP_DEVICE
enum _DEVICE_INSTALL_STATE DEVICE_INSTALL_STATE
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
#define IRP_MN_START_DEVICE
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS
#define IRP_MN_REMOVE_DEVICE
@ DevicePropertyInstallState
struct _DEVICE_RELATIONS * PDEVICE_RELATIONS
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define IRP_MN_QUERY_STOP_DEVICE
#define IRP_MJ_SYSTEM_CONTROL
#define IRP_MN_QUERY_DEVICE_TEXT
#define IRP_MN_QUERY_CAPABILITIES
#define IRP_MN_QUERY_RESOURCES
#define IRP_MJ_FLUSH_BUFFERS
#define IO_DISK_INCREMENT
#define IRP_MN_CANCEL_REMOVE_DEVICE
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
#define IRP_MN_STOP_DEVICE
@ DeviceTextLocationInformation
enum _DEVICE_TEXT_TYPE DEVICE_TEXT_TYPE
@ BusQueryDeviceSerialNumber
enum _DEVICE_RELATION_TYPE DEVICE_RELATION_TYPE
#define IRP_MN_QUERY_POWER
#define IRP_MN_QUERY_BUS_INFORMATION
#define IRP_MN_QUERY_REMOVE_DEVICE
_Must_inspect_result_ _Outptr_result_bytebuffer_ ViewSize PVOID * MappedBase
#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, _Size)
#define MDL_SOURCE_IS_NONPAGED_POOL
#define MDL_MAPPED_TO_SYSTEM_VA
#define ObReferenceObject