Errors using COM under Win98 with C# Classes

  • Thread starter Thread starter Clinton Pierce
  • Start date Start date
C

Clinton Pierce

I've created a C# class DLL that I need to call from various scripts (.VBS
and Winbatch). This is the procedure I followed:

* Put the C# DLL into the PATH
* Ran this on the target workstations:
regasm OurClass.dll /tlb:OurClass.tlb
* Tried calling the class in a minimal .vbs script like this:
Set obj = WScript.CreateObject("NS.Classname")

And this works on our Win2k and WinXP machines. On the Win98 machines we're
getting the error:

Could not create object named "NS.Classname"
Code = 80040154

From the script engine. Any suggestions?

The error code seems to mean either it's not registered properly (how do I
check that?) or that there are insufficient permissions to read the DLL or
something (again, puzzling).

Thank you.
 
regasm /codebase OurClass.dll /tlb:OurClass.tlb
Putting the DLL in the path won't help the .NET loader (fusion) to find the
DLL.

Willy.
 
Back
Top