🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12353

Re: Windows Printers

#12353
From: john blackburn
Date: Fri, 12 Dec 2003 17:29
43 lines
2291 bytes
Albert Milani wrote:

> Hi,
> 
> 
> In Windows 95, 98 & Me, I can send raw text directly to a Generic/Text
> Only
> Windows printer using TPrinter but this doesn't work in XP & 2000.  Does
> anyone know of a solution to this?
> 
> If I can't use TPrinter to print, does anyone know how to find out the
> port
> name from a Windows printer?  I tried TPrinter::GetPrinter() but I got
> junk
> except for ADevice.  I also tried GetPrinter() but I just got blank
> strings for the strings in PRINTER_INFO_2.
> 
> Thanks,
> Albert

Albert,

  Another viewpoint for this.  I had the problem of talking to a character
based printer (Mannesman Line Printer) from within a windows program.  I
simply treated it like a file and talked to it using fstream.  This is the
natural way of doing things with Linux as all peripherals are viewed as
files.

  There may well be restrictions on this (for windows O/S) and it will
probably only work in a networked environment as a printer queue. 
Basically, if you can see the printer as a networked file spec (e.g
\\host\printername) then you should be OK.  Failing that you can always use
an old PC that you were about to chuck out, load Red Hat on to it and set
up the printer on that and make it available through Samba to the network
to Windows machines.

  Works fine for me - really quick too.  Anyway, another possibility.


Regards 


John
Technical Details
Message-ID: <3fd9fae0@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fbcf9c2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,7b2449597708bec
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-12 09:40:07 PST
Message-ID: <3fd9fae0@newsgroups.borland.com>
From: john blackburn <john.blackburn@lintonhealy.co.uk>
Subject: Re: Windows Printers
Newsgroups: borland.public.cppbuilder.nativeapi
Date: Fri, 12 Dec 2003 17:29:04 +0000
References: <3fbcf9c2@newsgroups.borland.com>
Lines: 43
User-Agent: KNode/0.7.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Host: 82.68.81.227
X-Trace: newsgroups.borland.com 1071250144 82.68.81.227 (12 Dec 2003 09:29:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail