🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to get windows default printer?

#14269
From: Remy Lebeau (TeamB)
Date: Tue, 19 Aug 2003 22:26
23 lines
1750 bytes
"Richard Yu" <richard@colorselector.com> wrote in message
news:3f427f92$1@newsgroups.borland.com...

> why the code give me 2 default printers ?

Probably because you are specifying PRINTER_ENUM_CONNECTIONS  as well, which
tells EnumPrinter() to include printers that you are already made
connections to.  You do not need that.  Just specify PRINTER_ENUM_DEFAULT
only, ie:

    EnumPrinters(PRINTER_ENUM_DEFAULT, NULL, 1, NULL, 0, &needed, &count);


Gambit

Gambit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 8/14/03
Technical Details
Message-ID: <3f42a272$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f415360$1@newsgroups.borland.com> <3f41597f$2@newsgroups.borland.com> <3f427f92$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,16abfae200d036ee
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-19 15:40:55 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f415360$1@newsgroups.borland.com> <3f41597f$2@newsgroups.borland.com> <3f427f92$1@newsgroups.borland.com>
Subject: Re: How to get windows default printer?
Date: Tue, 19 Aug 2003 15:26:22 -0700
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f42a272$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1061331570 207.175.226.26 (19 Aug 2003 15:19:30 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail