How to catch COM exception in .Net

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
 
N

Natty Gur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top