@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The GetFileInformationByHandleEx API !!!!C# Signature: [DllImport("kernel32.dll", SetLastError = true)] private static extern bool GetFileInformationByHandleEx(IntPtr hFile, FILE_INFO_BY_HANDLE_CLASS infoClass, out FILE_ID_BOTH_DIR_INFO dirInfo, uint dwBufferSize); !!!!VB Signature: Declare Function GetFileInformationByHandleEx Lib "kernel32.dll" (TODO) As TODO !!!!User-Defined Types: None. !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: http://www.pinvoke.net/default.aspx/Enums/FILE_INFO_BY_HANDLE_CLASS.html# http://www.pinvoke.net/default.aspx/Structures/FILE_ID_BOTH_DIR_INFO.html http://www.pinvoke.net/default.aspx/Structures.LargeInteger !!!!Tips & Tricks: Please add some! !!!!Sample Code: internal static Int64 GetDirectoryId(string dir) { var handle = CreateFile(dir, FileAccess.Read, FileShare.Read, IntPtr.Zero, FileMode.Open, 0x02000000 | 0x00000080, IntPtr.Zero); var fileStruct = new FILE_ID_BOTH_DIR_INFO(); GetFileInformationByHandleEx(handle, FILE_INFO_BY_HANDLE_CLASS.FileIdBothDirectoryInfo, out fileStruct, (uint)Marshal.SizeOf(fileStruct)); CloseHandle(handle); var win32Error = Marshal.GetLastWin32Error(); if (win32Error != 0) throw new Win32Exception(); return fileStruct.FileId.QuadPart; } Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364953%28v=vs.85%29.aspx
Edit kernel32.getfilei...
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.