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

[C++Builder/Visual C++]     HANDLE IKGetDevModeHandle(LPCTSTR PrinterName, LPCTSTR PrintFileName);
[Delphi]         function IKGetDevModeHandle(PrinterName, PrintFileName: PChar): THandle;
[Visual Basic]   Function IKGetDevModeHandle(ByVal PrinterName As String, ByVal PrintFileName As String) 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)

Return Value

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

Explanation

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

Prior to executing the IKGetDevModeHandle 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. This pointer is used by the IKPrintCreateDC and the IkPrintCreateDCEx function. To free the handle to the DEVMODE structure, please execute the IKReleaseDevModeHandle or the IKReleaseDevModeHandleEx function. For more information about the DEVMODE structure, please refer to WindowsAPI or related manuals.

The ImageKit10 ActiveX is a product created by Newtone Corporation