Communicating with LPTI port
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Communicating with LPTI port

  1. #1
    Join Date
    Oct 1999
    Location
    Sweden
    Posts
    33

    Communicating with LPTI port

    I want to communicate with other hardware thru the printer port. The hardware will consist among other things of some sram's that i want to send and recieve data from and to. So if anyone have and url's to where one could find facts on this subject (the software part) please let me know.
    / Andreas
    ampe@swipnet.se

    As I once said to my friend. I am not perfect, not even
    near perfect but what would be the fun in that?
    It would take away you possibilitys to call me a dumbass.

  2. #2
    Join Date
    Aug 1999
    Location
    Canada
    Posts
    2,076

    Re: Communicating with LPTI port

    You can use the Win32 API functions CreateFile, ReadFile, WriteFile, CloseHandle... on LPT with either blocking or non-blocking I/O.

    Use the CreateFile function to open a handle to a communications resource. In your case to LPT1. It returns a handle to a parallel port.

    Take a look to the serial communication examples, it is similar.

    http://msdn.microsoft.com/library/te...sdn_serial.htm

    http://msdn.microsoft.com/library/de...onstration.htm






Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center