Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
QueryRenameProject Method

IVsSolution.QueryRenameProject Method

Determines whether the project can be renamed.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

'Declaration
Function QueryRenameProject ( _
	<InAttribute> pProject As IVsProject, _
	<InAttribute> pszMkOldName As String, _
	<InAttribute> pszMkNewName As String, _
	<InAttribute> dwReserved As UInteger, _
	<OutAttribute> ByRef pfRenameCanContinue As Integer _
) As Integer
'Usage
Dim instance As IVsSolution
Dim pProject As IVsProject
Dim pszMkOldName As String
Dim pszMkNewName As String
Dim dwReserved As UInteger
Dim pfRenameCanContinue As Integer
Dim returnValue As Integer

returnValue = instance.QueryRenameProject(pProject, pszMkOldName, pszMkNewName, dwReserved, pfRenameCanContinue)
int QueryRenameProject (
	/** @attribute InAttribute() */ IVsProject pProject, 
	/** @attribute InAttribute() */ String pszMkOldName, 
	/** @attribute InAttribute() */ String pszMkNewName, 
	/** @attribute InAttribute() */ UInt32 dwReserved, 
	/** @attribute OutAttribute() */ /** @ref */ int pfRenameCanContinue
)
JScript does not support passing value-type arguments by reference.

Parameters

pProject

[in] IVsProject pointer for the project to rename.

pszMkOldName

[in] Old name of the project on disk.

pszMkNewName

[in] New name of the project on disk.

dwReserved

[in] Reserved for future use.

pfRenameCanContinue

[out] If true, then the project can be renamed.

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsSolution::QueryRenameProject(
   [in] IVsProject *pProject,
   [in] LPCOLESTR pszMkOldName,
   [in] LPCOLESTR pszMkNewName,
   [in] DWORD dwReserved,
   [out] BOOL *pfRenameCanContinue
);

This method checks whether the project can be renamed at the time a rename action is initiated. The solution file must be writeable before any attempt to rename the project is made. If the solution is currently under source control, but is not checked out, then the user is prompted to check out the file. If the project file is under source control, then it must not be checked out. This method basically calls QueryEditSolutionFile and OnQueryRenameFile for the project file.

Community Additions

ADD
Show:
© 2015 Microsoft