123456789101112131415161718192021222324 |
- /* 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);
- }
- }
|