floof.org

kajer mastodon (AP)
Hey, people who make PUTTY terminal... how about a nice way to enumerate com ports rather than making me open device manager to see what random com port my usb-serial adapter was given
Simon Tatham mastodon (AP)
sounds great. If you can find out how to discover that information by Win32 API calls, I'm happy to advise on how to fit it into the structure of PuTTY's code.
kajer mastodon (AP)
@simontatham A quick google tells me I can ask the registry.
Simon Tatham mastodon (AP)

seems like an odd place for something that must be updated constantly as USB devices are plugged and unplugged, but if you've confirmed that it really does update in real time, fair enough!

Probably the thing to do in PuTTY is to make each frontend have a flag for "can I get a list of com ports?" and a function to return them if so, and in config.c, make the "Serial line to connect to" ctrl_editbox conditionally become a ctrl_combobox if the answer is yes.

kajer mastodon (AP)

@simontatham searching around different places like stackexchange and other coding places, it seems like the registry path is good, and if your windows verion supports it - https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcommports

The registry is a weird thing, but yes, as i connected my usb-serial adapters, the reg keys are created and removed as i hit F5 while plugging/unplugging.

datenwolf mastodon (AP)
@simontatham
There was (is?) a mouse driver that ab-/used the registry for mouse event IPC at over 500 Hz.