How to catch COM exception in .Net

  • Thread starter Thread starter Franck
  • Start date Start date
F

Franck

Ok, I do have a COM dll written in C++. Then a web service written in C# is
referencing this COM dll. Here everything is fine.

Now I have for exemple this line in my COM, that is called from the
Webservice.
hr = pSavi->SweepFile( ..., ..., ...)

BUT, this line sometimes fails, How from my webservice can I catch the HR
result ??

Thanks for your help



Franck
 
Hi,

Use ExternalException ErrorCode property.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
Back
Top