News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Can't use GetCommPorts()

Started by exit0, February 17, 2023, 08:37:15 AM

Previous topic - Next topic

exit0

I've tried to get a full list of serial interfaces available with many different techniques. Some other people told me to use "GetCommPorts()" function instead of iterating through the registry myself, but the CB IDE doesn't seem to know that function, even if i include <winbase.h> like told in the MS docs here https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcommports
And also having a "#pragma comment (lib, "OneCore.lib")" does not change anything. The compiler complains about an unknown function and also the IDE does not show up this function in the context-help.

Miguel Gimenez


stahta01

#2
Link to the CB wiki FAQs https://wiki.codeblocks.org/index.php/FAQ
Maybe it will help you on your next question. This one is off topic as the prior poster stated.

Edit: Add link to rules https://forums.next.codeblocks.org/index.php/topic,9996.0.html

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]