共用方式為


IVsSingleFileGeneratorFactory.CreateGeneratorInstance Method

Creates a generator instance.

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

Syntax

'宣告
Function CreateGeneratorInstance ( _
    wszProgId As String, _
    <OutAttribute> ByRef pbGeneratesDesignTimeSource As Integer, _
    <OutAttribute> ByRef pbGeneratesSharedDesignTimeSource As Integer, _
    <OutAttribute> ByRef pbUseTempPEFlag As Integer, _
    <OutAttribute> ByRef ppGenerate As IVsSingleFileGenerator _
) As Integer
'用途
Dim instance As IVsSingleFileGeneratorFactory
Dim wszProgId As String
Dim pbGeneratesDesignTimeSource As Integer
Dim pbGeneratesSharedDesignTimeSource As Integer
Dim pbUseTempPEFlag As Integer
Dim ppGenerate As IVsSingleFileGenerator
Dim returnValue As Integer

returnValue = instance.CreateGeneratorInstance(wszProgId, _
    pbGeneratesDesignTimeSource, pbGeneratesSharedDesignTimeSource, _
    pbUseTempPEFlag, ppGenerate)
int CreateGeneratorInstance(
    string wszProgId,
    out int pbGeneratesDesignTimeSource,
    out int pbGeneratesSharedDesignTimeSource,
    out int pbUseTempPEFlag,
    out IVsSingleFileGenerator ppGenerate
)
int CreateGeneratorInstance(
    [InAttribute] String^ wszProgId, 
    [OutAttribute] int% pbGeneratesDesignTimeSource, 
    [OutAttribute] int% pbGeneratesSharedDesignTimeSource, 
    [OutAttribute] int% pbUseTempPEFlag, 
    [OutAttribute] IVsSingleFileGenerator^% ppGenerate
)
abstract CreateGeneratorInstance : 
        wszProgId:string * 
        pbGeneratesDesignTimeSource:int byref * 
        pbGeneratesSharedDesignTimeSource:int byref * 
        pbUseTempPEFlag:int byref * 
        ppGenerate:IVsSingleFileGenerator byref -> int 
function CreateGeneratorInstance(
    wszProgId : String, 
    pbGeneratesDesignTimeSource : int, 
    pbGeneratesSharedDesignTimeSource : int, 
    pbUseTempPEFlag : int, 
    ppGenerate : IVsSingleFileGenerator
) : int

Parameters

  • wszProgId
    Type: System.String
    [in] The prog ID of the generator factory.
  • pbGeneratesDesignTimeSource
    Type: System.Int32%
    [out] Boolean value; true if the factory generates source at design time.
  • pbGeneratesSharedDesignTimeSource
    Type: System.Int32%
    [out] Boolean value; true if the factory generates shared source at design time.
  • pbUseTempPEFlag
    Type: System.Int32%
    [out] Boolean value; true if the factory uses temporary PE flags.

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 vsshell80.idl:

HRESULT CreateGeneratorInstance(
    [in] LPCOLESTR wszProgId,
    [out] BOOL* pbGeneratesDesignTimeSource,
    [out] BOOL* pbGeneratesSharedDesignTimeSource,
    [out] BOOL* pbUseTempPEFlag,
    [out] IVsSingleFileGenerator** ppGenerate
);

.NET Framework Security

See Also

Reference

IVsSingleFileGeneratorFactory Interface

IVsSingleFileGeneratorFactory Members

Microsoft.VisualStudio.Shell.Interop Namespace