Freigeben über


IVsSolution.CanCreateNewProjectAtLocation Method

Determines whether a new project can be created at a given location.

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

Syntax

'Declaration
Function CanCreateNewProjectAtLocation ( _
    fCreateNewSolution As Integer, _
    pszFullProjectFilePath As String, _
    <OutAttribute> ByRef pfCanCreate As Integer _
) As Integer
int CanCreateNewProjectAtLocation(
    int fCreateNewSolution,
    string pszFullProjectFilePath,
    out int pfCanCreate
)
int CanCreateNewProjectAtLocation(
    [InAttribute] int fCreateNewSolution, 
    [InAttribute] String^ pszFullProjectFilePath, 
    [OutAttribute] int% pfCanCreate
)
abstract CanCreateNewProjectAtLocation : 
        fCreateNewSolution:int * 
        pszFullProjectFilePath:string * 
        pfCanCreate:int byref -> int
function CanCreateNewProjectAtLocation(
    fCreateNewSolution : int, 
    pszFullProjectFilePath : String, 
    pfCanCreate : int
) : int

Parameters

  • fCreateNewSolution
    Type: Int32

    [in] If true, then a new solution will be created.

  • pszFullProjectFilePath
    Type: String

    [in] Project path (including file name and extension) of the location to create the new project.

  • pfCanCreate
    Type: Int32%

    [out] If true, then a new project of a given name can be created at the specified location. If false, then a project of the same name already exists at the specified location.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolution::CanCreateNewProjectAtLocation(
   [in] BOOL fCreateNewSolution,
   [in] LPCOLESTR pszFullProjectFilePath,
   [out] BOOL *pfCanCreate
);

This method determines whether a new project with the given name can be created at the given location. Used primarily for wizards.

.NET Framework Security

See Also

Reference

IVsSolution Interface

Microsoft.VisualStudio.Shell.Interop Namespace