Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.Net and COM interoperability

Status
Not open for further replies.

Boknaai

Programmer
Dec 8, 2002
3
ZA
Hi

I have created a component in C# that I am wanting to consume as a COM object in vbScript. I have gone through the process of giving it a GUID and strong name, registering it with the GAC, and registering it in the registry using regasm ... /tlb...

It has a very simple method called returnValue, which simply returns an integer:
public static int returnValue()
{
return 1;
}

In the vbScript, I have added a reference to the object and have tried to consume the object using:

Dim testObject As Object
Set testObject = Server.CreateObject("csCom.clsCom")
.
.
.
oneCell = testObject.returnValue()

However, this gives me an error message saying: "Object doesn't support this property or method" and occurs at the line:
oneCell = testObject.returnValue()

I'm sure there is a very obvious solution to this, but I've been looking at it for too long. Does anybody have any idea what could be causing this problem?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top