COM 서버가 있습니다. 내가 다른 측면에서 문제의 경우이 같은 역동적 인 스타일의 메소드를 호출하면 나는 전체 예외가InteropAssembly COM의 COMException
try
{
Type factoryType = Type.GetTypeFromProgID("VPI.TcHost.TcAppFactory");
dynamic factory = Activator.CreateInstance(factoryType);
dynamic appl = factory.CreateTcApp("Nga", "8.7");
}
catch (COMException ex)
{
//Here i get nice exception with _FULL_ description message
}
내가 InteropAssembly 작성하고 다른 일부 문제의 경우, 다음과 같이 그 메소드를 호출 측면 내가 짧은 예외 래퍼를 얻을 얻을
try
{
CTcAppFactory appFactory = new CTcAppFactory();
CNgaApp mApp = appFactory.CreateTcApp("Nga", "8.7");
}
catch (COMException ex)
{
//Here i get short exception with hex code without Error string that was sent
//from COM server
}
이것은 짧은 예외가 어떻게 생겼는지입니다. (내 COM 서버가 보내는 문제에 대한 설명이 포함되어 있지 않습니다.)
강력한 형식의 코드 변형으로 전체 예외가 발생합니까?
고마워요! 좋은 대답. 나는 COM 서버 측에서 IErrorInfo를 구현하는 것이 좋은 해결책이라고 생각한다. – Grigory