다음을 통해 공유


SccCheckout Function

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Given a list of fully qualified file names, this function checks them out to the local drive. The comment applies to all files being checked out. The comment argument can be a null string.

Syntax

SCCRTN SccCheckout (  
   LPVOID    pvContext,  
   HWND      hWnd,  
   LONG      nFiles,  
   LPCSTR*   lpFileNames,  
   LPCSTR    lpComment,  
   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 selected to be checked out.

lpFileNames
[in] Array of fully qualified local path names of files to be checked out.

lpComment
[in] Comment to be applied to each of the selected files being checked out.

fOptions
[in] Command flags (see Bitflags Used by Specific Commands).

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

Return Value

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

Value Description
SCC_OK Check out was successful.
SCC_E_FILENOTCONTROLLED The selected file is not under source code control.
SCC_E_ACCESSFAILURE There was a problem accessing the source control system, probably due to network or contention issues. A retry is recommended.
SCC_E_NOTAUTHORIZED The user is not allowed to perform this operation.
SCC_E_NONSPECIFICERROR Nonspecific failure. The file was not checked out.
SCC_E_ALREADYCHECKEDOUT The user already has the file checked out.
SCC_E_FILEISLOCKED The file is locked, prohibiting the creation of new versions.
SCC_E_FILEOUTEXCLUSIVE Another user has done an exclusive checkout on this file.
SCC_I_OPERATIONCANCELED The operation was cancelled before completion.

See Also

Source Control Plug-in API Functions
Bitflags Used by Specific Commands