Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - CreateObject("QuickPDFAX0723.PDFLibrary") fails
  FAQ FAQ  Forum Search   Register Register  Login Login

CreateObject("QuickPDFAX0723.PDFLibrary") fails

 Post Reply Post Reply
Author
Message
DanH View Drop Down
Beginner
Beginner


Joined: 19 Feb 13
Location: Dallas, TX
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DanH Quote  Post ReplyReply Direct Link To This Post Topic: CreateObject("QuickPDFAX0723.PDFLibrary") fails
    Posted: 23 Feb 13 at 5:03PM
I'm working on a VB.NET application (Visual Studio 2010) and am having problems creating the QPDF object.  I'm using the following code:

Dim qp As QuickPDFAX0723.PDFLibrary
qp = CreateObject("QuickPDFAX0723.PDFLibrary")

The above raises a "Cannot create ActiveX object".  I've tried registering Interop.QuickPDFAX0723.dll on my system but to no avail.  I'm on Windows 7 (64 bit).  I've set the target platform in my project to x86 and tried running regsvr32.exe both from the System32 and Syswow64 directories and each time I'm given the error "The module Interop.QuickPDFAX0723.dll was loaded but the entry point DllRegisterServer was not found.  Make sure that Interop.QuickPDFAX0723.dll is a valid DLL or OCX file and then try again."

If I change the code to the following:

Dim qp As New QuickPDFAX0723.PDFLibrary

I get the following error:

"System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {5530475D-F0A2-41BF-AA94-72FA0779289D} failed due to the following error: 80040154."

I can't find the CLSID in the registry. 

Can't get past this problem...

Back to Top
darkv View Drop Down
Team Player
Team Player
Avatar

Joined: 17 Jan 11
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote darkv Quote  Post ReplyReply Direct Link To This Post Posted: 23 Feb 13 at 11:29PM
Dan,

can you try the following

dim qp as pdflibrary
qp=new pdflibrary("path to you quickpdflib.dll")

It works perfect for me, in the same context

Rgds
Eric
Back to Top
DanH View Drop Down
Beginner
Beginner


Joined: 19 Feb 13
Location: Dallas, TX
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DanH Quote  Post ReplyReply Direct Link To This Post Posted: 23 Feb 13 at 11:48PM
The following line is fine as long as I have "Imports QuickPDFAX0723":

dim qp as pdflibrary 'accepts this if I add

But it won't compile with the following line. It getsthe error "Too many arguments to 'Public Sub New()':

qp=new pdflibrary("path to you quickpdflib.dll")

If I change the above to just "qp=new pdflibrary()" then it compiles fine but still gets the run time error "Retrieving the COM class factory for component with CLSID {5530475D-F0A2-41BF-AA94-72FA0779289D} failed due to the following error: 80040154."


Back to Top
darkv View Drop Down
Team Player
Team Player
Avatar

Joined: 17 Jan 11
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote darkv Quote  Post ReplyReply Direct Link To This Post Posted: 25 Feb 13 at 7:52AM
Dan,

Sorry about forgot the imports line.

I'm very surprized, i used this for a while and it works perfectly
(even when running the exec on a computer which just have the dll and nothing registered)

can you try to store the dll path in a string, and call new pdflibrary(string_where_you_stored_path)

Which .net framework do you compile with?

Rgds
Eric
Back to Top
DanH View Drop Down
Beginner
Beginner


Joined: 19 Feb 13
Location: Dallas, TX
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DanH Quote  Post ReplyReply Direct Link To This Post Posted: 26 Feb 13 at 3:27AM
Originally posted by darkv darkv wrote:

Dan,

Sorry about forgot the imports line.

I'm very surprized, i used this for a while and it works perfectly
(even when running the exec on a computer which just have the dll and nothing registered)

can you try to store the dll path in a string, and call new pdflibrary(string_where_you_stored_path)

Which .net framework do you compile with?


If the class' New() method doesn't take an argument, then placing the string in a variable and passing it won't solve the problem. 

