Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/ExcelDna.IntelliSense/Win32Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static IntPtr GetFocusedWindowHandle()
var info = new GUITHREADINFO();
info.cbSize = Marshal.SizeOf(info);
if (!GetGUIThreadInfo(0, ref info))
throw new Win32Exception();
return IntPtr.Zero;

var focusedWindow = info.hwndFocus;
if (focusedWindow == IntPtr.Zero)
Expand All @@ -142,7 +142,7 @@ public static IntPtr GetFocusedWindowHandle()
uint processId;
uint threadId = GetWindowThreadProcessId(focusedWindow, out processId);
if (threadId == 0)
throw new Win32Exception();
return IntPtr.Zero;

uint currentProcessId = GetCurrentProcessId();
if (processId == currentProcessId)
Expand Down