emp00 wrote: ↑October 9th, 2023, 6:39 pm
I reached out to the author of the above "TCPView" AHK script - this is what I got. He points to the official MS development documentation:
Apps/Win32/API/IP Helper/Iphlpapi.h. See links below, it really looks like it's what we're looking for! The question is, how can we access these functions via Rainmeter? It's obviously possible via Autohotkey, in case I get more information or a demo AHK script, will let you know. Let's use this forum to discuss and maybe we can share the work to implement this in a decent Rainmeter skin as part of the Gadgets suite?
Those functions can usually be accessed via a plugin, like SilverAzide already mentioned. Unfortunately, not everyone who does skins is an expert in doing a plugin, so that variant means reliance on the relatively limited number of plugin developers, their awareness of such a wish and obviously on their interest in developing a solution for Rainmeter.
That being said, if this connection data retrieval is possible via an AutoHotKey script, it should be possible via an AutoIt script as well, since their syntax is roughly similar. Since one can send bangs from an AutoIt script to a Rainmeter skin (like illustrated
here), or send command line parameters as variables from a skin to such a script in order for the script to send bangs back to the skin at regular intervals (like implemented
here), I suspect this could be a way to get closer to the desired objective by not scraping a console / file for output. The potential problems I see for such an approach would be:
- the script is a bit long and complex for us amateurs to identify which stuff need to be passed back to a skin
- the script (netstat too?) output doesn't quite match the Windows Resource Monitor stuff (e.g. hosts file used) and it doesn't have traffic amounts
- the script doesn't merge / rollup data from instances of the same process, or sort them in a permanent fashion
- the script takes a bit of CPU when updating, and this could be an issue in multiple skin scenarios, like most are
The good part is that it should be possible to integrate it with Rainmeter as described above, given enough effort and interest.
For the record, although I clearly see perfmon.exe running when the Windows Resource Monitor is running as well, I doubt that's used for the connection data, unless using some combination of undocumented counters that only MS is aware of.