I have got lots of warnings like this one and I have not got a clue what they mean.
Does anyone know what this is?
"At least one of the arguments for 'IOleWindow.GetWindow' cannot be marshaled by the runtime marshaler. Such arguments will therefore be passed as a pointer and may require unsafe code to manipulate."
I should also point out that it relates to "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets"
You can use Type Library Importer (tblimp) to import the DLL outside Visual Studio and use the generated reference instead of letting Visual Studio create it, hence removing the warnings.
Nice explanation of situation can be found here:
You can safely ignore these warnings. You can find out more about this issue by consulting this page: http://msdn.microsoft.com/en-us/library/aa289520%28v=vs.71%29.aspx
The "In/Out C-Style Arrays" section is particularly relevant. Bottom-line : if the returned buffer of the specified methods in the warnings were accepting "in" values, you would have to apply the modifications in the article. But since all the listed methods only handle out buffers, the warnings are of no consequence to you nor the framework.
However, if you want to permanently get rid of the warnings (when you do a "Rebuild All" for instance), you will have no choice to proceed as described in the article. You will have to disassemble the interop wrapper (with ildasm), edit the IL and reassemble (with ilasm). This process is also called "creative round tripping".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With