【发布时间】:2010-11-30 17:47:28
【问题描述】:
我有一个 IDL 文件,其中包含一些接口。
[
object,
uuid(newguid),
dual,
helpstring("NewInterface Interface"),
pointer_default(unique)
]
interface INewInterface: IOldInterface
{
[id(newid), helpstring("method NewMethod")] HRESULT NewMethod([in] BSTR bstrParam );
}
但是当我编译我的代码时,它看不到我的新界面。此外,当我打开 .tlh 文件时,它还没有更新以显示新界面。
对我需要做什么有什么想法吗?
编辑: 进口是通过
#import "File.tlb" raw_interfaces_only no_namespace
tlb 文件似乎也没有更新:(
【问题讨论】:
-
我猜你只有两份 .tlb 文件,其中一份在你重新编译 COM 服务器时实际更新,另一份是你#import。您需要准确导入编译 .idl 文件时生成的 .tlb 文件。