COM objects are brand new territory for me and I've searched quite a bit with no luck. I'm calling a 3rd parties COM object and I can get it to do what it is supposed to, but it always returns null and I need the value for the next step. The sample for it is in Python and it returns as expected. My code is below, how do I set this up so I can get the return value?
Type t = Type.GetTypeFromProgID("3rdParty.Name");
object publisher = Activator.CreateInstance(t);
object[] args = new object[6];
//fill in the args
//It works and does what it is supposed to behind the scenes,
//but need the int return value.
//Right now it is always null
int? handle = (int?)t.InvokeMember("DoYourThing",
BindingFlags.InvokeMethod,
null,
publisher,
args);