31#if !defined(__REACTOS__) || defined(_MSC_VER)
32#pragma warning(disable:4214)
33#pragma warning(disable:4201)
51#define NonPagedPoolNx NonPagedPool
52#define NonPagedPoolNxCacheAligned NonPagedPoolCacheAligned
55#define MODE_DATA_SIZE 192
56#define SCSI_FLOPPY_TIMEOUT 20
57#define SFLOPPY_SRB_LIST_SIZE 4
65#define NUMBER_OF_DRIVE_TYPES 7
66#define DRIVE_TYPE_120M 4
67#define DRIVE_TYPE_NONE NUMBER_OF_DRIVE_TYPES
171#define SECTORLENGTHCODE_TO_BYTESHIFT 7
220#define NUMBER_OF_DRIVE_MEDIA_COMBINATIONS sizeof(DriveMediaConstants)/sizeof(DRIVE_MEDIA_CONSTANTS)
258 {0x000500, 0x0200,
TRUE},
259 {0x0005A0, 0x0200,
TRUE},
260 {0x000960, 0x0200,
TRUE},
261 {0x0004D0, 0x0400,
TRUE},
262 {0x000B40, 0x0200,
TRUE},
263 {0x000D20, 0x0200,
FALSE},
264 {0x010000, 0x0200,
TRUE},
265 {0x03C300, 0x0200,
TRUE},
266 {0x0600A4, 0x0200,
TRUE},
267 {0x072A00, 0x0200,
TRUE}
298#define FLOPPY_CAPACITIES (sizeof(FloppyCapacities)/sizeof(FloppyCapacities[0]))
306#pragma pack (push, 1)
478#pragma alloc_text(INIT, DriverEntry)
480#pragma alloc_text(PAGE, ScsiFlopUnload)
481#pragma alloc_text(PAGE, ScsiFlopAddDevice)
482#pragma alloc_text(PAGE, CreateFlopDeviceObject)
483#pragma alloc_text(PAGE, ScsiFlopStartDevice)
484#pragma alloc_text(PAGE, ScsiFlopRemoveDevice)
485#pragma alloc_text(PAGE, IsFloppyDevice)
486#pragma alloc_text(PAGE, DetermineMediaType)
487#pragma alloc_text(PAGE, DetermineDriveType)
488#pragma alloc_text(PAGE, FlCheckFormatParameters)
489#pragma alloc_text(PAGE, FormatMedia)
490#pragma alloc_text(PAGE, FlopticalFormatMedia)
491#pragma alloc_text(PAGE, USBFlopGetMediaTypes)
492#pragma alloc_text(PAGE, USBFlopFormatTracks)
594#if !defined(__REACTOS__) || defined(_MSC_VER)
596#pragma warning(disable:28152)
684 DebugPrint((3,
"CreateFlopDeviceObject: Enter routine\n"));
709 "\\Device\\Floppy%u",
723 DebugPrint((1,
"CreateFlopDeviceObjects: Can not create device\n"));
724 goto CreateFlopDeviceObjectExit;
796 goto CreateFlopDeviceObjectExit;
809CreateFlopDeviceObjectExit:
818#if !defined(__REACTOS__) || defined(_MSC_VER)
845 if (senseData ==
NULL) {
871 ClassInitializeMediaChangeDetection(fdoExtension,
878 timeOut = ClassQueryTimeOutRegistryValue(
Fdo);
922 (
LPGUID) &GUID_DEVINTERFACE_FLOPPY,
930 DebugPrint((1,
"ScsiFlopStartDevice: Unable to register device "
931 "interface for fdo %p [%08lx]\n",
939#if !defined(__REACTOS__) || defined(_MSC_VER)
940#pragma warning(suppress:6262)
958 WCHAR ntNameBuffer[256];
961 WCHAR arcNameBuffer[256];
979 sizeof(ntNameBuffer),
980 L"\\Device\\Floppy%u",
1001 sizeof(scsiAddress),
1025 sizeof(arcNameBuffer),
1026 L"\\ArcName\\scsi(%u)disk(%u)fdisk(%u)",
1047 sizeof(arcNameBuffer),
1048 L"\\ArcName\\multi(%u)disk(%u)fdisk(%u)",
1071 DebugPrint((1,
"ScsiFlopStartDevice: Unable to set device "
1072 "interface state to TRUE for fdo %p "
1152 ULONG outputBufferLength;
1163 Irp->IoStatus.Information = 0;
1330 DebugPrint((3,
"ScsiDeviceIoControl: Get drive geometry\n"));
1355 Irp->IoStatus.Information = 0;
1395 outputBufferLength =
1418 ( highestDriveMediaType - lowestDriveMediaType + 1 ) ) ) {
1428 ( outputBufferLength /
1434 for (
i = (
UCHAR)lowestDriveMediaType;
i <= (
UCHAR)highestDriveMediaType;
i++ ) {
1533 if (modeData ==
NULL) {
1577 DebugPrint((3,
"ScsiIoDeviceControl: Unsupported device IOCTL\n"));
1657 if (modeData ==
NULL) {
1715 if (pageData !=
NULL) {
1717 DebugPrint((1,
"ScsiFlop: Flexible disk page found, This is a floppy.\n"));
1843 if (readData ==
NULL) {
1858 srb->CdbLength = 10;
1861 srb->Cdb[8] = (
UCHAR) 1;
1881 char *pchar = (
char *)readData;
1926 UCHAR numberOfHeads;
1927 UCHAR sectorsPerTrack;
1939 if (modeData ==
NULL) {
1981 if ((pageData !=
NULL) &&
1982 (pageData->PageLength + 2 >=
1989 numberOfHeads = pageData->NumberOfHeads;
1990 maximumTrack = pageData->NumberOfCylinders[1];
1991 maximumTrack |= pageData->NumberOfCylinders[0] << 8;
1992 sectorsPerTrack = pageData->SectorsPerTrack;
2038 if (!applyFix && maximumTrack >= 0x0100) {
2122 LowestDriveMediaType ) ) {
2131#if !defined(__REACTOS__) || defined(_MSC_VER)
2132#pragma warning(push)
2133#pragma warning(disable:33010)
2143 if ( ( FormatParameters->StartHeadNumber >
2145 ( FormatParameters->EndHeadNumber >
2147 ( FormatParameters->StartCylinderNumber >
2149 ( FormatParameters->EndCylinderNumber >
2151 ( FormatParameters->EndCylinderNumber <
2152 FormatParameters->StartCylinderNumber ) ) {
2161#if !defined(__REACTOS__) || defined(_MSC_VER)
2204 if (modeData ==
NULL) {
2230 if ((pageData ==
NULL) ||
2319 srb->
Cdb[1] |= 0x10;
2442 largeInt.QuadPart = 1;
2483 struct _START_STOP *startStopCdb;
2485 DebugPrint((2,
"Sending SCSIOP_START_STOP_UNIT\n"));
2494#if (NTDDI_VERSION >= NTDDI_WIN8)
2506 startStopCdb = (
struct _START_STOP *)srb->Cdb;
2509 startStopCdb->Start = 1;
2545 DebugPrint((1,
"ScsiFlopProcessError: Reinitializing the floppy.\n"));
2559 if (
SUCCEEDED(ULongAdd(tmpSize, (
ULONG) alignment, &sizeNeeded))) {
2581#if (NTDDI_VERSION >= NTDDI_WIN8)
2593 srb->DataTransferLength = 0x2a;
2609 cdb = (
PCDB)srb->Cdb;
2611 cdb->MODE_SENSE.PageCode = 0x2e;
2612 cdb->MODE_SENSE.AllocationLength = 0x2a;
2640 srb->DataTransferLength,
2663 srb->OriginalRequest =
irp;
2669 irpStack->Parameters.Others.Argument1 = (
PVOID)srb;
2864 DebugPrint((1,
"ScsiFlopRemoveDevice: Unable to set device "
2865 "interface state to FALSE for fdo %p "
2932 ULONG ioControlCode;
2935 ULONG outputBufferLength;
2938 ULONG dataTransferLength;
2939 struct _READ_FORMATTED_CAPACITIES *cdb;
2955 Irp->IoStatus.Information = 0;
2969 outputBufferEnd = outputBuffer +
2979 outputBuffer =
NULL;
2981 outputBufferEnd =
NULL;
2983 outputBufferLength = 0;
3025 ASSERT(dataTransferLength < 0x100);
3041 srb->
CdbLength =
sizeof(
struct _READ_FORMATTED_CAPACITIES);
3045 cdb = (
struct _READ_FORMATTED_CAPACITIES *)srb->
Cdb;
3048 cdb->AllocationLength[1] = (
UCHAR)dataTransferLength;
3073 ULONG NumberOfBlocks;
3077 LONG currentGeometry;
3102 currentGeometry = -1;
3132 capacityMatches[
j] =
TRUE;
3139 currentGeometry =
j;
3157 capacityMatches[
j] =
TRUE;
3160 currentGeometry =
j;
3175 if (currentGeometry != -1)
3192 DebugPrint((2,
"geometry is: %3d %2d %d %2d %4d %2d %08X\n",
3227 if (outputBuffer < outputBufferEnd)
3233 DebugPrint((2,
"geometry : %3d %2d %d %2d %4d\n",
3337 if (geometry ==
NULL)
3389 if (parameterList ==
NULL)
3427 cylinder <= formatParameters->EndCylinderNumber;
3431 head <= formatParameters->EndHeadNumber;
3477 DebugPrint((2,
"geometry was: %3d %2d %d %2d %4d %2d %08X\n",
3499 DebugPrint((2,
"geometry is: %3d %2d %d %2d %4d %2d %08X\n",
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
struct outqueuenode * head
_In_ PSCSI_REQUEST_BLOCK Srb
#define TEST_FLAG(Flags, Bit)
#define MODE_FD_MAXIMUM_TYPE
#define MODE_FD_SINGLE_SIDE
#define DIRECT_ACCESS_DEVICE
#define SCSI_SENSE_MEDIUM_ERROR
#define SCSIOP_FORMAT_UNIT
struct _MODE_PARAMETER_HEADER MODE_PARAMETER_HEADER
#define MODE_SENSE_RETURN_ALL
#define SENSE_BUFFER_SIZE
#define SCSIOP_MODE_SENSE
#define SCSI_SENSE_UNIT_ATTENTION
#define SCSI_SENSEQ_INIT_COMMAND_REQUIRED
#define SCSI_ADSENSE_MEDIUM_CHANGED
#define MODE_DSP_WRITE_PROTECT
#define SCSIOP_START_STOP_UNIT
#define SCSIOP_MODE_SELECT
#define SCSI_SENSE_NOT_READY
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
#define IOCTL_DISK_VERIFY
#define IOCTL_DISK_GET_MEDIA_TYPES
#define IOCTL_DISK_IS_WRITABLE
#define IOCTL_DISK_FORMAT_TRACKS
NTSTATUS ScsiFlopStartDevice(IN PDEVICE_OBJECT Fdo)
struct _DRIVE_MEDIA_CONSTANTS * PDRIVE_MEDIA_CONSTANTS
ULONG DetermineDriveType(PDEVICE_OBJECT DeviceObject)
DISK_GEOMETRY FloppyGeometries[]
#define FLOPPY_CAPACITIES
struct _FORMATTED_CAPACITY FORMATTED_CAPACITY
NTSTATUS FormatMedia(PDEVICE_OBJECT DeviceObject, MEDIA_TYPE MediaType)
struct _FORMAT_UNIT_PARAMETER_LIST * PFORMAT_UNIT_PARAMETER_LIST
NTSTATUS DetermineMediaType(PDEVICE_OBJECT DeviceObject)
NTSTATUS ScsiFlopReadWriteVerification(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
struct _DRIVE_MEDIA_CONSTANTS DRIVE_MEDIA_CONSTANTS
struct _CDB12FORMAT * PCDB12FORMAT
VOID ScsiFlopProcessError(PDEVICE_OBJECT DeviceObject, PSCSI_REQUEST_BLOCK Srb, NTSTATUS *Status, BOOLEAN *Retry)
NTSTATUS CreateFlopDeviceObject(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PortDeviceObject, IN ULONG DeviceCount)
NTSTATUS USBFlopGetMediaTypes(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
BOOLEAN FindScsiFlops(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath, IN PCLASS_INIT_DATA InitializationData, IN PDEVICE_OBJECT PortDeviceObject, IN ULONG PortNumber)
DRIVE_MEDIA_CONSTANTS DriveMediaConstants[]
DRIVE_MEDIA_LIMITS DriveMediaLimits[NUMBER_OF_DRIVE_TYPES]
DRIVER_INITIALIZE DriverEntry
struct _DEFECT_LIST_HEADER DEFECT_LIST_HEADER
struct _CDB12FORMAT CDB12FORMAT
struct _FORMAT_UNIT_PARAMETER_LIST FORMAT_UNIT_PARAMETER_LIST
#define SCSI_FLOPPY_TIMEOUT
DRIVER_ADD_DEVICE ScsiFlopAddDevice
#define NUMBER_OF_DRIVE_MEDIA_COMBINATIONS
BOOLEAN IsFloppyDevice(PDEVICE_OBJECT DeviceObject)
DRIVER_UNLOAD ScsiFlopUnload
enum _DRIVE_MEDIA_TYPE DRIVE_MEDIA_TYPE
NTSTATUS ScsiFlopRemoveDevice(IN PDEVICE_OBJECT Fdo, IN UCHAR Type)
#define NUMBER_OF_DRIVE_TYPES
struct _DEFECT_LIST_HEADER * PDEFECT_LIST_HEADER
NTSTATUS FlopticalFormatMedia(PDEVICE_OBJECT DeviceObject, PFORMAT_PARAMETERS Format)
struct _DISK_DATA DISK_DATA
struct _DRIVE_MEDIA_LIMITS DRIVE_MEDIA_LIMITS
struct _DISK_DATA * PDISK_DATA
NTSTATUS ScsiFlopInitDevice(IN PDEVICE_OBJECT Fdo)
NTSTATUS ScsiFlopDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
struct _FORMATTED_CAPACITY * PFORMATTED_CAPACITY
#define SFLOPPY_SRB_LIST_SIZE
NTSTATUS USBFlopFormatTracks(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
BOOLEAN FlCheckFormatParameters(IN PDEVICE_OBJECT DeviceObject, IN PFORMAT_PARAMETERS FormatParameters)
FORMATTED_CAPACITY FloppyCapacities[]
NTSTATUS ScsiFlopStopDevice(IN PDEVICE_OBJECT Fdo, IN UCHAR Type)
struct _DRIVE_MEDIA_LIMITS * PDRIVE_MEDIA_LIMITS
_In_ PSCSI_REQUEST_BLOCK _Out_ NTSTATUS _Inout_ BOOLEAN * Retry
_In_ PVOID _In_ PCLASS_INIT_DATA InitializationData
struct _CLASS_INIT_DATA CLASS_INIT_DATA
#define ClassAcquireRemoveLock(devobj, tag)
SCSIPORT_API NTSTATUS NTAPI ClassSendSrbAsynchronous(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_ PIRP Irp, _In_reads_bytes_opt_(BufferLength) __drv_aliasesMem PVOID BufferAddress, _In_ ULONG BufferLength, _In_ BOOLEAN WriteToDevice)
struct _FUNCTIONAL_DEVICE_EXTENSION FUNCTIONAL_DEVICE_EXTENSION
#define NT_SUCCESS(StatCode)
PVOID NTAPI ClassFindModePage(_In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode, _In_ BOOLEAN Use6Byte)
ULONG NTAPI ClassModeSense(_In_ PDEVICE_OBJECT Fdo, _In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode)
NTSTATUS NTAPI ClassSendSrbSynchronous(_In_ PDEVICE_OBJECT Fdo, _Inout_ PSCSI_REQUEST_BLOCK _Srb, _In_reads_bytes_opt_(BufferLength) PVOID BufferAddress, _In_ ULONG BufferLength, _In_ BOOLEAN WriteToDevice)
NTSTATUS NTAPI ClassAsynchronousCompletion(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
_Must_inspect_result_ NTSTATUS NTAPI ClassReadDriveCapacity(_In_ PDEVICE_OBJECT Fdo)
VOID NTAPI ClassCompleteRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ CCHAR PriorityBoost)
VOID NTAPI ClassReleaseRemoveLock(_In_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Tag)
#define SCSI_REQUEST_BLOCK_SIZE
#define SRB_FUNCTION_EXECUTE_SCSI
#define SRB_STATUS_DATA_OVERRUN
#define SRB_STATUS_AUTOSENSE_VALID
#define SRB_FLAGS_DISABLE_AUTOSENSE
#define SRB_FLAGS_DATA_IN
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER
#define SRB_STATUS(Status)
#define KeRaiseIrql(irql, oldIrql)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define RtlCompareMemory(s1, s2, l)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeLowerIrql(oldIrql)
#define ExAllocatePool(type, size)
MxDeviceObject deviceObject
GLuint GLuint GLsizei count
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Windows helper functions for integer overflow prevention.
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Returns a pointer to the I/O manager's global configuration information structure.
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
static DRIVER_DISPATCH ClassDeviceControl
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define FILE_FLOPPY_DISKETTE
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define FILE_REMOVABLE_MEDIA
#define UNREFERENCED_PARAMETER(P)
struct _FORMAT_PARAMETERS * PFORMAT_PARAMETERS
struct _DISK_GEOMETRY DISK_GEOMETRY
enum _MEDIA_TYPE MEDIA_TYPE
#define IOCTL_DISK_GET_PARTITION_INFO
struct _DISK_GEOMETRY * PDISK_GEOMETRY
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, 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)
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
PIRP NTAPI IoBuildAsynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PIO_STATUS_BLOCK IoStatusBlock)
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
VOID NTAPI IoSetHardErrorOrVerifyDevice(IN PIRP Irp, IN PDEVICE_OBJECT DeviceObject)
#define STATUS_OBJECT_NAME_EXISTS
NTSTRSAFEVAPI RtlStringCbPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
NTSTRSAFEVAPI RtlStringCbPrintfW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
#define IOCTL_SCSI_GET_ADDRESS
#define offsetof(TYPE, MEMBER)
struct _FORMATTED_CAPACITY_LIST FORMATTED_CAPACITY_LIST
#define MODE_PAGE_FLEXIBILE
struct _FORMATTED_CAPACITY_DESCRIPTOR FORMATTED_CAPACITY_DESCRIPTOR
struct _FORMATTED_CAPACITY_LIST * PFORMATTED_CAPACITY_LIST
#define SCSIOP_READ_FORMATTED_CAPACITY
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
LARGE_INTEGER StartingOffset
PDEVICE_OBJECT DeviceObject
PDEVICE_OBJECT LowerDeviceObject
struct _FUNCTIONAL_DEVICE_EXTENSION * PartitionZeroExtension
LARGE_INTEGER PartitionLength
UNICODE_STRING FloppyInterfaceString
DISK_GEOMETRY DiskGeometry
COMMON_DEVICE_EXTENSION CommonExtension
PSTORAGE_ADAPTER_DESCRIPTOR AdapterDescriptor
PSTORAGE_DEVICE_DESCRIPTOR DeviceDescriptor
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
UCHAR NumberOfCylinders[2]
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_IO_DEVICE_ERROR
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_UNRECOGNIZED_MEDIA
#define STATUS_MEDIA_WRITE_PROTECTED
#define STATUS_INVALID_PARAMETER
#define STATUS_NO_SUCH_DEVICE
#define STATUS_NONEXISTENT_SECTOR
#define STATUS_UNSUCCESSFUL
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_VERIFY_REQUIRED
#define STATUS_INSUFFICIENT_RESOURCES
struct _CDB::_CDB10 CDB10
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFDEVICE Fdo
WDF_EXTERN_C_START typedef _Must_inspect_result_ _In_ WDFDRIVER _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT Pdo
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
#define IoIsErrorUserInduced(Status)
_In_ ULONG _In_ ULONG _In_ ULONG NumberOfHeads
#define IoAssignArcName(_ArcName, _DeviceName)
_In_ ULONG _In_ ULONG SectorsPerTrack
#define SL_OVERRIDE_VERIFY_VOLUME
IO_COMPLETION_ROUTINE * PIO_COMPLETION_ROUTINE
#define IRP_MN_REMOVE_DEVICE
#define IRP_MJ_FLUSH_BUFFERS
#define IRP_MN_CANCEL_REMOVE_DEVICE
#define IRP_MN_QUERY_REMOVE_DEVICE