Print Page | Close Window

DLL failing to unlock in new application

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3647
Printed Date: 01 May 24 at 1:24AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: DLL failing to unlock in new application
Posted By: sdumont
Subject: DLL failing to unlock in new application
Date Posted: 10 Dec 18 at 6:52PM
Hey everyone,
 
I'm having difficulty transferring my .dll file to a new program. It will unlock and do what I want in my existing application but when I take those .vb and .dll files and import them into a new project, it fails to unlock and does not have an error code. Here's the code I'm using, it consistently returns unlockkey of 0 and lasterrorcode of 0:
Imports Programname.QuickPDFDLL0725

Public Class PDFBuilder

Public QPD As PDFLibrary

Public Sub New()

Try

Dim PDF_LIBRARY_PATH As String = Application.StartupPath & "\objects\" & "QuickPDFDLL0725.dll"

Const PDF_LIC_KEY As String = "licensekey"

QPD = New PDFLibrary(PDF_LIBRARY_PATH)

Dim unlocked_flag As Integer = QPD.UnlockKey(PDF_LIC_KEY)

MsgBox(unlocked_flag)

Catch ex As Exception

MsgBox(ex.ToString)

End Try

End Sub

End Class




Replies:
Posted By: Ingo
Date Posted: 11 Dec 18 at 9:25AM
does the new project/app find the QuickPDF.dll?
How are your new compile settings?
These old QuickPDF.dll is a 32-bit-dll - please keep this in mind.
What type of system you're using for the new project... 32- or 64 bit?



-------------
Cheers,
Ingo



Posted By: sdumont
Date Posted: 21 Dec 18 at 8:03PM
Thanks again for your help Ingo, the problem was indeed related to the type of CPU I was compiling for. After changing it over to x86 in Visual Studio it works now!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk