I'm wondering is it possible to create a class that acts just Like ActiveXObject in earlier IE version and pass it over to MS ClearScript? I've found a piece of code that creates an instances of ActiveXObjects with their string name.
class ActiveXObject
{
public ActiveXObject(string progID)
{
try
{
dynamic wshShell = Activator.CreateInstance(Type.GetTypeFromProgID(progID));
}
catch
{
return null;
}
}
}
Here's the code to attach a c# object to MS ClearScript Object
using (var engines = new V8ScriptEngine())
{
engines.AddHostObject("ActiveXObject", new ActiveXObject());
}
the only problem is how to assign wshshell to the instance of the class? It's for educational purposes btw.