Print Page | Close Window

Newbie question: iSED and .NET

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=994
Printed Date: 07 Jul 25 at 2:48AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Newbie question: iSED and .NET
Posted By: groston
Subject: Newbie question: iSED and .NET
Date Posted: 14 Dec 08 at 4:50PM
Not really a newbie, but haven't used this for years.

Would someone please summarize the steps for using the DLL with a .NET application in such a manner that the application can be easily moved to another computer. (In this context, 'easily' means without having to 'install' the DLL on the target machine.)

Many thanks.




Replies:
Posted By: Ingo
Date Posted: 15 Dec 08 at 1:28AM
Hi!

It's not the best way but you can use this "not-.NET-dll" in .NET-applications, too. Please read here about the "how to" and "what to do":
http://msdn.microsoft.com/en-us/library/26thfadc.aspx

Cheers, Ingo



Posted By: Jim Sullivan
Date Posted: 27 Jan 09 at 2:13PM

Has anyone done this?  I'd really like to see some actual examples.



Posted By: Ingo
Date Posted: 27 Jan 09 at 2:44PM
Hi Jim!
 
What about you?
Then we have here some examples for all users. It's a good idea. Please do it.
 
Cheers, Ingo
 


Posted By: Jim Sullivan
Date Posted: 28 Jan 09 at 12:01PM
If nobody has done it, I will be trying it myself.  I will return and update my status.


Posted By: Jim Sullivan
Date Posted: 09 Mar 09 at 2:52PM
I've got this working in my ASP.NET application.  You use the iSQP0511DotNet.cs file from the DLL zip.  You import the DLL into your application.  In my app, it goes in the bin folder.  Then you use the class name from the cs file to create your classes.  The application will find the dll in the local folder and be able to use the functions without the DLL being registered.
 


Posted By: Jim Sullivan
Date Posted: 11 Mar 09 at 1:06PM
I've found a major issue with this use.
 
The DLLImport function from the C# file requires the use of "static".  If you convert to VB, it uses "shared".  This means that every instance of a QuickPDF that you use will share the same memory, which is a disaster (for me anyway).  Here's some code:
 
dim obj1 as new QuickPDF
dim obj2 as new QuickPDF
 
obj1.unlockkey("key")
obj2.unlockkey("key")
 
obj1.drawtext(100,100,"Hello World")
obj2.drawtext(100,200,"Goodbye World")
----------------
 
In this case, both of your objects will have both "Hello World" and "Goodbye World".
 
I tried using Declare instead of dllimport, but I got the same result.
 
 


Posted By: Ingo
Date Posted: 11 Mar 09 at 2:43PM
Hi Jim!

This is still one of the main problems with the rising of .NET...
I've posted it already before but perhaps you didn't see it. You can use a non static dll with C#, too.
Please read here:
http://msdn.microsoft.com/en-us/library/26thfadc.aspx
from the ...
.NET Framework Developer's Guide
in chapter ...
Consuming Unmanaged DLL Functions

Cheers, Ingo



Posted By: Jim Sullivan
Date Posted: 11 Mar 09 at 3:27PM
The link seems to say that you can only use static (or Shared for VB) for a dll called this way.  I'm trying to read through it, but if you understand differently, can you point me to the right place?


Posted By: Ingo
Date Posted: 11 Mar 09 at 3:45PM
Hi Jim!

In the new test-package you which you can download from Debenu there's a cs-file included to use the unmamaged dll with C#.

Cheers, Ingo



Posted By: Jim Sullivan
Date Posted: 11 Mar 09 at 4:01PM
I may be really thick here, but I think that's what I've downloaded.  That has the "static" calls listed.  I think that's what I used where I ran into the problem.



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