What causes “The type library importer could not convert the signature for the member” warnings?

佐手、 提交于 2019-12-21 09:22:09

问题


I occasionally get a number of warnings in my web app:

Warning 5   The type library importer could not convert the signature for the member 'ADS_OCTET_STRING.lpValue'.    
Warning 6   The type library importer could not convert the signature for the member '__MIDL___MIDL_itf_ads_0000_0002.lpValue'. 
Warning 7   The type library importer could not convert the signature for the member 'ADS_NT_SECURITY_DESCRIPTOR.lpValue'.  
Warning 8   The type library importer could not convert the signature for the member '__MIDL___MIDL_itf_ads_0000_0003.lpValue'. 
---- snip ----
Warning 33  The type library importer could not convert the signature for the member 'tagARRAYDESC.rgbounds'.   
Warning 34  At least one of the arguments for 'ITypeComp.RemoteBind' cannot be marshaled by the runtime marshaler.  Such arguments will therefore be passed as a pointer and may require unsafe code to manipulate.

There doesn't seem to be anything actually wrong, and restarting Visual Studio seems to make them go away. What causes this, and is there any way to fix it short of restarting?


回答1:


Create your own interop assembly like this (ActiveDs for example):

tlbimp activeds.tlb /out:c:\temp\Interop.ActiveDs.dll /silent

Reference this instead of ActiveDs, and the errors dissappear.




回答2:


Did you try this? Seems to be the same error you're having.

http://social.msdn.microsoft.com/Forums/en-US/clr/thread/37654e9b-e484-43dc-8e3b-9f6344d42055/



来源:https://stackoverflow.com/questions/4100431/what-causes-the-type-library-importer-could-not-convert-the-signature-for-the-m

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!