Groups | Blog | Home
all groups > dotnet interop > august 2007 >

dotnet interop : Howto return a specific HRESULT value from an interop assembly?


little wizzard
8/2/2007 1:56:00 AM
Hello,

I have created an interop assembly in C#.
But I couldn't find any way to return an specific HRESULT value, e.g.
E_NOTIMPL, for a com visible interface method which I haven't impemented.
Which ways have I to do this?

Thanks for your time and any suggestions.

Best regards
Detlev
little wizzard
8/2/2007 9:16:06 AM
Hello Mattias,

many thanks for your fast and qualified advice, it solve my problem :-)

Best regards
Detlev

[quoted text, click to view]
Mattias Sjögren
8/2/2007 2:44:47 PM
[quoted text, click to view]

Throw a NotImplementedException, and the runtime will handle
translating that to the corresponding HRESULT.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
AddThis Social Bookmark Button