Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
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;
}
The GetFileInformationByHandleEx API
12/8/2014 6:32:27 AM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).