Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, March 30, 2021 5:20:00 AM(UTC)

tytsai  
tytsai

Groups: Registered
Posts: 3

Thanks: 1 times

Hi,
I'm using Visual Studio 2017 to develop Virtual printers.
As tutorial, I install LeadTools toolkits in machine-A and everything works fine.
I can launch my program, install virtual printer and capture print documents in my program.

However, when i run my program in machine-B,
it shows NullReferenceException.
Followings are detail exception messages and any suggest would be appreciated:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at LPDOCLib.IDocumentPrinterFactory.CreateObject2(IDocumentPrinterFactory* , _com_ptr_t<_com_IIID<IDispatch\,\&_GUID_00020400_0000_0000_c000_000000000046> >* , _bstr_t* pszClassID, _bstr_t* pszLic)
at Leadtools.Printer.GetDocumentPrinter(IDocumentPrinter** pPrinter)
at Leadtools.Printer.Printer.IsLeadtoolsPrinter(String printerName)
at MDSVirtualPrinter.src.PrinterWorker.InstallMDSPrinter(String name) in C:\svn\MDSVirtualPrinter\MDSVirtualPrinter\src\PrinterWorker.cs:line 140
at MDSVirtualPrinter.src.ShowPrinterForm.CheckAndInstallMDSPrinter() in C:\svn\MDSVirtualPrinter\MDSVirtualPrinter\src\ShowPrinterForm.cs:line 248
at MDSVirtualPrinter.MainForm.InstallMDSVirtualPrinterToolStripMenuItem_Click(Object sender, EventArgs e) in C:\svn\MDSVirtualPrinter\MDSVirtualPrinter\MainForm.cs:line 199
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

MDSVirtualPrinter
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/tmp/Debug/MDSVirtualPrinter.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

Leadtools
Assembly Version: 21.0.4.0
Win32 Version: 21,0,0,8
CodeBase: file:///C:/tmp/Debug/Leadtools.DLL

System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll

Leadtools.Printer
Assembly Version: 21.0.4.0
Win32 Version: 21,0,0,1
CodeBase: file:///C:/tmp/Debug/Leadtools.Printer.DLL


************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, March 30, 2021 3:47:52 PM(UTC)

Nick  
Nick

Groups: Registered, Tech Support, Administrators
Posts: 161

Was thanked: 9 time(s) in 9 post(s)

I've reached out to you via email.
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Thursday, April 1, 2021 2:50:24 PM(UTC)

Nick  
Nick

Groups: Registered, Tech Support, Administrators
Posts: 161

Was thanked: 9 time(s) in 9 post(s)

Thank you for following up via email.

What's likely causing the issue on the deployment environment is a missing file. See our documentation on "Files to be Included With Your Application".
https://www.leadtools.co...th-your-application.html
https://www.leadtools.co...th-your-application.html

We do include a utility to facilitate bundling the drivers necessary for the virtual printer. You can run the source from your installation folder.
C:\LEADTOOLS21\Examples\DotNet\CS\VirtualPrinterDriverDeploymentTool
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.110 seconds.