InvalidActiveXStateException error message

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
Grenville
Posts: 4
Joined: Mon Aug 13 2007

InvalidActiveXStateException error message

Post by Grenville »

Case (.Net 2005, WinXP):

(reference added AxInterop.CDIntfEx)
********************************
Imports AxCDIntfEx

Public Class Form1
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Dim cdiSetting As New AxCDIntfEx.AxCDIntfEx
cdiSetting.DriverInit("theprinter")
' code continues...
End Sub
End Class
*****************************

Code was provided to me (can't contact the author). The DriverInit throws an InvalidActiveXStateException error. It used to work (guess in .Net 2003).

Any clue will be appreciatted.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

DriverInit will typically fail if the printer name supply to the method can not be found in the Printers and Faxes folder.

Can you verify if you have a printer called “theprinter” installed?

cdiSetting.DriverInit("theprinter")

Hope this helps?
Grenville
Posts: 4
Joined: Mon Aug 13 2007

Post by Grenville »

Thanks for the reply. The printer&driver was corrrecly installed. But I rewrite the code from zero and now is working (dont ask me why). Bad idea to use a code made for another programmer, worst if is in VS2003....
Post Reply