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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling function in COM

Status
Not open for further replies.

orion2347

IS-IT--Management
Mar 4, 2002
10
SG
Hi,

I've created a ComClass object in VB.Net, and have a public function called DoSchedule. I want to execute this function using a vbscript, so I wrote this:

Imports System.Runtime.InteropServices

<ComClass(Rotate.ClassId, Rotate.InterfaceId, Rotate.EventsId)> _
Public Class Rotate

Public Sub New()
MyBase.New()
End Sub

Public Sub DoSchedule()
...
End Sub

End Class

----------------------

Dim obj
Set obj = CreateObject("ScheduleCOM.Rotate")
obj.DoSchedule

Once I execute this vbscript, it gives me this error:
"Error: Could not find a part of the path "C:\WINNT\system32\
Code: 80070003
Source: mscorlib"

I've tried copying the ScheduleCOM.dll and other dlls that it uses to the system32 folder but doesn't seem to have any effect. Not sure what the error message means.

Am I required to implement an interface for DoSchedule? I had the impression that by creating the ComClass object, it will be handled automatically.

Any pointers would be very much appreciated.

Thanks!
Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top