Source Control Runtime Details

A project is added to source control when the user adds a file in the project to source control, or through an automation controller, such as a wizard. A project does not specify for itself that it is under source control; it supports source control, but must be added to it manually.

Registering with a Source Control Package

When a file in your project is added to source control, the environment calls SetSccLocation to provide you four opaque strings that are used as cookies by the source control system. Store these strings in your project file. These strings should be passed to the Source Control Stub (the Visual Studio component that manages source control packages) on startup of the project type by calling RegisterSccProject. This in turn loads the appropriate source control package and forwards the call to its implementation of IVsSccManager2::RegisterSccProject.