Thread: serial port read

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    I think it comes from windows.h. Try to include that. Not too sure though
    Amish

  2. #2
    Registered User
    Join Date
    Mar 2006
    Posts
    4
    Changed <Winbase.h> to <windows.h> and now this will compile---
    Code:
    #include <windows.h>
    #include <stdio.h>
    
    HANDLE pic;
    main()
    {
    pic = CreateFile( "COM1",     // address of name of the communications device
          GENERIC_READ | GENERIC_WRITE, // access (read-write) mode
          0,                  // share mode
          NULL,               // address of security descriptor
          OPEN_EXISTING,      // how to create
          0,                  // file attributes
          NULL                // handle of file with attributes to copy
       );
    }
    Have not had time to try in full program yet, but now I have a starting point.

    Thank you for your help!!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Serial Port Questions
    By valaris in forum Tech Board
    Replies: 2
    Last Post: 05-22-2009, 08:26 AM
  2. FTP program
    By jakemott in forum Linux Programming
    Replies: 14
    Last Post: 10-06-2008, 01:58 PM
  3. Serial Port Issues (again!)
    By HalNineThousand in forum Linux Programming
    Replies: 6
    Last Post: 04-09-2008, 08:26 PM
  4. HELP with storing serial port data into txt file
    By inmaterichard in forum C Programming
    Replies: 2
    Last Post: 04-02-2008, 02:20 AM
  5. Serial port read..can someone tell me..
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 06-27-2002, 08:21 AM