Hi Jose',
thank you for the code, but
1. I get a number of error messages while compiling the unit with
Lazarus 1.6.4 under W7 (see below)
2. I cannot understand how I can get the enumerated COM device names
into a TStringList as I need to process the names.
Thank you
Peppe
Compile Project, Target:
C:\Users\PCCE88~1.BUF\AppData\Local\Temp\project1.exe: Exit code 1,
Errors: 11
udeviceenumwin.pas(83,22) Error: Identifier not found "TLibHandle"
udeviceenumwin.pas(83,32) Error: Error in type definition
udeviceenumwin.pas(164,23) Error: Operator is not overloaded:
"<erroneous type>" = "ShortInt"
udeviceenumwin.pas(165,88) Error: Incompatible type for arg no. 1: Got
"<erroneous type>", expected "QWord"
udeviceenumwin.pas(166,96) Error: Incompatible type for arg no. 1: Got
"<erroneous type>", expected "QWord"
udeviceenumwin.pas(167,101) Error: Incompatible type for arg no. 1:
Got "<erroneous type>", expected "QWord"
udeviceenumwin.pas(168,97) Error: Incompatible type for arg no. 1: Got
"<erroneous type>", expected "QWord"
udeviceenumwin.pas(169,102) Error: Incompatible type for arg no. 1:
Got "<erroneous type>", expected "QWord"
udeviceenumwin.pas(170,90) Error: Incompatible type for arg no. 1: Got
"<erroneous type>", expected "QWord"
udeviceenumwin.pas(184,26) Error: Operator is not overloaded:
"<erroneous type>" = "ShortInt"
udeviceenumwin.pas(184,65) Error: Incompatible type for arg no. 1: Got
"<erroneous type>", expected "QWord"
Post by José Mejuto via LazarusPost by duilio foschi via LazarusIs there a Winows API I can call from my Lazarus program and get the same info ?
My aim is to detect which COM number was assigned to the USB device
"MSP Application UART1"
Hello,
Attached unit will help you to implement a COM port browsing. There is a bit
of extra code as original comes from a bigger unit, and this is an extract.
--
--