Source Control Plug-in API Functions

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

The Source Control Plug-in API provides the following functions, which must be implemented by the source control plug-in in accordance with this API. The signatures of each function and the semantics associated with the bit flags and other parameters are described in detail in this reference.

Initialization and Housekeeping Functions

Function Description
SccCloseProject Closes a project.
SccGetCommandOptions Prompts the user for advanced options for the given command.
SccGetVersion Returns the version of the source control plug-in.
SccInitialize Initializes the source control plug-in. It is called once for each instance of the plug-in.
SccOpenProject Opens a project.
SccSetOption A generic function used to set a wide variety of options. Each option starts with SCC_OPT_xxx and has its own defined set of values.
SccUninitialize Called once when a source control plug-in needs to be unplugged.

Core Source Control Functions

Function Description
SccAdd Adds an array of files specified by fully qualified path names to the source control system.
SccAddFromScc Allows the user to browse for files that are already in the source control system and then make those files part of the current project.
SccCheckin Checks in an array of files.
SccCheckout Checks out an array of files.
SccDiff Shows the differences between the local user's file specified by a fully qualified path name and the version under source control.
SccGet Retrieves a read-only copy of a set of files.
SccGetEvents Checks the status of files that the caller has asked about (via SccQueryInfo).
SccGetProjPath Causes the source control plug-in to prompt the user for a project path that is meaningful to the plug-in.
SccHistory Shows the history for an array of fully qualified local file names.
SccPopulateList Examines the list of files for their current status. In addition, uses the pfnPopulate function to notify the caller when a file does not match the criteria for the nCommand.
SccProperties Shows the properties of a fully qualified file.
SccQueryInfo Examines a list of fully qualified files for their current status.
SccRemove Removes the array of fully qualified files from the source control system.
SccRename Renames the given file to a new name in the source control system.
SccRunScc Accesses the full range of features of the source control system.
SccUncheckout Undoes a checkout of an array of files.

Functions that Support Additional Capability (Version 1.2 of the Source Control Plug-in API)

This group of functions defines the additional functionality included in version 1.2 of the Source Control Plug-in API. They provide access to more advanced source control features and capabilities.

Function Description
SccBeginBatch Starts a batch operation.
SccCreateSubProject Creates a subproject with the given name under an existing parent project.
SccDirDiff Shows the differences between the local user's directory specified by a fully qualified path name and the source control database location.
SccDirQueryInfo Examines a list of fully qualified directories for their current status.
SccEndBatch Ends a batch operation.
SccGetParentProjectPath Returns parent path of the given project (the project must exist).
SccIsMultiCheckoutEnabled Checks whether multiple checkouts on a file are allowed.
SccWillCreateSccFile Checks whether the plug-in will create MSSCCPRJ.SCC files.

Functions that Support Advanced Capability (Version 1.3 of the Source Control Plug-in API)

This group of functions defines the additional functionality included in version 1.3 of the Source Control Plug-in API. They provide access to more advanced source control features and capabilities.

Function Description
SccAddFilesFromSCC Adds a list of files from source control to the current project.
SccBackgroundGet Retrieves a list of files from source control without a user interface.
SccEnumChangedFiles Retrieves a list of files in source control that are different from the local files.
SccGetExtendedCapabilities Retrieves flags that specify extended capabilities supported by the source control plug-in.
SccGetUserOption Retrieves user-specific options.
SccPopulateDirList Examines a list of directories and files in a project or projects that are under source control. Each directory and file name found is passed to a callback function.
SccQueryChanges Examines name changes made to a list of files. Each file name is passed to a callback function with its change status.

Requirements

Header: scc.h

(Supplied in the Environment SDK common includes folder, by default [drive]\Program Files\VSIP 8.0\EnvSDK\common\inc; also supplied in the VSIP folder with the MSSCCI sample, [drive]\Program Files\VSIP 8.0\MSSCCI).

See Also

Source Control Plug-ins
Creating a Source Control Plug-in