Error 459 w. VB6 and v3.00 of Amyuni PDF Converter

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
Maestro
Posts: 20
Joined: Thu Jun 30 2005

Error 459 w. VB6 and v3.00 of Amyuni PDF Converter

Post by Maestro »

Hello all,

My colleague posted about this problem some time ago, but here's a more detailed version:

In VB6, when using the PDF Converter v3.00, if we declare our PDFPrinter variable "WithEvents", we get an error 459 "Object or class does not support the set of events" as soon as we instantiate the object.

This behavior worked properly using v2.50 and prior versions of the Converter. We need the "WithEvents" to be able to call the EnablePrinter() function when the event EnabledPre() is raised, otherwise we get the dreaded error -30...

All components are installed and properly registered...

Can anyone confirm this behavior and/or recommend a workaround? T.I.A!

To reproduce this problem:
1 - Install v3.00 on a workstation NOT having any other PDF Converter version installed.
2 - Open a new, blank VB6 project.
3 - In the project's references, click 'Browse' and add "C:\Windows\System32\cdintf300.dll"
4 - Place the following code in a VB6 Form with one Command button on it, then run and click the button.

Code: Select all

Option Explicit

Private WithEvents PDFConverter As CDIntfEx.CDIntfEx

Private Sub Command1_Click()

   On Error Resume Next
   
   Set PDFConverter = New CDIntfEx.CDIntfEx   ''This line generates the error 459...
   
   If Err.Number = 0 Then
      MsgBox "PDFConverter created.", vbInformation
   Else
      MsgBox "PDFConverter NOT created, err.Number = " & Err.Number & vbNewLine & Err.Description, vbCritical
   End If
   
End Sub
Maestro
Posts: 20
Joined: Thu Jun 30 2005

Post by Maestro »

Update:

I just tried this on a clean VMWare image of Win XP Pro that had never seen any PDF Converter installation and got the same result: error 459 as soon as the object is instantiated...

This would seem to confirm the observed behavior and rule out any flawed/mixed installation on our developper workstations...

Is there anyone out there using v3.00 with VB6 and the "WithEvents" ? (if so, how?)
David
Amyuni Team
Posts: 89
Joined: Mon Dec 18 2006

Post by David »

Hello

With the version (3.01a) currently on the site, i was not able to reproduce the error you are encountering.

Can you download this version and let us know if you still get the same thing.

Thanks
David
Post Reply