?
Solved

ASP Components

Posted on 1998-09-08
10
Medium Priority
?
193 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
0
Comment
Question by:ntollfree
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1433605
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
0
 
LVL 2

Accepted Solution

by:
seahpc earned 600 total points
ID: 1433606
try these code in your class .

dim msgin as string
public sub setstring(string1 as variant)
   msgin = CStr(string1)
end sub

public sub Addstring()
    msgin = msgin & "Hello World"
end sub

public function GetString()
   GetString = msgin
end function

Next compile these codes and build the dll .

Under your asp code try this
<%
   Set test = Server.CreateObject(ProjectName.ClassName)
   test.setstring "tttt"
   test.Addstring
   results = test.GetString
%>
0
 

Author Comment

by:ntollfree
ID: 1433607
Hang on, why am I getting the error

Object required: 'Project1' on the CreateObject line ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

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

0
 
LVL 2

Expert Comment

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

0
 

Author Comment

by:ntollfree
ID: 1433610
Hang on, why am I getting the error

Object required: 'Project1' on the CreateObject line ?
0
 

Author Comment

by:ntollfree
ID: 1433611
it's 'Project1'

Neil
0
 
LVL 2

Expert Comment

by:seahpc
ID: 1433612
I think you need this .
<%
  Set ...... = Server.CreateObject("ProjectName.ClassName")
 ....................
0
 

Author Comment

by:ntollfree
ID: 1433613
it's 'Project1'

Neil
0
 

Author Comment

by:ntollfree
ID: 1433614
Now I get this error on the same line

ActiveX component can't create object


0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 6 hours left to enroll

762 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