From 2198e84f3b3f8facbfc74f2d40286f4216ecafbc Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Fri, 7 Jul 2017 23:58:45 +0200 Subject: [PATCH] Fix subprocess NativeMethods to use pointers instead of value types --- subprocess/NativeMethods.cs | 2 +- subprocess/Program.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subprocess/NativeMethods.cs b/subprocess/NativeMethods.cs index 8773cc67..d11e512b 100644 --- a/subprocess/NativeMethods.cs +++ b/subprocess/NativeMethods.cs @@ -6,7 +6,7 @@ static class NativeMethods{ public static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF); [DllImport("user32.dll")] - public static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam, int lParam); + public static extern bool PostMessage(IntPtr hWnd, uint msg, UIntPtr wParam, IntPtr lParam); [DllImport("user32.dll")] public static extern uint RegisterWindowMessage(string messageName); diff --git a/subprocess/Program.cs b/subprocess/Program.cs index c6ab9baf..0fda1108 100644 --- a/subprocess/Program.cs +++ b/subprocess/Program.cs @@ -26,7 +26,7 @@ public override void OnBrowserCreated(CefBrowserWrapper wrapper){ base.OnBrowserCreated(wrapper); using(Process me = Process.GetCurrentProcess()){ - NativeMethods.PostMessage(NativeMethods.HWND_BROADCAST, NativeMethods.RegisterWindowMessage("TweetDuckSubProcess"), me.Id, wrapper.BrowserId); + NativeMethods.PostMessage(NativeMethods.HWND_BROADCAST, NativeMethods.RegisterWindowMessage("TweetDuckSubProcess"), new UIntPtr((uint)me.Id), new IntPtr(wrapper.BrowserId)); } } }