다음을 통해 공유


IVsSolution2.QueryRenameProject Method

Definition

Determines whether the project can be renamed.

public:
 int QueryRenameProject(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, System::String ^ pszMkOldName, System::String ^ pszMkNewName, System::UInt32 dwReserved, [Runtime::InteropServices::Out] int % pfRenameCanContinue);
int QueryRenameProject(Microsoft::VisualStudio::Shell::Interop::IVsProject const & pProject, std::wstring const & pszMkOldName, std::wstring const & pszMkNewName, unsigned int dwReserved, [Runtime::InteropServices::Out] int & pfRenameCanContinue);
public int QueryRenameProject (Microsoft.VisualStudio.Shell.Interop.IVsProject pProject, string pszMkOldName, string pszMkNewName, uint dwReserved, out int pfRenameCanContinue);
abstract member QueryRenameProject : Microsoft.VisualStudio.Shell.Interop.IVsProject * string * string * uint32 * int -> int
Public Function QueryRenameProject (pProject As IVsProject, pszMkOldName As String, pszMkNewName As String, dwReserved As UInteger, ByRef pfRenameCanContinue As Integer) As Integer

Parameters

pProject
IVsProject

[in] IVsProject pointer for the project to rename.

pszMkOldName
String

[in] Old name of the project on disk.

pszMkNewName
String

[in] New name of the project on disk.

dwReserved
UInt32

[in] Reserved for future use.

pfRenameCanContinue
Int32

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

Returns

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

Implements

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolution2::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 IVsTrackProjectDocuments2:: OnQueryRenameFile for the project file.

Applies to