3 votes
TlbImp: Replace well known interfaces like IStream with their existing managed definition

Description

 
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.

File Attachments


No files are attached


Comments

most recent at top (show oldest at top)
YiZhang wrote Mar 13 2009 at 6:49 AM
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!

Updating...
© 2006-2010 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2010.1.12.16187