Article View: borland.public.cppbuilder.nativeapi
Article #13901Re: GetDeviceCaps not working with all printers.
From: JD
Date: Tue, 16 Sep 2003 04:53
Date: Tue, 16 Sep 2003 04:53
19 lines
1643 bytes
1643 bytes
"Bob Reeves" <bob@somethinxtra.com> wrote: >Did a little more testing this morning and the problem is with >Printer()->Handle... There have been other reports of this. The solution (that I haven't tested) is to use GetPrinter and SetPrinter as shown: //allocation of Buffer is not shown unsigned int DeviceMode; char *DeviceName = (char *)Buffer; char *DriverName = (char *)Buffer + 256; char *Port = (char *)Buffer + 512; Printer()->PrinterIndex = ?? Printer()->GetPrinter( DeviceName, DriverName, Port, DeviceMode ); Printer()->SetPrinter( DeviceName, DriverName, Port, DeviceMode ); ~ JD
Technical Details
Message-ID:
<3f669757$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f6307be$1@newsgroups.borland.com> <3ti6mvopr70gvqksnpvqnmaongfrhu8fdc@4ax.com> <3f63ab80@newsgroups.borland.com> <3f63acef$1@newsgroups.borland.com> <3f65a5f6$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,90fc2fd2df76ffd6 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-15 21:57:39 PST From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: GetDeviceCaps not working with all printers. Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 172.136.68.192 172.136.68.192 References: <3f6307be$1@newsgroups.borland.com> <3ti6mvopr70gvqksnpvqnmaongfrhu8fdc@4ax.com> <3f63ab80@newsgroups.borland.com> <3f63acef$1@newsgroups.borland.com> <3f65a5f6$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3f669757$1@newsgroups.borland.com> Date: 15 Sep 2003 21:53:43 -0700 X-Trace: newsgroups.borland.com 1063688023 207.105.83.65 (15 Sep 2003 21:53:43 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail