Author Topic: Can't use GetCommPorts()  (Read 2719 times)

Offline exit0

  • Single posting newcomer
  • *
  • Posts: 5
Can't use GetCommPorts()
« on: February 17, 2023, 08:37:15 am »
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
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.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1601
Re: Can't use GetCommPorts()
« Reply #1 on: February 17, 2023, 08:57:12 am »
General programming is OT here.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7626
    • My Best Post
Re: Can't use GetCommPorts()
« Reply #2 on: February 17, 2023, 03:57:03 pm »
Link to the CB wiki FAQs
Maybe it will help you on your next question. This one is off topic as the prior poster stated.

Edit: Add link to rules,9996.0.html

Tim S.
« Last Edit: February 17, 2023, 07:37:39 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
When in doubt, read the CB WiKi FAQ.