Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Weird character in COM port list when compiled in Vista

Weird character in COM port list when compiled in Vista

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++dotnetcomhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_3130247
    wrote on last edited by
    #1

    :^)Can anyone shed some light. I have rebuilt my application after installing Vista Premuim and downloading the latest VC++ Express edition (version 8.0.50727.867 ( vista.050727-8600) .Net Framework version 2.0.50727) using the following code sample and I am getting some weird results to the port list which I don't see when running the same code that was compiled in windows XP with VC++Express (Don't know what version I had since my drive crashed - Was downloaded in 2006) This is the code try { // Get a list of serial port names. TRK_PORTNAME_cbox->Items->Clear(); TRK_PORTNAME_cbox->Items->AddRange(TRK_Port->GetPortNames()); } catch (Win32Exception^ ex) { MessageBox::Show(ex->Message); } At this point TRK_PORTNAME_cbox->Items[0-2] contains: "COM3" "COM5鮤" "COM4" I don't know why it's finding Com3 and 5 since I only have a USB to serial adapter at COM4. THat weird character after COM5 doesn't appear when I run my old build in Vista. Help!! LarryD

    L 1 Reply Last reply
    0
    • M Member_3130247

      :^)Can anyone shed some light. I have rebuilt my application after installing Vista Premuim and downloading the latest VC++ Express edition (version 8.0.50727.867 ( vista.050727-8600) .Net Framework version 2.0.50727) using the following code sample and I am getting some weird results to the port list which I don't see when running the same code that was compiled in windows XP with VC++Express (Don't know what version I had since my drive crashed - Was downloaded in 2006) This is the code try { // Get a list of serial port names. TRK_PORTNAME_cbox->Items->Clear(); TRK_PORTNAME_cbox->Items->AddRange(TRK_Port->GetPortNames()); } catch (Win32Exception^ ex) { MessageBox::Show(ex->Message); } At this point TRK_PORTNAME_cbox->Items[0-2] contains: "COM3" "COM5鮤" "COM4" I don't know why it's finding Com3 and 5 since I only have a USB to serial adapter at COM4. THat weird character after COM5 doesn't appear when I run my old build in Vista. Help!! LarryD

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      You can check that list in other places: - a terminal emulator (such as HyperTerminal) should present it to you - the Device Manager (right click "My Computer" if that is still around, then follow the word "Hardware"...) should enumerate all your hardware, so you could find serial ports under a whole range of entries, such as: Ports, USB, and some vendor-specific groups if any. If none of the above show COM3 and COM5, you can safely conclude they dont exist, and your app+VS+.NET is wrong; if they do show up, you are in for a Vista drivers adventure I guess. :)

      Luc Pattyn


      try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups