DCOM, although you need to configure security.
In C #, you can create an object remotely this way:
var obj = Activator.CreateInstance(Type.GetTypeFromProgID("Acme.Server", "remotepc", true));
So, to create an instance of the VB Regex library (so that it runs elsewhere)
dynamic re = Activator.CreateInstance(Type.GetTypeFromProgID("VBScript.RegExp", "remotepc", true));
re.IgnoreCase = true;
re.Pattern = "^A";
var chk = (re.Execute("Apple").Count > 0) ? "ok" : "failed";
Console.WriteLine(chk);
Grynn source
share