Zzz – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System; |
2 | using System.Runtime.InteropServices; |
||
3 | using System.Text; |
||
4 | |||
5 | namespace Zzz.Utilities |
||
6 | { |
||
7 | public class Natives |
||
8 | { |
||
9 | #region Static Fields and Constants |
||
10 | |||
11 | public const int HWND_BROADCAST = 0xffff; |
||
12 | |||
13 | public static readonly int WM_SHOWME = RegisterWindowMessage("WM_SHOWME"); |
||
14 | |||
15 | #endregion |
||
16 | |||
17 | #region Public Events & Delegates |
||
18 | |||
19 | public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam); |
||
20 | |||
21 | #endregion |
||
22 | |||
23 | #region Public Methods |
||
24 | |||
25 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] |
||
26 | public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount); |
||
27 | |||
28 | [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] |
||
29 | public static extern int GetWindowTextLength(IntPtr hWnd); |
||
30 | |||
31 | [DllImport("user32.dll")] |
||
32 | public static extern bool EnumWindows(EnumWindowsProc enumProc, IntPtr lParam); |
||
33 | |||
34 | [DllImport("user32")] |
||
35 | public static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam); |
||
36 | |||
37 | [DllImport("user32.dll", EntryPoint = "RegisterWindowMessageW", SetLastError = true)] |
||
38 | public static extern int RegisterWindowMessage(string lpString); |
||
39 | |||
40 | #endregion |
||
41 | } |
||
42 | } |