This function retrieves the handle to the specified printer's DEVMODE structure and DEVNAMES structure.

[C++Builder/Visual C++]     HANDLE IKGetDevModeHandleEx(LPCTSTR PrinterName, LPCTSTR PrintFileName, LPHANDLE hDevNames);
[Delphi]         function IKGetDevModeHandleEx(PrinterName, PrintFileName: PChar; hDevNames: PHandle): THandle;
[Visual Basic]   Function IKGetDevModeHandleEx(ByVal PrinterName As String, ByVal PrintFileName As String, hDevNames As Long) As Long

Parameters

Name Explanation
PrinterName The printer name
PrintFileName The file name of the printer file (the file where printer settings are saved by the IKSaveDevModeHandle, IKSaveDevModeHandleEx, or IKSetPrint function)
hDevNames Handle of the DEVNAMES structure that is retrieved

Return Value

Returns the handle to the DEVMODE structure if successful. Returns NULL (0) if unsuccessful.

Explanation

The IKGetDevModeHandleEx function retrieves the handle to the specified printer's DEVMODE structure and DEVNAMES structure. The DEVMODE structure stores information about various settings and properties of a device, such as a printer.

Prior to executing the IKGetDevModeHandleEx function, the PrinterName parameter must be set or printer setting file must have been created by the the IKSaveDevModeHandle, IKSaveDevModeHandleEx, or IKSetPrint function. If both of these have been done then the PrinterName parameter is enabled over the PrintFileName parameter. Which ever parameter you choose, please set the other parameter to a blank string ("",'',NULL,nil,vbNullString).

If this function is successfully executed, the handle to the DEVMODE structure will be returned. These handles are used by the IKPrintCreateDC, the IkPrintCreateDCEx function and the IKPrintDialog function. To free the handles to the DEVMODE and DEVNAMES structures, please execute the IKReleaseDevModeHandle or the IKReleaseDevModeHandleEx function. For more information about the DEVMODE and DEVNAMES structures, please refer to WindowsAPI or related manuals.

The ImageKit10 ActiveX is a product created by Newtone Corporation