public Win32FileHandle(IntPtr handle, Win32FileSystem fs) : this(handle, fs, false) { IntPtr proc = Kernel32.GetCurrentProcess(); this.handle = Kernel32.DuplicateHandle(proc, handle, proc, 0, true, 2); this.fs = fs; }
private Win32FileHandle(IntPtr handle, Win32FileSystem fs, bool own) : base(fs) { if (own) { this.handle = handle; } else { IntPtr proc = Kernel32.GetCurrentProcess(); this.handle = Kernel32.DuplicateHandle(proc, handle, proc, 0, true, 2); } this.fs = fs; }
private DateTime GetDateTime(IShellItem2 item, PROPERTYKEY property) { FILETIME ft = item.GetFileTime(property); return(Win32FileSystem.GetDateTime(ft)); }