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?
Asked
Active
Viewed 78 times
-1
-
What kind of 'objects'? Just data packages? – H H Jul 21 '14 at 07:02
-
please look at [ask], you'll have more chances for an answer. – pushpraj Jul 21 '14 at 07:05
-
Just data packages. The user should be able to write his own logic in the vbscript to make use of the object. – Siddarth Jul 21 '14 at 17:36
1 Answers
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.