0

Here are some warnings that I've encountered during making this add-in:

    Warning 1   
    Processing COM reference "" from path "C:\Windows\system32\stdole32.tlb". The type library importer could not convert the signature for the member 'DISPPARAMS.rgvarg'.

    Warning 2   
    Processing COM reference "" from path "C:\Windows\system32\stdole32.tlb". The type library importer could not convert the signature for the member 'DISPPARAMS.rgdispidNamedArgs'.

    Warning 3   
    Processing COM reference "VBA" from path "C:\Windows\system32\VEN2232.OLB". Type library importer has encountered an interface not derived from IUnknown: '_HiddenInterface'.

This add-in is working as it should but I'd like to know what these warnings mean. When I look at them, all I see is that it has some problems with processing COM references and converting some files from system32 folder. I do not know anything more about it so ...

Could someone take a look at them and give me a more specific explanation and maybe some solution for them. I'll be very grateful on every info.

4

1 回答 1

3

这些错误没什么大不了的。这只是意味着 COM 类型库中的某些类型无法自动导入。从 Visual Studio 构建过程(或后端使用的 MSBuild 任务)中,我认为您无法删除这些错误。它们由 .NET 内部类型库导入器生成,没有您可以传递的标志。

不过,您可以做的是在您的其他构建操作之前使用Tlbimp.exe(类型库导入器)工具创建您需要的互操作程序集,并引用它们而不是让 IDE 来完成这项工作。该工具的最新版本了解silence开关。

没有开关:

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64]tlbimp C:\Windows\system32\stdole32.tlb
Microsoft (R) .NET Framework Type Library to Assembly Converter 4.0.30319.17929
Copyright (C) Microsoft Corporation.  All rights reserved.

TlbImp : warning TI3001 : Primary interop assembly 'stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is already registered for type library 'C:\Windows\system32\stdole32.tlb'.
TlbImp : warning TI3002 : Importing a type library into a platform agnostic assembly.  This can cause errors if the type library is not truly platform agnostic.
TlbImp : warning TI3016 : The type library importer could not convert the signature for the member 'stdole.DISPPARAMS.rgvarg'.
TlbImp : warning TI3016 : The type library importer could not convert the signature for the member 'stdole.DISPPARAMS.rgdispidNamedArgs'.
TlbImp : warning TI3015 : At least one of the arguments for 'stdole.IDispatch.GetIDsOfNames' cannot be marshaled by the runtime marshaler.  Such arguments will therefore be passed as a pointer and may require unsafe code
to manipulate.
TlbImp : Type library imported to stdole.dll

使用静音开关(多次出现):

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64]tlbimp C:\Windows\system32\stdole32.tlb /silence:3016 /silence:3015 /silence:3001 /silence:3002
Microsoft (R) .NET Framework Type Library to Assembly Converter 4.0.30319.17929
Copyright (C) Microsoft Corporation.  All rights reserved.

TlbImp : Type library imported to stdole.dll
于 2013-05-22T13:10:16.110 回答