Funktionreferenz


_WinAPI_GetDriveGeometryEx


Retrieves extended information about the disk's geometry

#include <WinAPIFiles.au3>
_WinAPI_GetDriveGeometryEx ( $iDrive )

Parameter

$iDrive The physical drive number (0, 1, 2, etc) to retrieve information.

Rückgabewert

Success: The array containing the following information:
[0] - The number of cylinders.
[1] - The type of media.
[2] - The number of tracks per cylinder.
[3] - The number of sectors per track.
[4] - The number of bytes per sector.
[5] - The disk size, in bytes.
Failure: Sets the @error flag to non-zero.

Bemerkungen

None.

Siehe auch

Suche nach IOCTL_DISK_GET_DRIVE_GEOMETRY_EX in der MSDN Bibliothek.

Beispiel

#include <WinAPIFiles.au3>

Local $aData, $iDrive = 0

While 1
    $aData = _WinAPI_GetDriveGeometryEx($iDrive)
    If @error Then
        ExitLoop
    EndIf
    If Not $iDrive Then
        ConsoleWrite('-------------------------------' & @CRLF)
    EndIf
    ConsoleWrite('Laufwerk: ' & $iDrive & @CRLF)
    ConsoleWrite('Zylinder: ' & $aData[0] & @CRLF)
    ConsoleWrite('Tracks pro Zylinderr: ' & $aData[2] & @CRLF)
    ConsoleWrite('Sektoren pro Track: ' & $aData[3] & @CRLF)
    ConsoleWrite('Bytes pro Sektor: ' & $aData[4] & @CRLF)
    ConsoleWrite('Gesamter Speicher: ' & $aData[5] & ' Bytes' & @CRLF)
    ConsoleWrite('-------------------------------' & @CRLF)
    $iDrive += 1
WEnd