Hi
ObjAsm has been a little quiet lately because I've been working on some labor-intensive IoT projects.
The good news, however, is that I have new code to share

Most of the time, when you want to communicate with an external device like an ESP32 or Arduino, you need a way to send and receive data. In the IoT world, you can usually choose between WiFi, LORA and some type of serial communication. The last one is either implemented with dedicated SPI hardware or emulated in software.
The simplest is serial communication, which can be used to communicate with the PC via the existing USB ports.
One of the first tasks for such an application is to identify the devices connected to the serial interfaces. I've looked at sample code on this forum and some articles on "Code Project" like
https://www.codeproject.com/Articles/293273/Ready-to-use-serial-port-enumeration-list-box to write some asm code. I used this to select the COM port in a dialog box (see figure below).
This code is based on Windows
SetupApi, which is included in all versions above Win95 and NT.
This implementation is in the ComPortNames.inc file, which contains two procedures:
GetComPortNames and
FreeComPortNames. The first creates an array of
COMPORT_INFO structures, while the last destroys it. The structure definition looks like this:
COMPORT_INFO struct
cName CHR COMPORT_NAME_LEN DUP(?)
pFriendlyName PSTRING ?
COMPORT_INFO ends
I hope this can be helpful for other IoT enthusiasts

Regards, Biterider