Método IVsProjectFactory.CreateProject (String, String, String, UInt32, Guid, IntPtr, Int32)

 

Cria um novo projeto.

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

Sintaxe

int CreateProject(
    string pszFilename,
    string pszLocation,
    string pszName,
    uint grfCreateFlags,
    [InAttribute] ref Guid iidProject,
    out IntPtr ppvProject,
    out int pfCanceled
)
int CreateProject(
    String^ pszFilename,
    String^ pszLocation,
    String^ pszName,
    unsigned int grfCreateFlags,
    [InAttribute] Guid% iidProject,
    [OutAttribute] IntPtr% ppvProject,
    [OutAttribute] int% pfCanceled
)
abstract CreateProject : 
        pszFilename:string *
        pszLocation:string *
        pszName:string *
        grfCreateFlags:uint32 *
        iidProject:Guid byref *
        ppvProject:nativeint byref *
        pfCanceled:int byref -> int
Function CreateProject (
    pszFilename As String,
    pszLocation As String,
    pszName As String,
    grfCreateFlags As UInteger,
    <InAttribute> ByRef iidProject As Guid,
    <OutAttribute> ByRef ppvProject As IntPtr,
    <OutAttribute> ByRef pfCanceled As Integer
) As Integer

Parâmetros

  • pszFilename
    [in] Nome de arquivo do projeto que será criado.
  • pszLocation
    [in] Local onde o projeto será criado.
  • pszName
    [in] Se aplicável, o nome do modelo para utilizar quando um novo projeto de clonagem.
  • grfCreateFlags
    [in] Conjunto de valores de sinalizador extraído de __VSCREATEPROJFLAGS enumeração.
  • iidProject
    [in] Identificador da interface que o chamador deseja retornado.
  • ppvProject
    [out, iid_is(iidProject)] Ponteiro para a interface especificada por iidProject.
  • pfCanceled
    [out] Retorna true se o usuário pressionar o Cancelar o botão para anular a criação deste projeto.Caso contrário, ele é false.

Valor de retorno

Type: System.Int32

Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De vsshell.idl:

HRESULT IVsProjectFactory::CreateProject(
   [in] LPCOLESTR pszFilename,
   [in] LPCOLESTR pszLocation,
   [in] LPCOLESTR pszName,
   [in] VSCREATEPROJFLAGS grfCreateFlags,
   [in] REFIID iidProject,
   [out, iid_is(iidProject)] void **ppvProject,
   [out] BOOL *pfCanceled
);

CreateProjecté chamado pelo shell, quando um usuário tenta criar um novo projeto.

Crie um novo projeto por meio da clonagem de um projeto de modelo existente (que poderia estar em branco).O ambiente usa a extensão de arquivo para determinar o VSPackage que chamar este método.

Consulte também

Interface IVsProjectFactory
Namespace Microsoft.VisualStudio.Shell.Interop

Retornar ao topo