Printer Driver Files To Be Included With Your Application

After an application is developed and ready to redistribute, create a setup.exe that includes all of the necessary files.

This topic summarizes which files to include on your distribution diskettes to support the LEADTOOLS Virtual Printer functions on WIN32 and x64 systems.

Note: You may not copy or redistribute any of the following files without obtaining the proper license. In some cases, the license is included with your initial purchase of LEADTOOLS. In other cases, you must obtain a license from a third party or enter into a royalty agreement with LEAD to obtain the proper license.

General Notes:

Environment-Specific notes:

Destination directory structure specification:

Use the Install method to install the LEADTOOLS Virtual Printer Module. Pass the structure PrinterInfo to this function. The installation path specified in the RootDir member of the PrinterInfo structure is the root folder in which the LEADTOOLS Virtual Printer is installed. This folder should contain two sub-folders:

Note: All users of the printer must have access to the folder specified in the RootDir member.

Printer Driver INF installation for Windows Vista and later:

[DllImport("user32.dll")] 
static extern IntPtr GetDesktopWindow(); 
                       
[DllImport("Winspool.drv")] 
static extern Int32 UploadPrinterDriverPackage(string pszServer, string pszInfPath, string pszEnvironment, uint dwFlags, IntPtr hwnd, StringBuilder pszDestInfPath, out ulong pcchDestInfPath); 
                       
[DllImport("Winspool.drv")] 
static extern Int32 InstallPrinterDriverFromPackage(string pszServer, string pszInfPath, string pszDriverName, string pszEnvironment, uint dwFlags); 
                       
static Int32 InstallDriverPackage(string infPath, string environment) 
{ 
   IntPtr handle = GetDesktopWindow(); 
   StringBuilder targetPath = new StringBuilder(512); 
   ulong targetPathLength = 512; 
   Int32 result = UploadPrinterDriverPackage(null, infPath, environment, 2, handle, targetPath, out targetPathLength); 
   if(result == 0) 
      result = InstallPrinterDriverFromPackage(null, targetPath.ToString(), "LEADTOOLS VIRTUAL PRINTER", environment, 0); 
                       
   return result; 
} 

InstallDriverPackage(Redist\\DriverPackageX64\\LeadtoolsVirtualPrinter.INF, "Windows x64");

InstallDriverPackage(Redist\\DriverPackageX86\\LeadtoolsVirtualPrinter.INF, "Windows NT x86");

Note: For Network printing, it is possible to install both packages (x86 and x64) on the Server machine in order to support both types of client machines.

Required LeadtoolsPrinter.exe files:

Required COM Servers:

Redistributables (32-bit) Explanation
LPCLB06N.DLL LEADTOOLS Printer COM server. Should be registered using regsvr32 (regsvr32 LPCLB06N.DLL).
LPCMG06N.exe LEADTOOLS Printer COM Server. Should be registered using /RegServer (LPCMG06N /Regserver)
LPWSE06N.EXE LEADTOOLS Printer COM Server. Should be registered using /RegServer (LPWSE06N /Regserver) and unregistered using /UnRegServer (LPWSE06N /UnRegServer).
LPCPN06N.dll LEADTOOLS Printer COM server, Should be registered using regsvr32 (regsvr32 LPCPN06N.DLL).
LPPRNCON.DLL LEADTOOLS Printer COM server. Should be registered using regsvr32 (regsvr32 LPPRNCON.DLL).
LpPrinterThunk.exe LEADTOOLS Printer COM Server. Should be registered using /RegServer (LpPrinterThunk /Regserver) and unregistered using /UnRegServer (LpPrinterThunk / UnRegServer).

Required DLLs for Win32:

Redistributables (32-bit) Explanation
LPDRV06N.DLL Driver DLL
LPUID06N.DLL Driver DLL
LPPMN06U.DLL Port DLL
LPDRV06X.DLL (64-bit Driver), needed only for network printers. Driver DLL
LPUID06X.DLL (64-bit Driver), needed only for network printers. Driver DLL

Required DLLs for x64:

Redistributables (64-bit) Explanation
LPDRV06x.DLL Driver DLL
LPUID06x.DLL Driver DLL
LPPMN06x.DLL Port DLL
LPDRV06N.DLL (32-bit Driver), needed only for network printers. Driver DLL
LPUID06N.DLL (32-bit Driver), needed only for network printers. Driver DLL
Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Imaging, Medical, and Document