-1

How to setup a C# server and a vbscript client so that they can pass objects among each other. I'm new to both of them, so any help is appreciated. Right now I'm looking at creating COM objects in C# and pass them to vbscript. Is there a better/straightforward way?

Siddarth
  • 103
  • 2
  • 6

1 Answers1

0

Yes this is possible. Basically you need to register your C# for COM and ensure that you make the necessary GUIDs and such. And basically if you have done it right then you will see your class in HKEY_CLASSES_ROOT of your registry. Once your C# class library is registered in the registry properly then you can have access to the C# class objects within vbscript by doing

Set myClass = CreateObject("MyNameSpace.Class")

You can check out this answer here How do I create an activex com in c. I personally had greater success making a VB .NET COM Server. Check out this answer that I provided for a different user as well which might help how to call and execute vbscript commands and functions in an exe.

Thanks,

Sean W.

Community
  • 1
  • 1
Sean W.
  • 863
  • 5
  • 14