Locking and Unlocking ePrint COM OEM Printers

By default OEM ePrint Printers are unlocked and any application can print directly to the printer. However, it is possible to lock the printer to prevent other applications from printing directly to the printer.

If the printer is locked, when a user tries to print directly to the printer the following message box appears:

image\OEMlocked.gif

The title for the message box that displays is the OEMProductName property of the IEpnOemPrinterInfo object that can be set using the InstallOEMPrinter method.

The icon that displays in the message box is the AboutIcon property of the IEpnUISettings object that can be set using the SetPrinterUISettings method. If no icon is passed or the icon is not found, the ePrint icon displays instead.

The URL that displays in the message box is the OEMUrl property of the IEpnOemPrinterInfo object that can be set using the InstallOEMPrinter method. If no URL is passed during installation the ePrint URL (http://www.eprintdriver.com) is displayed.

To lock the OEM ePrint Printer, begin by unlocking support for OEM functionality by calling UnlockSupport. Next, call the LockOEMPrinter method, using the same administration password as the password that is passed in the IEpnOemPrinterInfo object when the OEM printer is installed. After the printer is locked, the only way to use the ePrint OEM printer is by creating a device context by using one of the following methods:

image\sqrblit.gif CreateEmailDC – Use this method to create an email redirection device context (DC).

image\sqrblit.gif CreateRedirectionDC – Use this method to create a printer redirection device context (DC).

image\sqrblit.gif CreateSaveDC – Use this method to create a save redirection device context (DC).

When using the CreateXXXXDC methods, use the pExtraOptions parameter to pass the Administration password to the method.

To unlock the OEM ePrint printer to enable any application to print directly to it, call the UnlockOEMPrinter method.

To check whether a specified OEM printer is locked, call the IsOEMPrinterLocked method.