This function lists the installed printers.

[C++Builder/Visual C++]     DWORD IKEnumPrinters(LPTSTR Printers, short *DefaultPrinterNo);
[Delphi]         function IKEnumPrinters(Printers: PChar; var DefaultPrinterNo: Smallint): DWORD;
[Visual Basic]   Function IKEnumPrinters(ByVal Printers As String, DefaultPrinterNo As Integer) As Long

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 and Visual C++), nil (for Delphi), and vbNullString (for Visual Basic) 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

   (1)C++Builder/Visual C++

      TCHAR Printers[1024];

   (2)Delphi

      Printers: array[0..1023] of Char;

   (3)Visual Basic

      Dim Printers As String * 1024


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.

 

The ImageKit10 ActiveX is a product created by Newtone Corporation