ВУЗ:
Составители:
106
{
PDISK_GEOMETRY outputBuffer;
outputBuffer = ( PDISK_GEOMETRY ) Irp-
AssociatedIrp.SystemBuffer;
outputBuffer->MediaType = RemovableMedia;
outputBuffer->Cylinders = RtlConvertUlongToLargeInteger(
diskExtension->NumberOfCylinders );
outputBuffer->TracksPerCylinder =
diskExtension->TracksPerCylinder;
outputBuffer->SectorsPerTrack = diskExtension-
>SectorsPerTrack;
outputBuffer->BytesPerSector = diskExtension-
>BytesPerSector;
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = sizeof( DISK_GEOMETRY );
}
break;
case IOCTL_DISK_GET_PARTITION_INFO:
… Возвращает информацию о разделе
{
PPARTITION_INFORMATION outputBuffer;
PBOOT_SECTOR bootSector =
(PBOOT_SECTOR) diskExtension->DiskImage;
outputBuffer = ( PPARTITION_INFORMATION )Irp-
>AssociatedIrp.SystemBuffer;
outputBuffer->PartitionType =
(bootSector->bsFileSystemType[4] == '6') ?
PARTITION_FAT_16 : PARTITION_FAT_12;
outputBuffer->BootIndicator = FALSE;
outputBuffer->RecognizedPartition = TRUE;
outputBuffer->RewritePartition = FALSE;
outputBuffer->StartingOffset =
RtlConvertUlongToLargeInteger(0);
outputBuffer->PartitionLength =
RtlConvertUlongToLargeInteger(diskExtension-
>DiskLength);
outputBuffer->HiddenSectors = 1L;
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = sizeof( PARTITION_INFORMATION
);
}
break;
case IOCTL_DISK_VERIFY:
{
Выполняет проверку носителя. Операция идентична чтению
{ PDISK_GEOMETRY outputBuffer; outputBuffer = ( PDISK_GEOMETRY ) Irp- AssociatedIrp.SystemBuffer; outputBuffer->MediaType = RemovableMedia; outputBuffer->Cylinders = RtlConvertUlongToLargeInteger( diskExtension->NumberOfCylinders ); outputBuffer->TracksPerCylinder = diskExtension->TracksPerCylinder; outputBuffer->SectorsPerTrack = diskExtension- >SectorsPerTrack; outputBuffer->BytesPerSector = diskExtension- >BytesPerSector; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof( DISK_GEOMETRY ); } break; case IOCTL_DISK_GET_PARTITION_INFO: … Возвращает информацию о разделе { PPARTITION_INFORMATION outputBuffer; PBOOT_SECTOR bootSector = (PBOOT_SECTOR) diskExtension->DiskImage; outputBuffer = ( PPARTITION_INFORMATION )Irp- >AssociatedIrp.SystemBuffer; outputBuffer->PartitionType = (bootSector->bsFileSystemType[4] == '6') ? PARTITION_FAT_16 : PARTITION_FAT_12; outputBuffer->BootIndicator = FALSE; outputBuffer->RecognizedPartition = TRUE; outputBuffer->RewritePartition = FALSE; outputBuffer->StartingOffset = RtlConvertUlongToLargeInteger(0); outputBuffer->PartitionLength = RtlConvertUlongToLargeInteger(diskExtension- >DiskLength); outputBuffer->HiddenSectors = 1L; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof( PARTITION_INFORMATION ); } break; case IOCTL_DISK_VERIFY: { Выполняет проверку носителя. Операция идентична чтению 106
Страницы
- « первая
- ‹ предыдущая
- …
- 104
- 105
- 106
- 107
- 108
- …
- следующая ›
- последняя »