diff --git a/Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs b/Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs index 5f14b7598..a09185696 100644 --- a/Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs +++ b/Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs @@ -57,7 +57,7 @@ namespace Flow.Launcher.Infrastructure.Hotkey return state; } - [MethodImpl(MethodImplOptions.NoInlining)] + [UnmanagedCallersOnly] private static IntPtr LowLevelKeyboardProc(int nCode, UIntPtr wParam, IntPtr lParam) { bool continues = true; diff --git a/Flow.Launcher.Infrastructure/Hotkey/InterceptKeys.cs b/Flow.Launcher.Infrastructure/Hotkey/InterceptKeys.cs index 7fec3c383..d33bac34c 100644 --- a/Flow.Launcher.Infrastructure/Hotkey/InterceptKeys.cs +++ b/Flow.Launcher.Infrastructure/Hotkey/InterceptKeys.cs @@ -10,7 +10,7 @@ namespace Flow.Launcher.Infrastructure.Hotkey private const int WH_KEYBOARD_LL = 13; - public static IntPtr SetHook(delegate* proc) + public static IntPtr SetHook(delegate* unmanaged proc) { using (Process curProcess = Process.GetCurrentProcess()) using (ProcessModule curModule = curProcess.MainModule) @@ -20,7 +20,7 @@ namespace Flow.Launcher.Infrastructure.Hotkey } [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] - public static extern IntPtr SetWindowsHookEx(int idHook, delegate* lpfn, IntPtr hMod, uint dwThreadId); + public static extern IntPtr SetWindowsHookEx(int idHook, delegate* unmanaged lpfn, IntPtr hMod, uint dwThreadId); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)]