The problem of connecting Library64AX1212 to VB6
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=3498
Printed Date: 06 May 25 at 7:20AM Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com
Topic: The problem of connecting Library64AX1212 to VB6
Posted By: maratovich
Subject: The problem of connecting Library64AX1212 to VB6
Date Posted: 05 Sep 17 at 8:11AM
Win 7 x64
I am registering regsvr32 "C:\Program Files (x86)\Debenu\PDF Library\ActiveX\DebenuPDFLibrary64AX1212.dll"
I use VB6
Private Sub btnHelloWorld_Click() Dim ClassName Dim LicenseKey Dim FileName ClassName = "DebenuPDFLibrary64AX1212.PDFLibrary" LicenseKey = "..." 'SET YOUR LICENSE KEY HERE... FileName = "c:\hello-world.pdf" Dim QP Dim Result Set QP = CreateObject(ClassName) Result = QP.UnlockKey(LicenseKey) If Result = 1 Then
MsgBox "Library version: " + QP.LibraryVersion MsgBox (QP.LicenseInfo)
Call QP.DrawText(100, 500, "Hello world from Visual Basic 6.0.") If QP.SaveToFile(FileName) = 1 Then MsgBox "File " + FileName + " written successfully." Else MsgBox "Error, file could not be written." End If Else MsgBox "Invalid license key. Please set your license key by editing this file." End If End Sub
The library does not work. Error to string: Set QP = CreateObject(ClassName)
Activex component can't create object Error 429
If you use the library x32, then there is no problem. How to use x64 to VB6?
Dmitry
|
Replies:
Posted By: Ingo
Date Posted: 05 Sep 17 at 9:08AM
Hi Dimitry,
vb6 is a 32-bit-ide not working with 64-bit-dlls in a proper way. You can work with vb6 and the 32-bit-dll on a windows-64-bit-system. In this case the 32-bit-dll have to be inserted into the syswow64-path.
Cheers and welcome here,
------------- Cheers, Ingo
|
Posted By: maratovich
Date Posted: 05 Sep 17 at 9:52AM
Thanks for the answer Ingo. I think it's wrong. By connecting the Reference - I get all the methods and properties of the library. But at start-up, an error occurs at the input, I think that this is not related to the bit depth.
Then another question: How to connect using the GetObject? Set myobj = GetObject ("", "ProjectName.ClassName")
|
Posted By: Ingo
Date Posted: 05 Sep 17 at 9:58AM
It should be clear that it's impossible to create a 64-bit-application with vb6 (a 32-bit-ide). So it won't make any sense to link this ide to a 64-bit-dll. If we forget your vb6 the common correct answer will be: A 64-bit-dll on a 64-bit-windows-system should always be in the system32-path.
------------- Cheers, Ingo
|
|