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:
parent
4d77a498f6
commit
2198e84f3b
subprocess
@ -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);
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user