Article View: borland.public.cppbuilder.nativeapi
Article #14859Re: Getting list of printers
From: Bob Gonder
Date: Tue, 29 Jul 2003 03:29
Date: Tue, 29 Jul 2003 03:29
26 lines
1895 bytes
1895 bytes
Luiz Rafael Culik Guimaraes wrote: > > buffer = ( unsigned char * ) malloc( MAX_PRINTERS * sizeof( >PRINTER_INFO_5 ) ) ; > > res = EnumPrinters( PRINTER_ENUM_NETWORK | PRINTER_ENUM_LOCAL | >PRINTER_ENUM_CONNECTIONS , > NULL , > 5 , > buffer , > MAX_PRINTERS * sizeof( PRINTER_INFO_5 ) , > &needed , > &returned ); I use PRINTER_INFO_1. Is there some reason you need _5? I also only use _LOCAL, which includes all printers installed (even network printers) on the system. If you see it in Start/Settings/Printers, _LOCAL gets it. Hmmm..... "PRINTER_ENUM_NETWORK Windows NT only: The function enumerates network printers in the computer's domain. This value is valid only if Level is 1." Could be the trouble, as you are doing level 5.
Technical Details
Message-ID:
<82qbivo17e90mvo80naf4k7ge8q6h1vrf3@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f25483b$1@newsgroups.borland.com> <3f255ac6$1@newsgroups.borland.com> <3f2586d3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,f542a59fe4cd92a4 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-28 20:32:40 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Getting list of printers Date: Mon, 28 Jul 2003 20:29:48 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <82qbivo17e90mvo80naf4k7ge8q6h1vrf3@4ax.com> References: <3f25483b$1@newsgroups.borland.com> <3f255ac6$1@newsgroups.borland.com> <3f2586d3@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.165.138 X-Trace: newsgroups.borland.com 1059449387 67.31.165.138 (28 Jul 2003 20:29:47 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail