SccRename Function

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at SccRename Function.

This function renames a file in the source control system.

SCCRTN SccRename(  
   LPVOID pvContext,  
   HWND   hWnd,  
   LPCSTR lpFileName,  
   LPCSTR lpNewName  
);  

Parameters

pvContext
[in] The source control plug-in context structure.

hWnd
[in] A handle to the IDE window that the source control plug-in can use as a parent for any dialog boxes that it provides.

lpFileName
[in] The fully qualified file name of the file being renamed.

lpNewName
[in] The fully qualified new name. If the directory path is different, then the file has moved from one subdirectory to another.

The source control plug-in implementation of this function is expected to return one of the following values:

ValueDescription
SCC_OKThe renaming operation completed successfully.
SCC_E_PROJNOTOPENThe project is not open under source control.
SCC_E_FILENOTCONTROLLEDThe file is not under source control.
SCC_E_ACCESSFAILUREThere was a problem accessing the source control system, probably due to network or contention issues.
SCC_E_NOTAUTHORIZEDThe user is not authorized to complete this operation.
SCC_E_COULDNOTCREATEPROJECTThe project could not be created as part of the renaming process.
SCC_E_OPNOTPERFORMEDThe operation was not performed.
SCC_E_NONSPECIFICERRORAn unspecified or general error occurred.

This function can be used to rename a file or move it from one location to another in the source control system. The source control plug-in should not attempt to access the file on disk. It is the IDE's responsibility to rename the local file.

Source Control Plug-in API Functions

Show: