Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
ArgumentNullException |
Post Reply |
Author | |
pearlshaun
Beginner Joined: 28 Jul 14 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 28 Jul 14 at 12:57PM |
I am using the QuickPdf .net DLL and I'm getting exceptions from the DLL class constructor of the provided import header file. Snippet of stack trace below,
System.ArgumentNullException: Value cannot be null. Parameter name: ptr at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t) at External.QuickPDF.DLL..ctor(String dllFileName) in C:\.....\QuickPDF.cs:line 34 at External.QuickPDF.PDFLibrary..ctor(String dllFileName) in C:\.....\QuickPDF.cs:line 2187 I'm using the 32 bit dll (QuickPDFDLL0726.dll) and Ive compiled my project for Any CPU so I dont think its an architecture mismatch. My application is a .net website running in IIS. I have granted the App Pool user full control to the dll, but Im still getting the problem. Any ideas? Cheers
Shaun |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Shaun,
compiling with Option "any" means regarding the actual Environment - so 64 bit. 64 bit won't work with 32-bit-dll. You compiling option should be "x86" or similar. But this won't be all ... there will be further Problems i fear. Sorry. Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Yes. The project needs to be set to x86 and not to AnyCPU. You can use the following code with AnyCPU. if (IntPtr.Size == 4) dllName = "DebenuPDFLibraryDLL1016.DLL"; // 32 bits else dllName = "DebenuPDFLibrary64DLL1016.DLL"; // 64 bits By the way the DLL is not a native .NET DLL. It is a standard Windows DLL. Andrew.
Edited by AndrewC - 28 Jul 14 at 3:03PM |
|
pearlshaun
Beginner Joined: 28 Jul 14 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thanks for the fast responses chaps.
It turned out that you can build for Any CPU in this case, as IIS allows you to specify an app pool to run in WOW64, which I have only just discovered. This has resolved the issue. Thanks for the tips though it steered me in the right direction *tips hat* |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store