MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2QueryMediaType

Function Ext2QueryMediaType

Ext2Mgr/enumDisk.cpp:1115–1142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1113}
1114
1115NT::NTSTATUS
1116Ext2QueryMediaType(
1117 HANDLE Handle,
1118 PDWORD MediaType
1119 )
1120{
1121 NT::NTSTATUS status;
1122 NT::IO_STATUS_BLOCK ioSb;
1123 PGET_MEDIA_TYPES mediaTypes;
1124 UCHAR buffer[1024];
1125
1126 status = NT::ZwDeviceIoControlFile(
1127 Handle, NULL, NULL, NULL, &ioSb,
1128 IOCTL_STORAGE_GET_MEDIA_TYPES_EX,
1129 NULL, 0, buffer, 1024 );
1130
1131
1132 if (!NT_SUCCESS(status)) {
1133 goto errorout;
1134 }
1135
1136 mediaTypes = (PGET_MEDIA_TYPES) buffer;
1137 *MediaType = mediaTypes->DeviceType;
1138
1139errorout:
1140
1141 return status;
1142}
1143
1144/*
1145 * Ext2Read

Callers 1

Ext2LoadCdromsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected