I'm wondering if there's any way for a Windows desktop application (i.e. compiled using the Windows SDK) to get the current URL for a browser window running in another process.
Put another way, I'm wondering if there's an equivalent method in Windows to using AppleScript / Apple events in macOS:
tell application "Chrome" to get the URL of the active tab of front window
I'm working in C++ but since the underlying API is the Windows SDK, I'm open to other languages too such as C#.
I'd love a general approach that works for Chromium-based browsers like the above AppleScript example in macOS, but if need be I'll implement different methods for each web browser I want to support.