Print Page | Close Window

Instance Creation

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=2960
Printed Date: 28 Apr 24 at 5:28PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Instance Creation
Posted By: justincolangelo
Subject: Instance Creation
Date Posted: 20 Aug 14 at 10:30PM
I am unable to create an instance using PDFLibrary in C#.

The dll lives at c:/the project directory/lib/DebenuPDFLibraryDLL1016.dll

I generate the path and also tried hard coding it.

    var dllPath = AppDomain.CurrentDomain.BaseDirectory +     "Lib\\DebenuPDFLibraryDLL1016.dll";

I've included the import file: DebenuPDFLibraryDLL1016.cs

Inside the constructor, dll.dllHandle is always 0. The object is never instantiated.

            dll = new DLL(dllFileName);
            if (dll.dllHandle != IntPtr.Zero)
            {
               instanceID = dll.DebenuPDFLibraryCreateLibrary();
               dll.RegisterForShutdown(instanceID);
            }
            else
            {
               // always gets here
               dll = null;
            }

Does anyone know why this would happen aside from having the wrong location of the dll? I have uninstalled / reinstalled the quick pdf data a few times.



Replies:
Posted By: Ingo
Date Posted: 22 Aug 14 at 7:27PM
Hi Justin,

i've made similar experiences.
Try to put the dll into system32 or syswow64.
If your .net-app is made as 64 bit and if the qp.dll is 64 bit then it should be on 64-bit-systems in system32.
If your .net-app is made as 32 bit and if the qp.dll is 32 bit then it should be on 64-bit-systems in syswow64.
Bit-architecture should always the same for app and dll.

Cheers and welcome here,
Ingo




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




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