我偶尔会在网络应用中收到一些警告:
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.
似乎没有任何实际错误,重新启动Visual Studio似乎让它们消失了。导致这种情况的原因是什么,有没有办法解决它重启的问题?
答案 0 :(得分:4)
像这样创建自己的互操作程序集(例如ActiveDs):
tlbimp activeds.tlb /out:c:\temp\Interop.ActiveDs.dll / silent
引用此而不是ActiveDs,错误消失。
答案 1 :(得分:1)