mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-26 08:43:25 +02:00
Added NTDirectoryFileSystem implementation for passsing-through IO requests to the local NT storage subsystem
This commit is contained in:
parent
5f90217d21
commit
9902b91eff
6 changed files with 593 additions and 0 deletions
24
SMBLibrary/Win32/ThreadingHelper.cs
Normal file
24
SMBLibrary/Win32/ThreadingHelper.cs
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue