Added NTDirectoryFileSystem implementation for passsing-through IO requests to the local NT storage subsystem

This commit is contained in:
Tal Aloni 2017-07-26 15:12:30 +03:00
parent 5f90217d21
commit 9902b91eff
6 changed files with 593 additions and 0 deletions

View file

@ -0,0 +1,24 @@
/* Copyright (C) 2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
*
* You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*/
using System;
using System.Runtime.InteropServices;
using System.Threading;
namespace SMBLibrary.Win32
{
public class ThreadingHelper
{
[DllImport("kernel32.dll", SetLastError = true)]
public static extern uint GetCurrentThreadId();
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr OpenThread(uint desiredAccess, bool inheritHandle, uint threadId);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool CloseHandle(IntPtr handle);
}
}