1
我得到一個消息如何獲得StartingOffset屬性的值類Win32_DiskPartition
法「StartingOffset」沒有自動化對象的支持。
這裏是我的代碼的一小部分:從here
colLogicalDisks := objWMIService.ExecQuery('ASSOCIATORS OF {Win32_DiskPartition.DeviceID="'+VarToStr(objPartition.DeviceID)+'"} WHERE AssocClass = Win32_LogicalDiskToPartition');
oEnumLogical := IUnknown(colLogicalDisks._NewEnum) as IEnumVariant;
while oEnumLogical.Next(1, objLogicalDisk, iValue) = 0 do
begin
ShowMessage(objLogicalDisk.StartingOffset);
driveletter := string(objLogicalDisk.DeviceID);
if driveletter = ExtractFileDrive(GetCurrentDir) then
begin
SetLength(result, 6);
result[0] := string(objdiskDrive.DeviceID);
result[1] := string(objdiskDrive.Model);
result[2] := string(objdiskDrive.MediaType);
result[3] := string(ConvertBytes(objdiskDrive.Size));
result[4] := string(objLogicalDisk.Description);
result[5] := string(ConvertBytes(objLogicalDisk.Size));
end;
objLogicalDisk:=Unassigned;
end;
源代碼
訪問
StartingOffset
屬性 – nguyentu「System Reserved」分區沒有結果... – nguyentu