Locking and Unlocking ePrint C DLL 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 pszOEMProductName member of the EPNOEMPRINTERINFO structure that can be set using the L_EpnInstallOEMPrinter function.

The icon that displays in the message box is the pszAboutIcon member of the EPNUISETTINGS structure that can be set using the L_EpnSetPrinterUISettings function. 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 pszOEMUrl member of the EPNOEMPRINTERINFO structure that can be set using the L_EpnInstallOEMPrinter function. 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 L_EpnUnlockSupport. Next, call the L_EpnLockOEMPrinter function, using the same administration password as the password that is passed in the EPNOEMPRINTERINFO structure 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 C DLLs:

L_EpnCreateEmailDC – Use this function to create an email redirection device context (DC).

L_EpnCreateRedirectionDC – Use this function to create a printer redirection device context (DC).

L_EpnCreateSaveDC – Use this function to create a save redirection device context (DC).

When using the L_EpnCreateXXXXDC functions, use the pExtraOptions parameter to pass the Administration password to the function.

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

To check whether a specified OEM printer is locked, call the L_EpnIsOEMPrinterLocked function.