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