This documentation is archived and is not being maintained.

IVsProjectFactory.CanCreateProject Method

Determines whether a new project can be created.

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

int CanCreateProject (
	[InAttribute] string pszFilename,
	[InAttribute] uint grfCreateFlags,
	out int pfCanCreate
int CanCreateProject (
	/** @attribute InAttribute() */ String pszFilename, 
	/** @attribute InAttribute() */ UInt32 grfCreateFlags, 
	/** @attribute OutAttribute() */ /** @ref */ int pfCanCreate
JScript does not support passing value-type arguments by reference.



[in] File name of the project you are trying to create.


[in] Flags whose values are taken from the __VSCREATEPROJFLAGS enumeration.


[out] true if the project can be created.

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsProjectFactory::CanCreateProject(
   [in] LPCOLESTR pszFilename,
   [in] VSCREATEPROJFLAGS grfCreateFlags,
   [out] BOOL *pfCanCreate