-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNativeMethods.cs
38 lines (32 loc) · 1.27 KB
/
NativeMethods.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Runtime.InteropServices;
namespace SSHMan {
internal static class NativeMethods {
internal class Win32ShowCmd {
public const int ForceMinimize = 11;
public const int Hide = 0;
public const int Maximize = 3;
public const int Minimize = 6;
public const int Restore = 9;
public const int Show = 5;
public const int ShowDefault = 10;
public const int ShowMaximized = 3;
public const int ShowMinimized = 2;
public const int ShoMinNoActive = 7;
public const int ShowNa = 8;
public const int ShowNoActivate = 4;
public const int ShowNormal = 1;
}
[DllImport ("kernel32.dll")]
[
return :MarshalAs (UnmanagedType.Bool)
]
public static extern bool AllocConsole ();
[DllImport ("user32.DLL")]
public static extern bool SetForegroundWindow (IntPtr hWnd);
[DllImport ("user32.dll")]
public static extern bool ShowWindow (IntPtr handle, int nCmdShow);
[DllImport ("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern IntPtr FindWindow (string lpClassName, string lpWindowName);
}
}