SerialPort Class
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: SerialPort Class

  1. #1
    Join Date
    Jan 2004
    Posts
    61

    Question SerialPort Class

    After looking at the SerialPort class, it seems to only provide getters (not setters) for the bits (CD, DTR, DSR, Ring, etc.).

    Does anyone know if there is a way to set/clear these bits at my discretion using C#?

    Thanks

    -Mike

  2. #2
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    47

    Re: SerialPort Class

    Quote Originally Posted by simmerheli View Post
    After looking at the SerialPort class, it seems to only provide getters (not setters) for the bits (CD, DTR, DSR, Ring, etc.).

    Does anyone know if there is a way to set/clear these bits at my discretion using C#?

    Thanks

    -Mike
    I guess these fields are available display the status of those bits only. As the low level handshaking of DSR/DTR is performed by .NET Framework.
    Xander Tan

  3. #3
    Join Date
    Jul 2007
    Location
    Illinois
    Posts
    517

    Re: SerialPort Class

    If you want that kind of power over a serial port try using interop with the kernel32 library. It will allow you to set everything you could possibly want to set. Problem is... interop, sort of defeats the purpose of C# but Ive found it very useful in my development with serial ports.
    R.I.P. 3.5" Floppy Drives
    "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center