note 72724 deleted from function.printer-list by sobak
| From: | sobak@php.net | Date: | Thu, 24 Nov 2016 20:31:38 +0000 |
| Subject: | note 72724 deleted from function.printer-list by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207577@lists.php.net to get a copy of this message | ||
Note Submitter: ewilde aht bsmdevelopment dawt com
----
printer_list was not working for me and the docs are a little sparse. So, I took a look at the code
for php_printer.dll (which is at http://viewcvs.php.net/viewvc.cgi/pecl/printer/printer.c,
BTW) to figure out what was going on.
Basically, this function is a wrapper for the Windows function EnumPrinters. You can find this
function documented in MSDN (which is at http://msdn.microsoft.com). Do a search for EnumPrinters and
you should see the function itself as the first hit in the search list.
There is a lot more information about what the parameters to the function mean and the results
returned. The printer_list function basically copies the enumtype, name and level parameters
directly to the Flags, Name and Level parameters of EnumPrinters, calls the function and then copies
all of the fields, in the appropriate data structure returned for the level of information
requested, back to the results array.