CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    file help required

    How to send a file to a specified LPT device using Visual C++ 6.0.
    Tufail





  2. #2
    Join Date
    Apr 1999
    Location
    Toronto, ON
    Posts
    713

    Re: file help required

    The idea:

    char lpBuf[80]="just test";
    int u=_open(_T("LPT1"),_O_BINARY | _O_RDWR);
    write(u,lpBuf,80);
    _close(u);


    Dmitriy, MCSE

  3. #3
    Guest

    Re: file help required

    Sir,
    What I want is this
    We have a dos command like this
    type a.txt > LPT1
    I want to do the same but by some other means so that the program doesn't have to enter the DOS prompt



  4. #4
    Join Date
    Apr 1999
    Location
    Toronto, ON
    Posts
    713

    Re: file help required

    Try the example. If you want to send file, just replace lpBuf in _write() with pointer to buffer where you have loaded in memory file.

    Did I missunderstand something?

    Dmitriy, MCSE

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured