LockOEMPrinter method (IEPrint)

Visual Basic example

Visual C++ example

 

Syntax

short LockOEMPrinter(BSTR pszPrinterName, BSTR pszPassword);

Overview

Refer to Using the OEM Version of ePrint.

Remarks

Locks a specified OEM printer to prevent applications from directly printing to it.

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

Call this method to lock the OEM printer. OEM printers are installed by calling InstallOEMPrinter method. When InstallOEMPrinter method was called, the string passed to the pszPassword parameter must be the same as the string set in the OEMPassword property of the IEpnOemPrinterInfo object.

If the OEM printer is locked, the user can use it indirectly by using one of the following methods:

CreateEmailDC

CreateRedirectionDC

CreateSaveDC

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

See Also

Elements:

UnlockOEMPrinter method, UnlockSupport method, InstallOEMPrinter method, UninstallOEMPrinter method, CreateSaveDC method, CreateRedirectionDC method, CreateEmailDC method, IsOEMPrinterLocked method

Topics:

ePrint: Locking and Unlocking OEM Printers

 

Types of Printers