Print Page | Close Window

Use of 64-Bit

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2014
Printed Date: 22 Nov 24 at 11:08PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Use of 64-Bit
Posted By: Jim Sullivan
Subject: Use of 64-Bit
Date Posted: 26 Oct 11 at 3:23PM
So I see that there are 2 separate DLL files, one for 32-bit and one for 64-bit.  I have an ASP.NET application that I distribute to several customers.  Some of them will want to use the 32-bit and some the 64-bit version.  In fact, at least one of them will want to run 64-bit on one server and 32-bit on another server.
 
Is there a way to compile my application once and just have the customer swap in the proper library?  My industry (healthcare) is heavily regulated and if I have to compile two separate versions of my software, it will double my testing since I have to run complete validations every time I compile.



Replies:
Posted By: AndrewC
Date Posted: 27 Oct 11 at 12:45AM
[Updated] Normally 32 and 64 bit EXE files are totally different and you cannot have a single EXE that runs in either 32 bits or 64 bits depending on the host OS.  

Apparently with C# you can select your EXE to target Any CPU.  There following code in the C#  QuickPDFDLL08xx.cs file should allow the CS file to choose the correct DLL at runtime.

string DLLFileName;
if (IntPtr.Size == 4)
{
  DLLFileName = "QuickPDFDLL0813.dll";
}
if (IntPtr.Size == 8)
{
  DLLFileName = "QuickPDF64DLL0813.dll";
}
There is still the issue that you have two separate DLL files which could have different bugs.  In fact we have found such a bug already in the QPL code so you would need to do some testing of both versions when it comes to testing the QPL functions.


Andrew.


Posted By: Dan
Date Posted: 08 Nov 11 at 10:51PM
I'm doing it a little different. I renamed the dll to QuickPDFDLL.dll and placed that in a Bin folder I created on my D drive. Just take the appropriate dll version, 32 or 64 bit, and copy it to the system then rename it. My code looks like:

Dim DLLPath As String = "D:/Bin/QuickPDFDLL.dll"
Dim pdf As PDFLibrary = New PDFLibrary(DLLPath)

If Not pdf.LibraryLoaded() Then
     Throw New Exception("QuickPDF Library Not Loaded from location: " & DLLPath)
End If

If pdf.UnlockKey("Your Key") = 0 Then
     Throw New Exception("Did not unlock QuickPDF")
End If

As Andrew pointed out there could be a need to test each version separately to comply with HIPAA regulations. I can't imagine you'd need to test too exhaustively as it's the data you need to protect, right? Access controls around the data should protect you from about any difference in the versions.

Dan



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