IExtendedTypeLib.CreateExtendedTypeLib 方法

创建扩展类型的一 ITypeLib 接口。接口不是引用计数。客户端必须处理引用计数。

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

语法

声明
Function CreateExtendedTypeLib ( _
    lpstrCtrlLibFileName As String, _
    lpstrLibNamePrepend As String, _
    ptinfoExtender As Type, _
    dwReserved As UInteger, _
    dwFlags As UInteger, _
    lpstrDirectoryName As String, _
    <OutAttribute> ByRef pptLib As ITypeLib _
) As Integer
int CreateExtendedTypeLib(
    string lpstrCtrlLibFileName,
    string lpstrLibNamePrepend,
    Type ptinfoExtender,
    uint dwReserved,
    uint dwFlags,
    string lpstrDirectoryName,
    out ITypeLib pptLib
)

参数

  • lpstrCtrlLibFileName
    类型:System.String
    [in] 对包含类型库文件名的字符串的指针。这是一个类型为的库扩展。
    使用 QueryPathOfRegTypeLib,您可以获取一个类型库和其他信息的名称以其 GUID 的。
  • 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::CreateExtendedTypeLib(
   [in] LPCOLESTR lpstrCtrlLibFileName, 
   [in] LPCOLESTR lpstrLibNamePrepend, 
   [in] ITypeInfo* ptinfoExtender, 
   [in] DWORD dwReserved, [in] DWORD dwFlags, 
   [in] LPCOLESTR lpstrDirectoryName, 
   [out] ITypeLib** pptLib
);

.NET Framework 安全性

请参见

参考

IExtendedTypeLib 接口

Microsoft.VisualStudio.Shell.Interop 命名空间