views:

11

answers:

0

I have com object written in c# that relies on c++ library that has rfc calls inside. Com object exposes single method (let it be DoSomeRfcStuff) that returns string. It's implementation is wrapped by try/catch block:

string DoSomeRfcStuff()
{
  try {
    .. Do Some Rfc calls ... 
  } catch(Exception ex) {
     return ex.ToString();
  }
}

When i use .net test

var type = Type.GetTypeFromProgID("MyComObject.ProgId");
dynamic obj = Activator.CreateInstance(type);
Console.WriteLine(obj.DoSomeRfcStuff());   

I observe accurate error string that is returned from com object (no connection to rfc host e.t.c.)

But when I do the same from vbs script - wscript.exe silently dies with no messages. I'm afraid that vb clients will not be able to communicate with such object (I'll have integration test in a few days).

How can I let wscript execute DoSomeRfcStuff method correctly?

Thank you in advance!