CreateRedirectionDC method (IEPrint)

Visual Basic example

Visual C++ example

 

Syntax

long CreateRedirectionDC(BSTR pszPrinterName, IEpnDeviceSettings *pDeviceSettings, IEpnPrinterList *pPrinterList, IEpnExtraDcOptions* pExtraOptions);

Overview

Refer to Redirecting to a Printer Redirection List

Remarks

Creates a printer 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 redirected to all printers in the printers list pointed to by pPrinterList 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 CreateRedirectionDC 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 CreateRedirectionDC 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 (IEpnExtraDcOptions), CreateSaveDC method, CreateEmailDC method, DeleteDC method

Topics:

ePrint: Printing indirectly to OEM Printers