IExtendedTypeLib.AddRefExtendedTypeLibOfClsid 方法

创建扩展类型的一 ITypeInfo 接口并返回引用计数 (AddRef) 接口访问它。使用为类型的 CLSID 扩展。

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

语法

声明
Function AddRefExtendedTypeLibOfClsid ( _
    ByRef rclsidControl As Guid, _
    lpstrLibNamePrepend As String, _
    ptinfoExtender As Type, _
    dwReserved As UInteger, _
    dwFlags As UInteger, _
    lpstrDirectoryName As String, _
    <OutAttribute> ByRef pptinfo As Type _
) As Integer
int AddRefExtendedTypeLibOfClsid(
    ref Guid rclsidControl,
    string lpstrLibNamePrepend,
    Type ptinfoExtender,
    uint dwReserved,
    uint dwFlags,
    string lpstrDirectoryName,
    out Type pptinfo
)

参数

  • rclsidControl
    类型:System.Guid%
    [in] 是的类型的 CLSID 扩展。
  • lpstrLibNamePrepend
    类型:System.String
    [in] 对前面添加的字符串的指针扩展的类型库的文件名。
  • dwReserved
    类型:System.UInt32
    [in] 未使用的值。使用零 (0)。
  • dwFlags
    类型:System.UInt32
    [in] 未使用的值。使用零 (0)。
  • lpstrDirectoryName
    类型:System.String
    [in] 对包含完整路径的字符串的指针写出扩展的类型库。使用 null 值,如果不保存库。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 objext.idl:

[C++]

HRESULT IExtendedTypeLib::AddRefExtendedTypeLibOfClsid(
   [in] REFCLSID rclsidControl, 
   [in] LPCOLESTR lpstrLibNamePrepend, 
   [in] ITypeInfo* ptinfoExtender, 
   [in] DWORD dwReserved, 
   [in] DWORD dwFlags, 
   [in] LPCOLESTR lpstrDirectoryName, 
   [out] ITypeInfo** pptinfo
;

.NET Framework 安全性

请参见

参考

IExtendedTypeLib 接口

Microsoft.VisualStudio.Shell.Interop 命名空间