This function retrieves the handle to the pointer of 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]     HANDLE IKGetDevModeHandle(LPCTSTR PrinterName, LPCTSTR PrintFileName);
[Delphi]         function IKGetDevModeHandle(PrinterName, PrintFileName: PChar): THandle;

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 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 pointer of 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 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 pointer of the DEVMODE structure will be returned. This pointer is used by the IKPrintCreateDC function. To free the handle to the pointer of the DEVMODE structure, please execute the IKReleaseDevModeHandle function. For more information about the DEVMODE structure, please refer to WindowsAPI or related manuals.

The ImageKit10 VCL is a product created by Newtone Corporation