Problem with EnabledPre events with version 3.0

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

Problem with EnabledPre events with version 3.0

Post by Maestro »

Hi,
I use PDF converter for a while and everything works fine. I just try to upgrade from 2.5 to 3.0 and I have problems. I am in VB 6 and I have error 459 when I create a new instance of the DLL.
Here is a sample code to show the problem:

' Reference: \windows\systeme32\cdintf300.dll (created by the install)

Private WithEvents PDF As CDIntfEx.CDIntfEx

Private Sub Form_Load()
Set PDF = New CDIntfEx.CDIntfEx
End Sub

Private Sub PDF_EnabledPre()
Stop
End Sub

With this code I have an error 459 (Object or class does not support the set of events).

If I remove the 'WithEvents' in the declaration, I have nor error. But the Event EnabledPre will never be fired.

This code worked with all previous version! (reference : \windows\systeme32\cdintf250.dll (created by the install (of version 2.5)))

Suggestions?

Thanks

Benoit
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

This error is weired. I suggest that you check that the new cdintf is registered on the system and referenced in your project.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Maestro
Posts: 20
Joined: Thu Jun 30 2005

Post by Maestro »

Thanks Joan for your reply,

If I register the new cdintf and use it in my programm, it works. BUT, the cdintf was the one deliver with the version 2.5.
If I remove everything of the version 2.5 and I install the version 3.0, cdintf300.dll is created in the Windows\system32 (no cdintf250.dll as the Common Driver Interrface 300.pdf suggest). With a fresh new install, the code below doesn't work. Even if I register cdintf300.dll or cdintf.dll, the code still not working.
If I reinstall the version 2.5, this code works fine (even if I use cdintf250.dll or cdintf.dll as reference in my VB propramm)

So, I thing there is a problem with this code with the version 3.0

Option Explicit
Private WithEvents PDF As CDIntfEx.CDIntfEx

Private Sub Form_Load()
Set PDF = New CDIntfEx.CDIntfEx
--> give error 459
End Sub

Also, why the reference 'Common Driver Interface Control' is not automatically visible in the references in VB? We have to manually add the reference.

Thanks

Benoit Tremblay
Post Reply