Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Printing to LPT1 port

Printing to LPT1 port

Scheduled Pinned Locked Moved C#
csharpc++comhelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ArielR
    wrote on last edited by
    #1

    Does exist in C# a way to open a port ( LPT, COM ) like C++ fopen method?. f = fOpen( "LPT1", "w") I tried with... TextWriter tw = new StreamWriter("myFile.txt") but if I change myFile.txt with LPT1 I have this error, "filestream can't open win32 devices, like partitions or tape uniteds" why? thank you very much

    M D 2 Replies Last reply
    0
    • A ArielR

      Does exist in C# a way to open a port ( LPT, COM ) like C++ fopen method?. f = fOpen( "LPT1", "w") I tried with... TextWriter tw = new StreamWriter("myFile.txt") but if I change myFile.txt with LPT1 I have this error, "filestream can't open win32 devices, like partitions or tape uniteds" why? thank you very much

      M Offline
      M Offline
      musefan
      wrote on last edited by
      #2

      maybe this will help http://www.codeproject.com/KB/cs/serialcommunication.aspx[^]

      If only MySelf.Visible was more than just a getter... A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting

      1 Reply Last reply
      0
      • A ArielR

        Does exist in C# a way to open a port ( LPT, COM ) like C++ fopen method?. f = fOpen( "LPT1", "w") I tried with... TextWriter tw = new StreamWriter("myFile.txt") but if I change myFile.txt with LPT1 I have this error, "filestream can't open win32 devices, like partitions or tape uniteds" why? thank you very much

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        You can't do that. This KB article[^] is about as close as you're going to get.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups