IExtendedTypeLib.CreateExtendedTypeLib Method

Creates an ITypeLib interface for an extended type. The interface is not reference counted. The client must handle reference counting.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'宣言
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
'使用
Dim instance As IExtendedTypeLib
Dim lpstrCtrlLibFileName As String
Dim lpstrLibNamePrepend As String
Dim ptinfoExtender As Type
Dim dwReserved As UInteger
Dim dwFlags As UInteger
Dim lpstrDirectoryName As String
Dim pptLib As ITypeLib
Dim returnValue As Integer

returnValue = instance.CreateExtendedTypeLib(lpstrCtrlLibFileName, _
    lpstrLibNamePrepend, ptinfoExtender, _
    dwReserved, dwFlags, lpstrDirectoryName, _
    pptLib)
int CreateExtendedTypeLib(
    string lpstrCtrlLibFileName,
    string lpstrLibNamePrepend,
    Type ptinfoExtender,
    uint dwReserved,
    uint dwFlags,
    string lpstrDirectoryName,
    out ITypeLib pptLib
)
int CreateExtendedTypeLib(
    [InAttribute] String^ lpstrCtrlLibFileName, 
    [InAttribute] String^ lpstrLibNamePrepend, 
    [InAttribute] Type^ ptinfoExtender, 
    [InAttribute] unsigned int dwReserved, 
    [InAttribute] unsigned int dwFlags, 
    [InAttribute] String^ lpstrDirectoryName, 
    [OutAttribute] ITypeLib^% pptLib
)
function CreateExtendedTypeLib(
    lpstrCtrlLibFileName : String, 
    lpstrLibNamePrepend : String, 
    ptinfoExtender : Type, 
    dwReserved : uint, 
    dwFlags : uint, 
    lpstrDirectoryName : String, 
    pptLib : ITypeLib
) : int

Parameters

  • lpstrCtrlLibFileName
    Type: System.String

    [in] Pointer to a string containing the type library file name. This is the type library being extended.

    You can get the name of a type library from its GUID and other information using QueryPathOfRegTypeLib.

  • lpstrLibNamePrepend
    Type: System.String

    [in] Pointer to a string to prepend to the file name of the extended type library.

  • dwReserved
    Type: System.UInt32

    [in] Value not used. Use zero (0).

  • lpstrDirectoryName
    Type: System.String

    [in] Pointer to a string containing the complete path to write out the extended type library. Use NULL if not saving the library.

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From 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
);

Permissions

See Also

Reference

IExtendedTypeLib Interface

IExtendedTypeLib Members

Microsoft.VisualStudio.Shell.Interop Namespace