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)

Syntax

‘선언
Function QueryRenameProject ( _
    pProject As IVsProject, _
    pszMkOldName As String, _
    pszMkNewName As String, _
    dwReserved As UInteger, _
    <OutAttribute> ByRef pfRenameCanContinue As Integer _
) As Integer
‘사용 방법
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(
    IVsProject pProject,
    string pszMkOldName,
    string pszMkNewName,
    uint dwReserved,
    out int pfRenameCanContinue
)
int QueryRenameProject(
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] String^ pszMkOldName, 
    [InAttribute] String^ pszMkNewName, 
    [InAttribute] unsigned int dwReserved, 
    [OutAttribute] int% pfRenameCanContinue
)
abstract QueryRenameProject : 
        pProject:IVsProject * 
        pszMkOldName:string * 
        pszMkNewName:string * 
        dwReserved:uint32 * 
        pfRenameCanContinue:int byref -> int 
function QueryRenameProject(
    pProject : IVsProject, 
    pszMkOldName : String, 
    pszMkNewName : String, 
    dwReserved : uint, 
    pfRenameCanContinue : int
) : int

Parameters

  • pszMkOldName
    Type: System.String
    [in] Old name of the project on disk.
  • pszMkNewName
    Type: System.String
    [in] New name of the project on disk.
  • pfRenameCanContinue
    Type: System.Int32%
    [out] If true, then the project can be renamed.

Return Value

Type: System.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::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.

.NET Framework Security

See Also

Reference

IVsSolution Interface

IVsSolution Members

Microsoft.VisualStudio.Shell.Interop Namespace