RawDisk

Direct access to disks and protected files from user-mode applications in Windows

RawDisk.GetSectorCount method

Filter:

Pascal    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

RawDisk     See also    

Overview

Returns the number of sectors on given disk device

Declaration

[Pascal]
    class function GetSectorCount( DiskHandle : THandle) : int64;

[C++ (DLL/Lib)]
    static __int64 GetSectorCount( const HANDLE DiskHandle);

[C++ (VCL)]
    static __int64 __fastcall GetSectorCount( const THandle DiskHandle);

[C++ (.NET)]
    static Int64 GetSectorCount( IntPtr DiskHandle);

[C#]
    static Int64 GetSectorCount( IntPtr DiskHandle);

[VB.NET]
    Shared Function GetSectorCount( ByVal DiskHandle As IntPtr) As Int64

Parameters

  • DiskHandle - the handle of the opened disk device

Description

Use this method to get information about the number of sectors on the device. The handle to the device must have been obtained using Open() or OpenEx() methods.

If the method fails for whatever reason, an exception with Windows-defined error code is thrown.

See also

GetSectorSize     Open     OpenEx    

Back to top