LEADTOOLS Virtual Printer (Leadtools.Printer.Client.Installer assembly)
LEAD Technologies, Inc

SetPrinterConnectionDll Method

Example 





Printer name
Printer demo dll
Printer server name
Installs the LEADTOOLS Network Virtual Printer to the client system.
Syntax
public static void SetPrinterConnectionDll( 
   string printerName,
   string printerDll,
   string serverName
)
'Declaration
 
Public Shared Sub SetPrinterConnectionDll( _
   ByVal printerName As String, _
   ByVal printerDll As String, _
   ByVal serverName As String _
) 
'Usage
 
Dim printerName As String
Dim printerDll As String
Dim serverName As String
 
PrinterInstaller.SetPrinterConnectionDll(printerName, printerDll, serverName)
public static void SetPrinterConnectionDll( 
   string printerName,
   string printerDll,
   string serverName
)
 function Leadtools.Printer.Client.Installer.PrinterInstaller.SetPrinterConnectionDll( 
   printerName ,
   printerDll ,
   serverName 
)
public:
static void SetPrinterConnectionDll( 
   String^ printerName,
   String^ printerDll,
   String^ serverName
) 

Parameters

printerName
Printer name
printerDll
Printer demo dll
serverName
Printer server name
Remarks
To uninstall a printer from the client's system, remove the printer from the system's machine using the normal system-specific procedures.
Example
 
Private Sub PrinterInstallerExample()
  Try
     PrinterInstaller.SetPrinterConnectionDll("Test Printer", "C:\Test Dll.dll", "Test Server")
  Catch ex As PrinterDriverClientException
    MessageBox.Show(ex.Message)
  Catch ex As Exception
    MessageBox.Show(ex.Message)
  End Try
End Sub
void PrinterInstallerExample()
{
   try
   {
      PrinterInstaller.SetPrinterConnectionDll("Test Printer", "C:\\Test Dll.dll", "Test Server");
   }
   catch (PrinterDriverClientException ex)
   {
      MessageBox.Show(ex.Message);
   }
   catch (Exception ex)
   {
      MessageBox.Show(ex.Message);
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PrinterInstaller Class
PrinterInstaller Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.