Article View: borland.public.cppbuilder.nativeapi
Article #14277Re: How to get windows default printer?
From: Richard Yu
Date: Tue, 19 Aug 2003 23:51
Date: Tue, 19 Aug 2003 23:51
32 lines
2064 bytes
2064 bytes
without the PRINTER_ENUM_CONNECTIONS , the count return 0; sounds no printer found . "Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message news:3f42a272$1@newsgroups.borland.com... > > "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:
<3f42b824@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f415360$1@newsgroups.borland.com> <3f41597f$2@newsgroups.borland.com> <3f427f92$1@newsgroups.borland.com> <3f42a272$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 17:10:44 PST From: "Richard Yu" <richard@colorselector.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f415360$1@newsgroups.borland.com> <3f41597f$2@newsgroups.borland.com> <3f427f92$1@newsgroups.borland.com> <3f42a272$1@newsgroups.borland.com> Subject: Re: How to get windows default printer? Date: Tue, 19 Aug 2003 16:51:51 -0700 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 24.207.7.224 Message-ID: <3f42b824@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061337124 24.207.7.224 (19 Aug 2003 16:52:04 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail