SccUncheckout 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 SccUncheckout Function.

This function undoes a previous checkout operation, thereby restoring the contents of the selected file or files to the state prior to the checkout. All changes made to the file since the checkout are lost.

SCCRTN SccUncheckout (  
   LPVOID    pvContext,  
   HWND      hWnd,  
   LONG      nFiles,  
   LPCSTR*   lpFileNames,  
   LONG      fOptions,  
   LPCMDOPTS pvOptions  
);  

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.

nFiles
[in] Number of files specified in the lpFileNames array.

lpFileNames
[in] Array of fully qualified local path names of files for which to undo a checkout.

fOptions
[in] Command flags (not used).

pvOptions
[in] Source control plug-in-specific options.

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

ValueDescription
SCC_OKUndo checkout was successful.
SCC_E_FILENOTCONTROLLEDThe selected file is not under source code control.
SCC_E_ACCESSFAILUREThere was a problem accessing the source control system, probably due to network or contention issues. A retry is recommended.
SCC_E_NONSPECIFICERRORNonspecific failure. Undo checkout did not succeed.
SCC_E_NOTCHECKEDOUTThe user does not have the file checked out.
SCC_E_NOTAUTHORIZEDThe user is not allowed to perform this operation.
SCC_E_PROJNOTOPENThe project has not been opened from source control.
SCC_I_OPERATIONCANCELEDThe operation was cancelled before completion.

After this operation, the SCC_STATUS_CHECKEDOUT and SCC_STATUS_MODIFIED flags will both be cleared for the files on which the undo checkout was performed.

Source Control Plug-in API Functions

Show: