This is the API definition in vb.net to access the master file table Imports System.Runtime.InteropServices Module APIDefination #Region "Functions to declared" Public Declare Auto Function CreateFile Lib "Kernal32.dll" (ByVal IpFileName As String, ByVal
DwDesiredAccess As Int32, ByVal DwShareMode As Int32, ByRef IpSecurityAttributes As SECURITY_ATTRIBUTES, ByVal DwCreationDisposion As Int32, ByVal DwFlagsAndAttributes As Int32, ByVal TempletFile As IntPtr) As Integer Public Declare Auto Function ReadFile
Lib "kernal32.dll" (ByVal Ref As Integer, ByVal IpBuffer As Byte(), ByVal NumberOfBytesToRead As Integer, ByRef NumberOfBytea As Integer, ByRef OverLapped As System.Threading.NativeOverlapped) As Boolean <DllImport("kernal32.dll", SetLastError:=True)> Function
WaitforSingleObject(ByVal handel As IntPtr, ByVal milliseconds As UInt32) As UInt32 End Function Public Declare Auto Function CloseHandel Lib "kernal32.dll" (ByVal hobject As IntPtr) As Boolean #End Region #Region "Constants" Public Const INFINATE As UInt32
= &HFFFFFFFFUI Public Const WAIT_ABANDONED As UInt32 = &H80UI Public Const WAIT_OBJECT_0 As UInt32 = &H0UI Public Const WAIT_TIMEOUT As UInt32 = &H102UI Public Const GENERIC_READ As Int32 = &H80000000 Public Const GENERIC_WRITE As Int32 = &H4000000 Public
Const OPEN_EXESTING As Int32 = &H3 Public Const FILE_ATTRIBUTES_NORMAL As Int32 = &H80 Public Const FILE_FLAG_OVERLAPPED As Int32 = &H40000000 Public Const FILE_SHARE_READ = &H1 Public Const INVALID_HANDEL_VALUE = -1 Public Const INVALID_SET_FILE_POINTER =
-1 Public Const FILE_BEGIN = 0 #End Region #Region "Structures" Public Structure SECURITY_ATTRIBUTES Dim nLength As Integer Dim lpSecurityDescription As Integer Dim InheritHandel As Boolean End Structure <StructLayout(LayoutKind.Sequential)> Public Structure
MFTAttributes Dim Attributetype As Int32 Dim length As Int32 Dim NonResFlag As Byte Dim NameLength As Byte Dim offsetToTheName As Int16 Dim Flags As Int16 Dim AttributeID As Int16 Dim Lengthoftheattributes As Int32 Dim indexedFlag As Byte Dim padding As Byte
End Structure #End Region End Module
↧