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!
CreateObject("QuickPDFAX0723.PDFLibrary") fails |
Post Reply |
Author | |
DanH
Beginner Joined: 19 Feb 13 Location: Dallas, TX Status: Offline Points: 7 |
Post Options
Thanks(0)
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... |
|
darkv
Team Player Joined: 17 Jan 11 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
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 |
|
DanH
Beginner Joined: 19 Feb 13 Location: Dallas, TX Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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." |
|
darkv
Team Player Joined: 17 Jan 11 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
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 |
|
DanH
Beginner Joined: 19 Feb 13 Location: Dallas, TX Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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. |
|
DanH
Beginner Joined: 19 Feb 13 Location: Dallas, TX Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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 |
|
darkv
Team Player Joined: 17 Jan 11 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Dan,
You're right i'm using the dll version, 7.26 Eric |
|
z Dark side is there ...
|
|
DanH
Beginner Joined: 19 Feb 13 Location: Dallas, TX Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Anyone else have any ideas? I'm still stumped here...
|
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
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 |
|
DanH
Beginner Joined: 19 Feb 13 Location: Dallas, TX Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions 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 |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store