clrinterop / clrinterop-issues-sandbox

0 stars 0 forks source link

TlbImp: Replace well known interfaces like IStream with their existing managed definition #77

Open jozefizso opened 16 years ago

jozefizso commented 16 years ago

Issue from Tue, 11 Nov 2008 09:33:26 GMT
Originally opened at https://clrinterop.codeplex.com/workitem/2565


Many of our interfaces use IStream to interchange data. Now MIDL generates a copy of the IStream interface in every TLB - which are translated into a different RCWs, so you can't use the IStream provided by one interface to pass the data to another interface defined in a different TLB since the interfaces RCWs refer to different IStream RCWs. Also this makes it impossible to generate a generic Stream adapter since this would need to derive from all possible IStream definitions to work. We currently solve this by disassembling the interop and replacing all references to an IStream with the System.Runtime.InteropServices.ComTypes.IStream, so this would be a perfect candidate to make it into TlbImp!   Since this problem applies to all types defined in System.Runtime.InteropServices.ComTypes they all should be translated properly by TlbImp.

jozefizso commented 15 years ago

Comment from Fri, 13 Mar 2009 05:49:49 GMT


Thank you for your suggestion. This issue is addressed by the customization feature within the latest release of TlbImp. Please check out the ResolveTo action. Thanks!