Announcement

Collapse
No announcement yet.

Can't use LPRINT in PB & Win XP !!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't use LPRINT in PB & Win XP !!

    This has become bizarre.
    I've posted in the past few days questions about some PB DOS 3.2
    programs which ran on my Win ME machine but won't run on
    a new Win XP Pro machine.
    After a few hours of trial and error stuff, I discovered that
    if I change all "LPRINT" commands to "PRINT" commands
    the program works perfectly!
    With "LPTINT" commands when I "RUN" the DOD windw goes blank
    ]and nothing happens and the machine is locked up.
    Can anyone help me understand this and how I can correct it?
    I really need to send stuff to the printer!

  • #2
    I think you might have to make sure what's on LPT1: (which is where LPRINT goes) is NOT a "windows only" printer.

    If what you are printing is a text file (or may as well be), might be easiest to...

    - Change all those LPRINTs to "PRINT #hFile," where hFile IS a genuine disk file. (Global search and replace, add an OPEN and a CLOSE and you're done).
    - When done printing a document or page (whatever application requires), SHELL to some Windows utility program (e.g, notepad will print a text file from command line) and have that program handle the printing.

    It's a thought...

    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Originally posted by James Horner:
      I really need to send stuff to the printer!
      If your program outputs to LPT1 or LPT2, why not use the well known and widely available prn2file.com utility which works with console apps in XP. It could save you a lot of coding!




      ------------------

      Comment


      • #4
        DOSPrint

        What is DOSPrint?
        DOSPrint is software which captures LPT ports to any print queue.
        (Requires Windows NT 4.0, 2000, or XP - Windows 9x is not supported)
        · DOSPrint can capture LPT1-LPT9 to any local or network print queue.
        · Local print queues do not need to be shared.
        · Capture directly to NDPS printers without requiring a legacy NetWare print queue.
        · Capture directly to local LPT, USB, or TCP/IP printers without requiring sharing.
        · Runs in the system tray for easy access.

        ------------------
        Regards,
        Bob
        --------
        Composed with EZ-Post!
        Regards,
        Bob

        Comment


        • #5
          Or built in...

          NET USE lpt1: \\<Machine>\<Shared Printer> /p

          ...where machine might be the local/same machine. You just need to share your printer.

          Type NET HELP USE at a command prompt for options available

          Knuth

          ------------------
          http://www.softAware.de

          Comment


          • #6
            With all the times we see this post (printing to Windows printer from MS-DOS), it's hard to believe there isn't a utility which works something like...

            Code:
            PrintMyfile.exe  inifile.ini
            Where 'inifile' might look like

            Code:
            [SETUP]
            Filename=filename
            Wide=8.5
            High=11.0
            TopMargin=.75
            LeftMargin=.40
            Font=Times New Roman
            ...
            [ESCAPES]
            BoldOn=[boldon]
            BoldOff=[boldoff]
            
            .....
            You could SHELL this program from your DOS program passing the INIFile name (which you can build dynamicially).

            ... ????

            MCM


            [This message has been edited by Michael Mattias (edited July 27, 2006).]
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment

            Working...
            X