This function lists the installed printers.
Parameters
Name | Explanation |
---|---|
Printers | A string containing the retrieved printer names |
DefaultPrinterNo | The number of the default printer (from 0) |
Return Value
If NULL (for C++Builder) or nil (for Delphi) are set into Printers, the required size of the string is returned when the printer name is retrieved. (does not included the final null). In the Ansi versions the returned value is the number of bytes. In the Unicode versions, the return value is the number of characters.
Explanation
The IKEnumPinters function lists the installed printers.
Note: When retrieving the printer name, please do not exceed the specified size
In C++Builder
TCHAR Printers[1024];
In Delphi
Printers: array[0..1023] of Char;
The Printers string will be returned as "xxxxx,xxxxx,xxxxx,¥¥¥¥¥¥¥¥," (delimited by commas and ends with a comma).
The DefaultPrinterNo parameter refers to the number of the default printer on the list that appears in the Printers member variable. The first printer on the list is referred to by the number 0.