Solved

Trying to Convert ASP Script to DLL

Posted on 2003-11-20
3
692 Views
Last Modified: 2013-12-26
I am trying to convert ASP code into a DLL.

The ASP file is a large function and it contains several steps, some of which call other subroutines and functions located in a separate include file elsewhere.

I moved the code into Visual Studio, changed it to a public function, and added As String to the Dims. When I try to make the DLL, I get an error "Sub or function not defined," and it points to the first subroutine that exists in the separate include. What do I need to do to get it compiled? I would prefer not to copy the subs and functions into the DLL itself, but this is my first DLL, and I'm not sure how to reference external files. Any help would be appreciated. Thanks.
0
Comment
Question by:stribble
  • 2
3 Comments
 

Author Comment

by:stribble
ID: 9792048
A little more info to add:

The architecture is such: default.asp calls process.asp; process.asp contains code that references the function inside the DLL as well as an include reference to the external ASP include file with the various subroutines and functions.
0
 
LVL 7

Accepted Solution

by:
Smallint earned 500 total points
ID: 9795623
Hi stribble,

I'm sorry but you must copy all functions and subs inside DLL. You can access Session, Application, and other objects and variables from ASP through GetObjectContext function. Take a look here

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=227

Be carefully and check DLL functions becase VBScript and VB is not exactly the same. Some time ago I did something like you, and I had a lot of problems with string handling functions, because behaviour changed a little, but enough for need of a lot of testing and debugging.

Good luck

Cheers


0
 

Author Comment

by:stribble
ID: 9803706
Thanks. That's exactly what I was looking for.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Restricting text box entry from \/:?<>"| 9 77
Paint/Redraw window while dragging 16 68
MS Access Search and Replace Using VBA 6 58
Macro Excel - Multiple If conditions 2 65
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now