IVsSolution2::CanCreateNewProjectAtLocation Method (Int32, String^, Int32)

 

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)

int CanCreateNewProjectAtLocation(
	int fCreateNewSolution,
	String^ pszFullProjectFilePath,
	[OutAttribute] int% pfCanCreate
)

Parameters

fCreateNewSolution
Type: System::Int32

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

pszFullProjectFilePath
Type: System::String^

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

pfCanCreate
Type: System::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: System::Int32

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

From vsshell.idl:

HRESULT IVsSolution2::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. It is used primarily for wizards.

Return to top
Show: