IInterfaceInfo 接口

提供有关指定的类型库的接口的属性的信息。

命名空间:  Microsoft.VisualStudio.VsWizard
程序集:  Microsoft.VisualStudio.VsWizard(在 Microsoft.VisualStudio.VsWizard.dll 中)

语法

声明
<GuidAttribute("C1DEA742-903E-497B-BA09-A3FC53EA6530")> _
Public Interface IInterfaceInfo
[GuidAttribute("C1DEA742-903E-497B-BA09-A3FC53EA6530")]
public interface IInterfaceInfo
[GuidAttribute(L"C1DEA742-903E-497B-BA09-A3FC53EA6530")]
public interface class IInterfaceInfo
[<GuidAttribute("C1DEA742-903E-497B-BA09-A3FC53EA6530")>]
type IInterfaceInfo =  interface end
public interface IInterfaceInfo

IInterfaceInfo 类型公开以下成员。

属性

  名称 说明
公共属性 ActiveType 获取或设置作为 eInterfaceType 枚举的接口的类型。
公共属性 Base 获取包含接口基类名称的字符串。
公共属性 Default 获取指示界面是否是默认界面的值。
公共属性 Functions 获取父对象的函数集合。
公共属性 Guid 获取 IInterfaceInfo 对象的 GUID。
公共属性 IsDispatchable 获取指示界面是否派生于 IDispatch 的值。
公共属性 Name 获取或设置对象的名称。
公共属性 Properties 获取接口的属性。
公共属性 Source 获取指示界面是否为源的值,即用户只是侦听界面而非调用。
公共属性 Type eInterfaceType 枚举类型获取接口。

页首

备注

有关在指定接口包含的属性的 IInterfaceInfo 对象控制信息如:

  • Name

  • 类型

  • 函数

  • 基本接口

例如,使用这些属性,因此,可以添加一个指定的接口的方法添加到项目。 有关示例,请参见 实现接口向导

示例

// From the Visual Studio Implement Interface Wizard, which uses the 
// Name property to identify and get the properties of an interface.

function GetProxyClassHeader(oInterface)
{
   var strHeader;
   var strInterface = oInterface.Name;
   var strIID = "__uuidof(" + strInterface + ")";
   
   strHeader = 
      "template<class T>\r\n" +
      "class CProxy" + strInterface + " :\r\n" +
      "\tpublic IConnectionPointImpl<T, &" + strIID +  ">\r\n" +
      "{\r\n" +
      "public:\r\n";
      
   return strHeader;
}

备注

参见 如何:解释 Visual C++ 向导模型示例 属性有关如何安装的更多信息以 HTML 和自定义向导的 default.js 文件调用。

请参阅

参考

Microsoft.VisualStudio.VsWizard 命名空间