English
Source / code snippets

List printer Enumprinters detect standard

 
printer List, standard-printer detect of Andreas Miethe:
CompileMarkSeparation
############### ##########
Drucker auflisten
Andreas Miethe * Juni 2003
##########################
DEF EnumPrinters(7) ! WINSPOOL.DRV,EnumPrintersA
DEF GetStandardPrinter(0) Substr$(ReadIni$(WIN.INI,Windows,Device),1,,)
DEF &PRINTER_ENUM_LOCAL 2
DEF &PRINTER_ENUM_DEFAULT 1
Declare PrinterValues#

Proc EnumPrinters

    Declare Printername&,Portname&,PrinterName$,PortName$,Attribs&
    Declare X&,dwNeeded&,dwReturned&
    EnumPrinters(&PRINTER_ENUM_LOCAL,0,5,0,0,ADDR(dwNeeded&),ADDR(dwReturned&))
    Dim PrinterValues#,dwNeeded&
    Clear PrinterValues#
    EnumPrinters(&PRINTER_ENUM_LOCAL ,0, 5, PrinterValues#, dwNeeded&, ADDR(dwNeeded&), ADDR(dwReturned&))

    While X& < dwReturned&*20

        Printername& = Long(PrinterValues#,x&)
        PrinterName$ = String$(Printername&,0)
        Attribs& = Long(PrinterValues#,x&+8)

        If AND(Attribs&,$4)

            Printername$ = Printername$ +  => Standarddrucker

        endif

        Print Printername$
        X& = X& + 20

    EndWhile

    Dispose PrinterValues#

Endproc

cls
EnumPrinters
Print
Print Standard-Drucker :
Print GetStandardPrinter()
waitinput
salvo, iF.
 
07/01/05  
 




E.T.
for newer XProfan-versions:
in line 26
CompileMarkSeparation
If AND(Attribs&,$4)re>

supplant through
CompileMarkSeparation
If Attribs& & $4re>

 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
01/10/11  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.096 Views

Untitledvor 0 min.
Erasmus.Herold01/21/23
Axel Berse07/27/22
iF06/20/18
Rainer Hoefs03/10/18
More...

Themeninformationen

this Topic has 2 subscriber:

E.T. (1x)
iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie