-
I want to create a dll with public functions to be used in
ASP pages. Similar to the way regular vbscript functions are used. Ie. Date1 = FormatDateTime(Date2, 2)
I would like to create my own function -- for example,
FormatString -- and call it from an ASP page.
To avoid the obvious question: I want to use VB not VBscript and I want it to be compiled code (in hopes of having it run faster).
I've been trying but to no avail.
Thanks in advance
-
Create an ActiveX dll with your function as a public method of a class within.
On the web server:
Register the DLL
On the web page:
Dim an object variable
Set a reference to your dll
call it's methods and use it's properties.
Code:
Dim objMyDLL
Dim strBlah
Set objMyDLL = Server.CreateObject("MyDLL.MyClass")
strBlah = objMyDLL.MyFunction(strBlah)
'Clean up when done...
Set objMyDLL = Nothing