CreateSaveDC method (IEPrint)

Visual Basic example

Visual C++ example

 

Syntax

long CreateSaveDC(BSTR pszPrinterName, IEpnDeviceSettings * pDeviceSettings, IEpnPrinterSaveOptions *pPrinterSaveOptions, IEpnExtraDcOptions* pExtraOptions);

Overview

Refer to Redirecting to Save to a File

Remarks

Creates a save redirection device context (DC).

Support for Basic functionality must be unlocked by calling the UnlockSupport method before using this method.

The created DC can be used as an ordinary printer DC. Each GDI command executed for this DC will be saved as a file with the file save options pointed to by the pPrinterSaveOptions parameter.

Before using the created DC, the user should call the StartDoc and StartPage methods. After using the created DC the user should call the EndPage and EndDoc methods.

When the created DC is no longer needed, it should be deleted by calling DeleteDC method. For every DC created using CreateSaveDC there must be a call to DeleteDC to free it.

For OEM Printers:

If the OEM printer is locked, then the user can use it indirectly by using this method.

To use the locked OEM printer indirectly, pass a valid data to the pExtraOptions parameter. Please note that the value of the Password property (IEpnExtraDcOptions) must be set by the administration password that was used when the OEM printer was installed by calling the InstallOEMPrinter method.

If the printer is locked and either NULL or an invalid password is supplied in pExtraOptions, the CreateSaveDC method will fail and return 0.

For more information, refer to Locking and Unlocking the OEM ePrint Printer.

See Also

Elements:

LockOEMPrinter method, UnlockOEMPrinter method, UnlockSupport method, InstallOEMPrinter method, UninstallOEMPrinter method, Password property, CreateRedirectionDC method, CreateEmailDC method, DeleteDC method

Topics:

ePrint: Printing indirectly to OEM Printers