@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Returned by http://www.pinvoke.net/default.aspx/kernel32.GetFileInformationByHandle !!!!C# Definition: [StructLayout(LayoutKind.Sequential, Pack=4)] struct BY_HANDLE_FILE_INFORMATION { public uint FileAttributes; public FILETIME CreationTime; public FILETIME LastAccessTime; public FILETIME LastWriteTime; public uint VolumeSerialNumber; public uint FileSizeHigh; public uint FileSizeLow; public uint NumberOfLinks; public uint FileIndexHigh; public uint FileIndexLow; } !!!!VB Definition: <StructLayout(LayoutKind.Explicit)> _ Structure BY_HANDLE_FILE_INFORMATION <FieldOffset(0)> Public dwFileAttributes As Int32 <FieldOffset(4)> Public ftCreationTime As Int64 ' FILETIME <FieldOffset(12)> Public ftLastAccessTime As Int64 ' FILETIME <FieldOffset(20)> Public ftLastWriteTime As Int64 ' FILETIME <FieldOffset(28)> Public dwVolumeSerialNumber As Int32 <FieldOffset(32)> Public nFileSizeHigh As Int32 <FieldOffset(36)> Public nFileSizeLow As Int32 <FieldOffset(40)> Public nNumberOfLinks As Int32 <FieldOffset(44)> Public nFileIndexHigh As Int32 <FieldOffset(48)> Public nFileIndexLow As Int32 End Structure !!!F# Definition: [<Struct>] [<StructLayout(LayoutKind.Sequential)>] type BY_HANDLE_FILE_INFORMATION = val mutable FileAttributes:UInt32 val mutable CreationTime:FILETIME val mutable LastAccessTime:FILETIME val mutable LastWriteTime:FILETIME val mutable VolumeSerialNumber:UInt32 val mutable FileSizeHigh:UInt32 val mutable FileSizeLow:UInt32 val mutable NumberOfLinks:UInt32 val mutable FileIndexHigh:UInt32 val mutable FileIndexLow:UInt32 !!!!User-Defined Field Types: None. !!!!Notes: In C# You must remember about alignment! So, You can use `Pack': [StructLayout(LayoutKind.Sequential, Pack=4)] Or, as is in VB example, use: [StructLayout(LayoutKind.Explicit)] with [FieldOffset()] for every field of structure. This is, I think, better way. Otherwise, You can get strange values in fields after GetFileInformationByHandle - in Win/64 Documentation: BY_HANDLE_FILE_INFORMATION@msdn on MSDN
Edit Structures.BY_HAN...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.