Solved

Trying to Convert ASP Script to DLL

Posted on 2003-11-20
3
694 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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.
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…

839 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