Interrupt driven serial communication?

This is a discussion on Interrupt driven serial communication? within the C Programming forums, part of the General Programming Boards category; Hi all, I serach through the forum to find the solution, but seems I can't find any clues. So I ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    4

    Interrupt driven serial communication?

    Hi all,

    I serach through the forum to find the solution, but seems I can't find any clues. So I hope someone can point me some direction.

    I want to use the com port in PC to send and receive data in a DLL library under windows. I searched the forum here that it has a lot of example, but it seems that most of them are "polling" approach. What I want to achieve is as follow: open a com port, register it to a function, and when a byte is received it will call my registered function in my dll. Will it be possible to do it? If it is so, can someone point me a direction or share any code sample? Thanks a lot!

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Start with CreateFile in MSDN. Scroll down the page to find the section titled "Communications Resources, and follow that link. Read the descriptions carefully and thoroughly. One is Monitoring Events that shows how to use COM in overlapped I/O (note this is the same as interrupt driven I/O). You need to create a separate thread for this because it is a blocking function call.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unkown Hang
    By Bladactania in forum C Programming
    Replies: 31
    Last Post: 04-22-2009, 09:33 AM
  2. Serial port Communication
    By vin_pll in forum C++ Programming
    Replies: 23
    Last Post: 01-07-2009, 08:32 AM
  3. Please help with serial communication problem - Long
    By spdylude in forum Windows Programming
    Replies: 3
    Last Post: 04-06-2005, 09:41 AM
  4. Serial communication packets
    By Roaring_Tiger in forum C Programming
    Replies: 3
    Last Post: 04-26-2003, 08:33 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