I'm using the ActiveX version.  Maybe you're using the DLL version and that's why it works differently for your code.

I'm targeting 2.0 of the .NET framework.
Back to Top
DanH View Drop Down
Beginner
Beginner


Joined: 19 Feb 13
Location: Dallas, TX
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DanH Quote  Post ReplyReply Direct Link To This Post Posted: 26 Feb 13 at 3:28AM
By the way, I'm working with version 7.23 of QuickPDF.  If you're on a different version then that might also explain the difference.


Edited by DanH - 26 Feb 13 at 3:30AM
Back to Top
darkv View Drop Down
Team Player
Team Player
Avatar

Joined: 17 Jan 11
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote darkv Quote  Post ReplyReply Direct Link To This Post Posted: 26 Feb 13 at 7:20AM
Dan,

You're right i'm using the dll version, 7.26

Eric

z Dark side is there ...
Back to Top
DanH View Drop Down
Beginner
Beginner


Joined: 19 Feb 13
Location: Dallas, TX
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DanH Quote  Post ReplyReply Direct Link To This Post Posted: 01 Mar 13 at 3:34AM
Anyone else have any ideas?  I'm still stumped here...
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 03 Mar 13 at 7:37AM
1. You need to have the 'imports QuickPDFAX0723"' line in the code.

2. With the ActiveX version you don't need to specify DLL name as the CLSID is already in the QuickPDFAX0723.vb file.

3. The 80040154 is a very common error and usually happens when the ActiveX has not been registered correctly.  regsvr32 needs to be run using an Administrator account.

The QuickPDFAX0723.DLL should not be added to your project as a reference.  Only the QuickPDFAX0723.vb file should be added as a reference.  The ActiveX is a standard OCX type DLL and not a .NET DLL.

There should not be any differences between 7.23 and 7.26 in respect to getting the ActiveX registered and running in your application.

Here is some VB.NET code for QPL 8.14 which again is not much different.  The QuickPDFAX0814.vb is added to the project as a reference.  The platform is set to x86 and I am using .NET 4.0.

Andrew

/-----------------------------------------------------------------------------------------

Imports QPL_VB_ActiveX_Sample.QuickPDFAX0814

Public Class Form1

    Dim QuickPDF As PDFLibrary
    Dim Result As Integer


    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        QuickPDF = New PDFLibrary()

        Result = QuickPDF.UnlockKey("<insert your license key here>")

        MessageBox.Show(Result)

    End Sub
End Class

/-----------------------------------------------------------------------------------------


Andrew.


Edited by AndrewC - 03 Mar 13 at 7:42AM
Back to Top
DanH View Drop Down
Beginner
Beginner


Joined: 19 Feb 13
Location: Dallas, TX
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DanH Quote  Post ReplyReply Direct Link To This Post Posted: 03 Mar 13 at 5:41PM
Originally posted by AndrewC AndrewC wrote:

1. You need to have the 'imports QuickPDFAX0723"' line in the code.

2. With the ActiveX version you don't need to specify DLL name as the CLSID is already in the QuickPDFAX0723.vb file.

3. The 80040154 is a very common error and usually happens when the ActiveX has not been registered correctly.  regsvr32 needs to be run using an Administrator account.

The QuickPDFAX0723.DLL should not be added to your project as a reference.  Only the QuickPDFAX0723.vb file should be added as a reference.  The ActiveX is a standard OCX type DLL and not a .NET DLL.

Andrew


Thanks for your response Andrew.  But I don't have a QuickPDFAX0723.vb in my project.  This is a project that was handed over to me over a year ago.  At the time I was able to load and run the project with no problems.  I'm on a different computer now and am having the problems mentioned in the original post.

I think that the key point of my problem touched on when you said "
The 80040154 is a very common error and usually happens when the ActiveX has not been registered correctly.  regsvr32 needs to be run using an Administrator account."  I'm sure that if I could register the Interop.QuickPDFAX0723.dll file that would be the end of my problem.  But I can't and have no idea why I can't...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store