Important alert: (current site time 7/15/2013 10:01:01 PM EDT)
 

article

Beginners guide > Making a Simple DLL and using it in ASP

Email
Submitted on: 3/31/2002 6:55:15 AM
By: snowboardr 
Level: Beginner
User Rating: By 14 Users
Compatibility: ASP (Active Server Pages)
Views: 38051
(About the author)
 
     Shows how to use a DLL made in Visual Basic in your ASP page, it is very simple, yet is very nice and useful! This is a beginners example, I just learned how to do this myself.

This article has accompanying files

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
  1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
				in the zip its a word document...I would have put it online but I don't have a place to host pics right now. -sorry

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this article, you agree to the following terms...   
  1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.


Other 21 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
3/31/2002 7:10:11 AMsnowboardr

If anyone knows how to get QueryStrings in the DLL, and also how to goto direct to the dll and have it show a page let me know...
(If this comment was disrespectful, please report it.)

 
4/1/2002 12:23:07 PMJosh

Alex, Visual Basic has a number of
(If this comment was disrespectful, please report it.)

 
4/1/2002 12:23:52 PMVENGEANCE

Hm.. PSC trimmed my first post due to a login problem. Sounds like a bug to me. ;) Anyway: the short version: http://www.microsoft.com/vbasic
(If this comment was disrespectful, please report it.)

 
4/1/2002 12:29:23 PMBrian

Snowboardr, to access the asp objects like response, request, server etc., make sure that "Microsoft Active Server Pages Object Library" is selected in the project references. Then you declare a variable as being one of the objects like this:
Dim comRequest AS ASPTypeLibrary.Request. Then you can access the methods supported by that object by doing something like comRequest.Querystring.
(If this comment was disrespectful, please report it.)

 
4/1/2002 5:35:28 PMsnowboardr

Thanks for your input guys. I almost have it to be able to go direct to the dll...that will be interesting.
(If this comment was disrespectful, please report it.)

 
4/1/2002 10:30:02 PMJeff_Khor

I just need it. Thank You.
(If this comment was disrespectful, please report it.)

 
4/4/2002 4:16:41 PMDound

Thanks: l337 concept, easy c0de
(If this comment was disrespectful, please report it.)

 
4/10/2002 5:27:05 PMChris

Please let me know how you can go directly to the DLL and pass a querystring into it, like MS does with the redir.dll at their site.

Thanks
(If this comment was disrespectful, please report it.)

 
4/17/2002 9:52:04 AMFreddy

You can make it appear like an asp file is a dll file. If you run IIS you can create a mapping just like ASP with an extension of .dll and rename your files. This sounds like a joke but it gives this appearance.
(If this comment was disrespectful, please report it.)

 
6/21/2002 2:27:28 PMmatt

It's very fine.
(If this comment was disrespectful, please report it.)

 
11/4/2002 2:25:11 AMCMorisetty

It was one of the things I was looking for. It is great to have that code
(If this comment was disrespectful, please report it.)

 
12/13/2002 1:48:00 PM

Here I was fretting becuase I wanted to use DLLs to authenticate, create dropdowns, etc . .

(If this comment was disrespectful, please report it.)

 
2/22/2004 10:09:54 PM

i enjoy your code pls keep it up
(If this comment was disrespectful, please report it.)

 
11/25/2004 3:32:26 AMLukeKreshar

Nice. Now I can finally execute other functions that I wasn't able to complete before on the server. Thanks!
(If this comment was disrespectful, please report it.)

 
4/6/2006 6:29:58 AMKISU

I am sorry to say its some wht making me hard to understand the following error

"ActiveX component can't create object: 'MyDLL.MyFunctions'
/dlltest/Default.asp, line 4"

as you mentioned I mapped .dll in system32 folder

but im using windows2000
so i kept in windowsNT/system32. Please Help me in a detail form.. thanks
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.