C++ serial port programming

This is a discussion on C++ serial port programming within the Windows Programming forums, part of the Platform Specific Boards category; hi, is there a way with the STL or some c++ standar class to use the serial port? i know ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    113

    C++ serial port programming

    hi,
    is there a way with the STL or some c++ standar class to use the serial port?
    i know you can use win32 api's, etc to use that, but I need to know if you can do it in pure c++
    any idea, link, tutorial or document?

    thanks for any help

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,488
    > is there a way with the STL or some c++ standar class to use the serial port?
    Hardware devices are too specific to your OS to ever make the grade as being "standard"

    You can get pretty close if you choose POSIX as your standard (in terms of API calls), but that still leaves a bit of variability in the device naming.

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    113
    ok it is true forgot about that, but is there a "custom" class that is popular or a "popular custom class" for working wit serial communications? (for the win32 environment)


    thanks for reply

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,660
    Here is a C++ class for performing serial communications in Win32 - and it's popular to me.

    gg
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    Mar 2004
    Posts
    113
    great!
    will try it
    thanks a lot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. serial port to poll on request
    By infineonintern in forum C++ Programming
    Replies: 2
    Last Post: 06-11-2009, 06:52 AM
  2. Can't Read From Serial Port
    By HalNineThousand in forum Linux Programming
    Replies: 14
    Last Post: 03-20-2008, 05:56 PM
  3. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  4. Reading and writing to a serial port
    By SwarfEye in forum C Programming
    Replies: 2
    Last Post: 08-18-2006, 12:28 AM
  5. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 03:59 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21