As you have seen, there isn't a way to get tlbimp to add the PreserveSig
attribute to methods so you can get a return value of S_FALSE.
However, there is no reason you can't define the COM interface in code,
and then have the signature return the HRESULT to you, attaching the
PreserveSig attribute yourself to it. You can cast the COM object to that
interface definition just as you would to one produced by TLBIMP.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"mungflesh" <ro************@yahoo.co.ukwrote in message
news:11**********************@o11g2000prd.googlegr oups.com...
Hi there,
Is there a way of testing for an S_FALSE return from an existing
unmanaged COM server, without using a try .. catch and without having
to manually modify the MSIL?
eg. is there some general setting to use with tlbimp to have the
PreserveSig effect?
Thanks,