Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int ButtonId = 0x0000E910;
- IntPtr handle = IntPtr.Zero;
- Process[] localAll = Process.GetProcesses();
- foreach (Process p in localAll)
- {
- if (p.MainWindowHandle != IntPtr.Zero)
- {
- ProcessModule pm = GetModule(p);
- if (pm != null && p.MainModule.FileName == fn)
- handle = p.MainWindowHandle;
- }
- }
- if (handle == IntPtr.Zero)
- {
- Console.WriteLine("Not found");
- return;
- }
- Console.WriteLine("{0:X}", handle);
- IntPtr hWndButton = GetDlgItem(handle, ButtonId);
- string myText = getText.GetControlText(hWndButton);
- Console.WriteLine("Error Code = {0}", GetLastError());
- Console.WriteLine("Iput Window Text !!! = {0}", myText);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement