RawDisk

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

RawDisk.GetSectorSize method

Filter:

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

RawDisk     See also    

Overview

Returns the size of the sector on given disk device

Declaration

[Pascal]
    class function GetSectorSize(DiskHandle : THandle) : DWORD;

[C++ (DLL/Lib)]
    static unsigned long GetSectorSize( const HANDLE DiskHandle);

[C++ (VCL)]
    static unsigned long __fastcall GetSectorSize( const THandle DiskHandle);

[C++ (.NET)]
    static UInt32 GetSectorSize( IntPtr DiskHandle);

[C#]
    static UInt32 GetSectorSize( IntPtr DiskHandle);

[VB.NET]
    Shared Function GetSectorSize( ByVal DiskHandle As IntPtr) As UInt32

Parameters

  • DiskHandle - the handle of the opened disk device

Description

Use this method to get information about the size 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

GetSectorCount     Open     OpenEx    

Back to top