Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WatiN-2.1.0.1196/source/src/Core/Browser.cs
- 79c79
- < NativeMethods.GetWindowPlacement(hWnd, ref placement);
- ---
- > NativeMethods.GetWindowPlacement(hWnd, out placement);
- 112c112
- < var intThreadIDIE = ProcessID;
- ---
- > var intThreadIDIE = Convert.ToUInt32(ProcessID);
- 117,118c117,118
- < NativeMethods.keybd_event(NativeMethods.KEYEVENTF_TAB, 0x45, NativeMethods.KEYEVENTF_EXTENDEDKEY, 0);
- < NativeMethods.keybd_event(NativeMethods.KEYEVENTF_TAB, 0x45, NativeMethods.KEYEVENTF_EXTENDEDKEY | NativeMethods.KEYEVENTF_KEYUP, 0);
- ---
- > NativeMethods.keybd_event(NativeMethods.KEYEVENTF_TAB, 0x45, NativeMethods.KEYEVENTF_EXTENDEDKEY, UIntPtr.Zero);
- > NativeMethods.keybd_event(NativeMethods.KEYEVENTF_TAB, 0x45, NativeMethods.KEYEVENTF_EXTENDEDKEY | NativeMethods.KEYEVENTF_KEYUP, UIntPtr.Zero);
- WatiN-2.1.0.1196/source/src/Core/Native/IHwnd.cs
- 37c37
- < void SendMessage(int msg, int wParam, int lParam);
- ---
- > void SendMessage(uint msg, UIntPtr wParam, IntPtr lParam);
- WatiN-2.1.0.1196/source/src/Core/Native/InternetExplorer/IEUtils.cs
- 36,37c36,41
- < [DllImport("oleacc", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
- < public static extern Int32 ObjectFromLresult(Int32 lResult, ref Guid riid, Int32 wParam, ref IHTMLDocument2 ppvObject);
- ---
- > //[DllImport("oleacc", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
- > //public static extern Int32 ObjectFromLresult(Int32 lResult, ref Guid riid, Int32 wParam, ref IHTMLDocument2 ppvObject);
- >
- > [DllImport("oleacc.dll", PreserveSig = false)]
- > [return: MarshalAs(UnmanagedType.Interface)]
- > static extern object ObjectFromLresult(IntPtr lResult,[MarshalAs(UnmanagedType.LPStruct)] Guid riid, UIntPtr wParam);
- 81,84c85
- < var IID_IHTMLDocument2 = new Guid("626FC520-A41E-11CF-A731-00A0C9082637");
- <
- < var lRes = 0;
- <
- ---
- > //var IID_IHTMLDocument2 = new Guid("626FC520-A41E-11CF-A731-00A0C9082637");
- 96,97c97,99
- < NativeMethods.SendMessageTimeout(hWnd, lMsg, 0, 0, NativeMethods.SMTO_ABORTIFHUNG, 1000, ref lRes);
- < if (lRes != 0)
- ---
- > IntPtr lRes;
- > NativeMethods.SendMessageTimeout(hWnd, lMsg, UIntPtr.Zero, IntPtr.Zero, NativeMethods.SMTO_ABORTIFHUNG, 1000, out lRes);
- > if (lRes != IntPtr.Zero)
- 100,105c102,107
- < IHTMLDocument2 ieDOMFromhWnd = null;
- < var hr = ObjectFromLresult(lRes, ref IID_IHTMLDocument2, 0, ref ieDOMFromhWnd);
- < if (hr != 0)
- < {
- < throw new COMException("ObjectFromLresult has thrown an exception", hr);
- < }
- ---
- > IHTMLDocument2 ieDOMFromhWnd = ObjectFromLresult(lRes, typeof(IHTMLDocument2).GUID, UIntPtr.Zero) as IHTMLDocument2;
- > //var hr = ObjectFromLresult(lRes, ref IID_IHTMLDocument2, 0, ref ieDOMFromhWnd);
- > //if (ieDOMFromhWnd == null)
- > //{
- > // throw new COMException("ObjectFromLresult has thrown an exception,hr");
- > //}
- WatiN-2.1.0.1196/source/src/Core/Native/Windows/Hwnd.cs
- 68c68
- < public void SendMessage(int msg, int wParam, int lParam)
- ---
- > public void SendMessage(uint msg, UIntPtr wParam, IntPtr lParam)
- 94c94
- < NativeMethods.SendMessage(new HandleRef(null, handle), NativeMethods.WM_CHAR, new IntPtr(Convert.ToInt64(c)), IntPtr.Zero);
- ---
- > NativeMethods.SendMessage(new HandleRef(null, handle), NativeMethods.WM_CHAR, new UIntPtr(Convert.ToUInt64(c)), IntPtr.Zero);
- WatiN-2.1.0.1196/source/src/Core/Native/Windows/Win32.cs
- 141c141
- < [DllImport("user32", EntryPoint = "GetClassNameA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
- ---
- > [DllImport("user32.dll", EntryPoint = "GetClassNameA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
- 143a144
- > [return: MarshalAs(UnmanagedType.Bool)]
- 148c149
- < internal static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, IntPtr windowTitle);
- ---
- > internal static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);
- 154c155
- < internal static extern IntPtr GetDlgItem(IntPtr handleToWindow, int ControlId);
- ---
- > internal static extern IntPtr GetDlgItem(IntPtr handleToWindow, int controlId);
- 163c164
- < public static extern IntPtr GetWindow(IntPtr hWnd, int uCmd);
- ---
- > public static extern IntPtr GetWindow(IntPtr hWnd, uint uCmd);
- 165a167
- > [return: MarshalAs(UnmanagedType.Bool)]
- 175c177,178
- < internal static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);
- ---
- > [return: MarshalAs(UnmanagedType.Bool)]
- > internal static extern bool GetWindowPlacement(IntPtr hWnd, out WINDOWPLACEMENT lpwndpl);
- 177a181
- > [return: MarshalAs(UnmanagedType.Bool)]
- 180a185
- > [return: MarshalAs(UnmanagedType.Bool)]
- 183a189
- > [return: MarshalAs(UnmanagedType.Bool)]
- 187c193
- < internal static extern int SendMessage(IntPtr hWnd, int msg, int wParam, int lParam);
- ---
- > internal static extern IntPtr SendMessage(IntPtr hWnd, uint msg, UIntPtr wParam, IntPtr lParam);
- 190c196
- < internal static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
- ---
- > internal static extern IntPtr SendMessage(HandleRef hWnd, uint msg, UIntPtr wParam, IntPtr lParam);
- 200c206
- < internal static extern IntPtr SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int x, int Y, int cx, int cy, int wFlags);
- ---
- > internal static extern IntPtr SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int Y, int cx, int cy, uint wFlags);
- 211c217
- < public static extern Int32 RegisterWindowMessage(string lpString);
- ---
- > public static extern uint RegisterWindowMessage(string lpString);
- 214c220
- < public static extern Int32 SendMessageTimeout(IntPtr hWnd, Int32 msg, Int32 wParam, Int32 lParam, Int32 fuFlags, Int32 uTimeout, ref Int32 lpdwResult);
- ---
- > public static extern IntPtr SendMessageTimeout(IntPtr hWnd, uint msg, UIntPtr wParam, IntPtr lParam, uint fuFlags, uint uTimeout, out IntPtr lResult);
- 217c223
- < internal static extern bool AttachThreadInput(int idAttach, int idAttachTo, bool fAttach);
- ---
- > internal static extern bool AttachThreadInput(uint idAttach, uint idAttachTo, bool fAttach);
- 220c226
- < internal static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);
- ---
- > internal static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, UIntPtr dwExtraInfo);
- 259a266
- > [return: MarshalAs(UnmanagedType.Bool)]
- 263c270
- < internal static extern int GetWindowThreadProcessId(IntPtr window, out int processId);
- ---
- > internal static extern uint GetWindowThreadProcessId(IntPtr window, out IntPtr processId);
- 271c278
- < internal static extern int GetCurrentThreadId();
- ---
- > internal static extern uint GetCurrentThreadId();
- 323c330
- < SendMessage(buttonPtr, BM_CLICK, 0, 0);
- ---
- > SendMessage(buttonPtr, BM_CLICK, UIntPtr.Zero, IntPtr.Zero);
- 362c369
- < SetWindowPos(hWnd, 0, 0, 0, width, height, 0);
- ---
- > SetWindowPos(hWnd, IntPtr.Zero, 0, 0, width, height, 0);
- WatiN-2.1.0.1196/source/src/Core/Native/Windows/WinButton.cs
- 50,51c50,51
- < _hWnd.SendMessage(NativeMethods.WM_ACTIVATE, NativeMethods.MA_ACTIVATE, 0);
- < _hWnd.SendMessage(NativeMethods.BM_CLICK, 0, 0);
- ---
- > _hWnd.SendMessage(NativeMethods.WM_ACTIVATE, new UIntPtr(NativeMethods.MA_ACTIVATE), IntPtr.Zero);
- > _hWnd.SendMessage(NativeMethods.BM_CLICK, UIntPtr.Zero, IntPtr.Zero);
- WatiN-2.1.0.1196/source/src/Core/Native/Windows/Window.cs
- 83c83
- < NativeMethods.SendMessage(Hwnd, NativeMethods.WM_CLOSE, 0, 0);
- ---
- > NativeMethods.SendMessage(Hwnd, NativeMethods.WM_CLOSE, UIntPtr.Zero, IntPtr.Zero);
- 130c130
- < int iePid;
- ---
- > IntPtr iePid;
- 134c134
- < return iePid;
- ---
- > return iePid.ToInt32();
- WatiN-2.1.0.1196/source/src/Core/UtilityClasses/CaptureWebPage.cs
- 167,168c167,168
- < hwnd = NativeMethods.FindWindowEx(hwnd, IntPtr.Zero, "MozillaWindowClass", IntPtr.Zero);
- < hwnd = NativeMethods.FindWindowEx(hwnd, IntPtr.Zero, "MozillaContentWindowClass", IntPtr.Zero);
- ---
- > hwnd = NativeMethods.FindWindowEx(hwnd, IntPtr.Zero, "MozillaWindowClass", null);
- > hwnd = NativeMethods.FindWindowEx(hwnd, IntPtr.Zero, "MozillaContentWindowClass", null);
- 313c313
- < hwnd = NativeMethods.FindWindowEx(hwnd, IntPtr.Zero, "Internet Explorer_Server", IntPtr.Zero);
- ---
- > hwnd = NativeMethods.FindWindowEx(hwnd, IntPtr.Zero, "Internet Explorer_Server", null);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement