1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-23 03:15:48 +02:00

Fix subprocess NativeMethods to use pointers instead of value types

This commit is contained in:
chylex 2017-07-07 23:58:45 +02:00
parent 4d77a498f6
commit 2198e84f3b
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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));
}
}
}