I'm using EnumDesktopWindows() to get the window handles of running applications, then using GetWindowText() to get the title of each window.
The user picks a window and I then use FindWindow() to locate it and activate it. This all works fine, and has done for several years until I moved to Windows 10. It still works fine for everything except Microsoft Edge. When passed the window text of the Edge Browser the API returns a zero value (IntPtr.Zero).
I'm working in VB.NET, but this is really about the Win32 API and Edge. I've included the definitions of the API functions I am calling below:
Private Declare Auto Function EnumDesktopWindows Lib "user32" (ByVal hDesktop As Integer, ByVal lpfn As EnumDesktopWindowsDelegate, ByVal param As Integer) As Integer
Private Delegate Function EnumDesktopWindowsDelegate(hWnd As IntPtr, lParam As Integer) As Boolean
Private Shared Function GetWindowText(ByVal hwnd As IntPtr, ByVal lpString As Text.StringBuilder, ByVal cch As Integer) As Integer
Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr