I am developing a chrome extension which uses chrome's native messaging api to communicate to a host application. The host application is written in C++. Now my host application requires the Window Handle HWND of the chrome tab in which my extension is currently active.
Is there a way to do this? I can't use any of the NPAPI solutions.
I have gone through the documentation of the chrome extensions there doesn't seem to be a way to do this.
I have seen this answer: Get Window Handle of Chrome Tab from Within Extension?
But the above answer doesn't explain things clearly. Is it asking for matching the title of windows by iterating through all the windows? How do I do this? What if multiple tabs have the same title? Can Tab Id or window Id be used in some way?