| Author |
Message |
Roger Billsdon
Joined: 31 Jul 2010 Posts: 9 Location: Cambs, UK
|
Posted: Wed Aug 18, 2010 9:41 pm Post subject: Problem with embedding interop types |
|
|
Hi all
Since my previous posts I've encountered further problems when programs that use COM interop are obfuscated with SmartAssembly.
After a lot of further trial and error experimentation I now believe these problems arise when COM interop types are embedded in the assembly. In my case I'm using Visio and so far my testing suggests that all the "Specified cast is not valid System.StubHelpers.InterfaceMarshaler.ConvertToNative" errors can be avoided if in my program project properties the Microsoft.Office.Interop.Visio "Embed Interop Types" is changed from True to False. I got the idea to try this from: http://blogs.msdn.com/b/jmstall/archive/2009/07/09/icustomqueryinterface-and-clr-v4.aspx
However, this work-around causes significant problems because, for example, embedding interop types allows programs to work with multiple versions of the Micrososoft Office programs (eg see http://msdn.microsoft.com/en-us/library/dd409610.aspx)
Is there any chance SmartAssembly can be made to work with embedded interop types?
Best regards
Roger Billsdon |
|
| Back to top |
|
 |
james.billings
Joined: 16 Jun 2010 Posts: 844 Location: My desk.
|
Posted: Fri Aug 20, 2010 9:13 am Post subject: |
|
|
| Thanks for your post; I've just emailed you directly to go through this with you a little more if that's ok. |
|
| Back to top |
|
 |
slaphead99
Joined: 10 Mar 2010 Posts: 93
|
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group