Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Never MInd I got 2 different examples mixed up and spliced together.
Started by CaveMan2 at 02-22-2008 11:48. Topic has 2 replies.

Print Search « Previous Thread Next Thread »
  02-22-2008, 11:48
CaveMan2 is not online. Last active: 2/7/2008 5:33:55 AM CaveMan2

Top 200 Posts
Joined on 06-07-2007
Posts 12
Invalid parameter????
Reply Quote
Hello all:

I get a invalid paramater on the appprinter line and I do not see how.

Imports LPEPCLib
Public Class SSMain
Dim WithEvents ePrintEvents As EPrint
Const PRINTER_NAME = "MS ePrint"
Const DMPAPER_USER = 1


'Application Loading and Shut down
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ePrintEvents = New EPrint
ePrintEvents.UnlockSupport(SupportLockConstants.SUPPORT_GENERAL, "unlock code goes here")
Dim PrinterSpecifications As New EpnPrinterSpecifications
Dim MultiSaveOptions As New EpnMultiSaveOptions
Dim PrintersList As New EpnPrinterList
Dim nRet As Integer
ePrintEvents.AddPrinter(PRINTER_NAME, PrinterTypeConstants.PRINTER_OEM_NORMAL) ***** See Error Below *****
If nRet = 0 Then
'Prepare Save Options
MultiSaveOptions.UseSave = True
'MultiSaveOptions.SaveElementsCount = 1
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.FileName = "E:\Build\eRecords.tif"
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.Format = ePrintFileConstants.FILE_CCITT_GROUP4
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.DocumentType = DocumentTypeConstants.FT_SAVE_TYPE_RASTER
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.RasterOptions.BitsPerPixel = 1
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.RasterOptions.QFactor = 100
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.RasterOptions.StampBits = 24
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.RasterOptions.StampWidth = 128
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.RasterOptions.StampHeight = 128
MultiSaveOptions.PrinterSaveOptions(0).SaveOptions.RasterOptions.MultiPageFile = True
'Set OEM Printer Save Options
ePrintEvents.SetPrinterSaveOptions(PRINTER_NAME, MultiSaveOptions)
' Set Printer Conflict Solve
Dim RenamingOptions As New EpnRenamingOptions
ePrintEvents.GetDefaultRenamingOptions(RenamingOptions)
ePrintEvents.SetPrinterConflictSolving(PRINTER_NAME, OverwriteConstants.SAVE_APPEND_FAVOR_RENAME, RenamingOptions)
End If
   Report 
  02-22-2008, 11:49
CaveMan2 is not online. Last active: 2/7/2008 5:33:55 AM CaveMan2

Top 200 Posts
Joined on 06-07-2007
Posts 12
Sorry forgot the error.
Reply Quote
System.Runtime.InteropServices.COMException was unhandled by user code
ErrorCode=-2146808275
Message="LEAD Error: Invalid parmameter passed"
Source="LEADePrint.LEADePrint.140"
StackTrace:
at LPEPCLib.EPrintClass.AddPrinter(String pszPrinterName, PrinterTypeConstants PrinterType)
at SaftyScan__R_.SSMain.Form1_Load(Object sender, EventArgs e) in F:\Development\VB2005\Front End\SaftyScan (R)1\SaftyScan (R)1\SSMain.vb:line 30
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   Report 
  02-22-2008, 15:39
CaveMan2 is not online. Last active: 2/7/2008 5:33:55 AM CaveMan2

Top 200 Posts
Joined on 06-07-2007
Posts 12
Never MInd I got 2 different examples mixed up and spliced together.
Reply Quote
I got it working.

   Report 
Post
LEAD Support Fo... » Enduser » ePrint » Never MInd I got 2 different examples mixed up and spliced together.

Powered by Community Server, by Telligent Systems