is possible with clarion?
EnumPrinters api, or WMI query “SELECT * from Win32_Printer”.
how i can use this with clarion? any example?
WMI example, required Active scripting:
EnumPrinters PROCEDURE()
wmi TVBWMI
i LONG, AUTO
CODE
FREE(PrintersQ)
wmi.Init(site)
wmi.Connect()
wmi.ExecQuery(`Select * from Win32_Printer`)
LOOP i=1 TO wmi.items.Count()
CLEAR(PrintersQ)
PrintersQ:Name = wmi.items.GetProp(i, 'Name')
ADD(PrintersQ)
END
Ice Tips has EnumPrinters in Articles with an example. The example does not follow Lee’s suggestion to call once to get the required size.
https://www.icetips.com/showarticle.php?articleid=469&frompage=ccs_article_list
https://www.icetips.com/showarticle.php?articleid=991&frompage=ccs_article_list
Also an example on below page described as "Using enumprinters api - Example - Olivier Cretey GetPrinterJobStatus.zip " (attached eblow)
https://www.icetips.com/downloads.php?dl=PAR2
GetPrinterJobStatus.zip (4.8 KB)
Thanks Carl Barnes…