We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

ASP Components

ntollfree
ntollfree asked
on
Medium Priority
206 Views
Last Modified: 2010-04-30
I wanna know how to make one, it's 200 points cos I'm damn lazy.

I create an ActiveX DLL in vb5, yes ?

Then what ? Do you have example code that I can put in this dll, after I run it through regserv how do I use it ?

I'm looking for a mini guide to creating the worlds simplest asp com object, just something that you can send a string to and the object will add another string to it.

Cheers

Neil
Comment
Watch Question

Commented:
Create an ActiveX DLL Project by using File New and selecting the ActiveX DLL project type.  

By default, when you do this it will create Class Module Named CLASS1.

Insert this code into CLASS1

Private Const gstrSOMESTRING As String = "ADD THIS TO IT..."
Public Function AddAString(vstrFirstString As Variant) As Variant
     AddAString = vstrFirstString & gstrSOMESTRING
End Function

Compile the Project and Register on your Server that has IIS.

Once you have this done, we will move on to calling from ASP
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Hang on, why am I getting the error

Object required: 'Project1' on the CreateObject line ?

Commented:
Please check these .
What is the name of your project you save as .
try opening  the project, goto project menu properties and check .

Commented:
Please check these .
What is the name of your project you save as .
try opening  the project, goto project menu properties and check .

Author

Commented:
Hang on, why am I getting the error

Object required: 'Project1' on the CreateObject line ?

Author

Commented:
it's 'Project1'

Neil

Commented:
I think you need this .
<%
  Set ...... = Server.CreateObject("ProjectName.ClassName")
 ....................

Author

Commented:
it's 'Project1'

Neil

Author

Commented:
Now I get this error on the same line

ActiveX component can't create object


Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.