Activex dll's (COM's)

Soldato
Joined
18 Oct 2002
Posts
4,925
Location
Yorkshire
just having a play with these and got a problem i'm not sure how to fix.

i've create two Active X dll's (below)

This in Component Services is listed as "myApps.Names" and the method as you can see is DisplayNames()
Code:
Function displayName() As String
    Dim myName As String
    myName = "John Doe"
    displayName = myName
End Function

In my asp code I can create an instance of this class and call the method and it displays the string "John Doe" fine.

Now what i'm trying to do is create another COM which references this existing COM, calls the method displayName() and makes an alteration to it. The code for this is below.
Listed in the Component services as makeNames.adjust and method adjustNames
Code:
Function adjustNames() As String
    Dim namesObject As New myApps.Names
    Set namesObject = System.CreateObject("myApps.Names")
    Dim alterNames As String
    
    alterNames = namesObject.DisplayName()
    namesObject = Nothing
    adjustNames = alterNames
End Function

In my asp code i'm doing exactly the same as before creating an instance of this new COM using server.createObject() then calling the adjustNames() method which should display the string "John Doe" again as i'm making no changes to the string at the moment.

heres the asp code
Code:
Dim changeNamesObject
Set changeNamesObject = server.CreateObject("makeNames.adjust")
response.Write(changeNamesObject.adjustNames())

However at the moment i'm getting an error message reading

Error Type:
makeNames (0x800A01A8)
Object required

ANy ideas what I could be doing wrong ?
 
Last edited:
Back
Top Bottom