Print Page | Close Window

Issue Finding DLL - C# Sample

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=3268
Printed Date: 29 Apr 25 at 11:39AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Issue Finding DLL - C# Sample
Posted By: Cefeg
Subject: Issue Finding DLL - C# Sample
Date Posted: 16 Feb 16 at 10:15PM
Using VS 2015 and Windows 10 Pro. We have paid license to Quick PDF Library1115. Downloaded the C# sample code. Copied both DebenuPDFLibraryDLL11115.dll and .cs to programs folder with Form1.cs, designer and Program.cs. The project uses .Net framework 4.5.2.

Compiling is error free, but on running this always falls through If (qp.LibraryLoaded()) with the error Could not locate Debenu Library...

Any suggestions to find the library? Could there be an issue with VS 2015 and Win 10 and this sample?





Replies:
Posted By: Ingo
Date Posted: 17 Feb 16 at 9:57PM
Hi Cefeg,

your C#-project will be in debug- or release-mode and the compiling option will be "any cpu" (=64 bit) or "x86" (=32 bit).
So this would mean for 32 bit that the dll should be in "...\bin\x86\debug\" or in "...\bin\x86\release\".
Another option was the common place syswow64 for a 32-bit-dll (on a 64 bit system) or system32 for a 64-bit-dll (on a 64 bit system) or system32 for a 32-bit-dll (on a 32 bit system).

Cheers and welcome here (and good luck ;-)
Ingo



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



Posted By: Cefeg
Date Posted: 18 Feb 16 at 12:03AM
Hi Ingo,

Placing the DLL in bin\debug worked just fine. Thanks so much. It is always the simple solutions that solve the puzzling issues.

Thanks for your welcome and thanks again for your help. Lots of points to you.

Clark
Smile


Posted By: Cefeg
Date Posted: 09 Mar 16 at 2:32AM
Hi,  The locations for the QuickPDF DLL mentioned above worked fine until we upgraded to Windows 10, VS 2015 Community Edition, .NET 4.6.1 and switched to Release configuration. No problem in Debug config. But in Release config we continually get the License Unlock error or Could not locate the DLL error. 

The DLL is in the bin\Release folder as mentioned above.

Does the DLL in line below require a path? I've tried to no avail.
PDFLibrary qp = new PDFLibrary("DebenuPDFLibraryDLL1115.dll");

Regards, Clark


Posted By: Ingo
Date Posted: 11 Mar 16 at 10:05PM
Hi Clark,

how are the settings in VS (any cpu or x86)?
These settings are important finding the dlls (in the path with x86 or the 64-bit-release-path).
What you can do always is copying the dll (are you using 32- or 64-bit-dll?) into the syswow64 or system32.



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



Posted By: Cefeg
Date Posted: 12 Mar 16 at 1:06AM
None of the above works with Release version. Always works with Debug. Using Any CPU. The DLL is in the project folder, bin\debug and bin\release folders. Also the DLL is in System32 and SysWow64. I am running VS Community Edition on Windows 10/64 with a 64-bit machine. Have not changed the code from the Demo except adding our unlock key.

A Reference to the DLL cannot be made. Reason is Not found, check the path.
This is the PDF Library path I am using;
        PDFLibrary qp = new PDFLibrary("DebenuPDFLibraryDLL1115.dll");

Is this path correct? Any ideas?


Posted By: Ingo
Date Posted: 12 Mar 16 at 1:46PM
Hi Clark,

it depends on what type of dll you're using.
The 32-bit- or the 64-bit-version?
You are on a 64-bit-system so a 32-bit-dll should be in the syswow64-path and a 64-bit-dll should be in the system32-path (copying the one dll in both path won't be a good solution ;-)
In VS it's the same:
32-bit-dlls into the path for 32-bit-dlls and 64-bit-dlls into the path for 64-bit-dlls.
Which paths in VS will be relevant you can control with the settings what you wanna build... a 32-bit-app or a 64-bit-app.
A 32-bit-dll will never work with 64-bit-settings in VS.
 


-------------
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