|
-
Nov 10th, 2000, 01:23 PM
#1
Thread Starter
Lively Member
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
-
Nov 10th, 2000, 11:26 PM
#2
Frenzied Member
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
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|