Package.IVsToolWindowFactory.CreateToolWindow 方法
此 API 支持 .NET Framework 基础结构,不适合在代码中直接使用。
使用指定的 ID. 创建指定类型的一个工具窗口
命名空间: Microsoft.VisualStudio.Shell
程序集: Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
语法
声明
Private Function CreateToolWindow ( _
ByRef toolWindowType As Guid, _
id As UInteger _
) As Integer Implements IVsToolWindowFactory.CreateToolWindow
int IVsToolWindowFactory.CreateToolWindow(
ref Guid toolWindowType,
uint id
)
参数
- toolWindowType
类型:System.Guid%
要创建的窗口的类型。
- id
类型:System.UInt32
实例 ID
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
实现
IVsToolWindowFactory.CreateToolWindow(Guid%, UInt32)
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。