Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7428359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:44:02+00:00 2026-05-29T08:44:02+00:00

I just finished a small project written in C, where I read a data

  • 0

I just finished a small project written in C, where I read a data stream from a serial port and parse the incoming data.
The software is written for POSIX systems (using termios) and follows the standard steps to working with serial i/o

  1. Opening the serial device using open()
  2. Configuring communication parameters (termios)
  3. Set blocking mode on file handle (fcntl)
  4. Perform read() on serial interface.
  5. Perform close() on serial interface when done.

Other than the socket parts, the code is straight ANSI C.

My question is, how involved would it be to make the code work on a windows platform.
The port would not be written by me, I’d only like to give an indication to others who might be interested in porting it (i.e. trivial, not so trivial, rip your eyes out insanity inducing).

Also if someone has Windows with “Windows Services for UNIX”, would they be able to use the code without modifying it?

So, if anyone has experience with this could you please share.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:44:03+00:00Added an answer on May 29, 2026 at 8:44 am

    It should be pretty easy to do. The names are very different, but the sequence of calls and concepts are very similar.

    What you are looking for is the DCB structure which should be used with the SetComState() function to set baudrate, stopbits etc. Then use SetCommTimeouts() and set the timeout values in the COMMTIMEOUTS structure to make subsequent read calls blocking.

    Here is a short introduction as a pretty PDF. (Backup.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just finished a small project where changes were required to a pre-compiled, but
I just finished what I would call a small django project and pretty soon
I'm relatively new to Windows development, but have just finished a small project. I
We just finished a small project for a client (~35k), and the client would
I've just finished a phase in my project where I wrote a small infrastructure
Just finished read this post by Greg Young, where he is talking about Microsoft
I just finished a small task for school in Flash and I'm wondering about
I've just finished designing a small android app and have now come to a
I just finished a small website 100% based on ajax.But i have a problem
I just finished writing a small script to combine a lot of png pictures

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.