Click here to Skip to main content
13,862,209 members
Click here to Skip to main content
Add your own
alternative version


26 bookmarked
Posted 6 Aug 2003

How to work with VSS through the VC++ 6.0 development environment

, 6 Aug 2003
Rate this:
Please Sign up or sign in to vote.
Integrating Visual SourceSafe with Visual Studio


Visual SourceSafe® has become every Windows® developer’s companion as regards maintaining his or her code as well as, a means to keep track of the various versions of his or her development. This makes his or her life a lot simpler, and avoids the unnecessary usage of his or her disk space.

I would like to share with you folks a unique way of using this invaluable tool through your favorite development environment. Yes, it is very much your own Visual C++ Version 6.0 IDE. So, just tie up those walking shoes, and follow me.

Configuring VSS from the VC++ environment

Start the environment by invoking msdev.exe from the Run prompt. After the environment is open and ready,

  1. Select Tools->Options.
  2. Select the Source Control tab from the Options dialog.

    Fig. 1 Options Dialog

  3. Tick the checkboxes as shown in figure 1 above. Enter a login ID in the edit box Login ID.
  4. You need to consult your VSS Administrator, before using the "Advanced" options through the "Advanced" button.
  5. Click OK to accept the settings.

After you make the above settings the VC++ IDE will automatically prompt you to save your newly created workspace in VSS each time you create one.

How to add a new workspace to VSS

After you create a new workspace using the AppWizard, you will get a message as shown below:

Fig. 2 Visual C++ message, to store a project in VSS.

Click the ‘Yes’ button, to store the newly created workspace in VSS. You will see the Visual SourceSafe Login dialog, which will prompt you for the Login ID, Password and the VSS Database path.

Fig. 3 The VSS Login dialog.

Please enter your Login ID (the one you had entered while configuring VSS). You need to consult your VSS Administrator for your Password and VSS Database entries. After you have done so, click on the Browse button to select the path of your VSS Database. You will be able to do so using the dialog shown below.

Fig.4 Dialog to select VSS database.

Click the browse button to select the path of the database file srcsafe.ini using the Find Database dialog.

Fig. 5 Select your VSS Database path using Find Database dialog

After you click Open button, you will be asked to confirm this path as shown below.

Fig. 6 Confirm the path of VSS database.

Select OK to confirm, or Cancel to recheck the VSS database path. After you have confirmed the path. You will see this path in the Available databases: list. Click the Open button to open the VSS database. You will be again prompted to confirm your LoginID, Password and Database path by the VSS Login dialog. Click the OK button to accept the information or Cancel to exit.

Fig.7 Your database path is added to the Available databases list

After you click OK, you will be prompted to create a new Project folder under your VSS database path, through the Add to SourceSafe Project dialog as shown in Fig. 8 below.

Fig. 8 Add your project to the VSS database tree from here.

Click OK to accept the default Project name as the name of the folder where the project will be saved under your VSS database tree. After you have done so, you will be prompted by VSS to confirm the creation of this folder, as it does not exist as yet, under your database tree. This is done as shown in Fig. 9 below.

Fig. 9 Confirm creation of the new folder in your database.

After you click ‘Yes’ button to accept the creation of the folder you will be allowed to select the files in the project, which you want to store in VSS through the Add to Source Control dialog.

Fig. 10 The list of project files which will be stored in VSS.

By default, VSS selects all your files for storing; you may remove the ticks from any files which you do not want to store in VSS. You may add your comments in the Comment edit box.

The selected files are Checked Out by default, to allow modifications. You need to remove the tick against the Keep checked out check box, in order to make the files read only. Click the OK button to move the files to VSS and you are done with it.

How to start your business with VSS from within the environment

Your business with VSS is a few clicks away. In order to achieve that you need to follow the following steps.

Steps to start using VSS

  1. Right click the VC++ IDE’s toolbar. You will see the popup menu as shown in fig. 11 below.
  2. Select Source Control option from this menu.
  3. You will notice a new toolbar Source Control, as shown in Fig 12.
  4. You can use VSS from this toolbar. The details are described in the next section.

Fig. 11 Popup menu to select VSS option

Fig. 12 VSS toolbar

Source Control toolbar (from left to right in the image).

  1. Get Latest Version: Retrieves a read-only copy of the selected VSS items.
  2. Check Out: Copies the latest version of one or more selected files from the current project into your current working folder.
  3. Check In: Updates VSS with changes made to a checked-out file, and unlocks the VSS master copy.
  4. Undo Check Out\; Cancels a Check Out operation, undoing all changes. You must have a working folder set for this command to work properly.
  5. Add To Source Control: Invokes the Add to Source Control Dialog shown in fig 8.
  6. Remove From Source Control: Removes the project from VSS.
  7. Show History: Shows the history of a file or project in VSS.
  8. Show Differences: compares the local copy of your code file to the one in VSS, and shows how they differ (in a text display).
  9. Source Control Properties: This will invoke a dialog as shown below, when you select one of your code files.

    Fig 13 Dialog shows the properties of a file in VSS.

  10. Share from Source Control: VSS projects are in many ways analogous to operating system folders. However, whereas every file in an operating system exists uniquely in a folder, a VSS file can simultaneously exist in many different projects.

    In VSS, you can share files. Inside the VSS database, there is only one copy, the master copy, of the file; each project to which the file belongs simply has a pointer to that copy. When you change the file in any one project, VSS immediately updates it in all the projects that share it. For more information on Sharing of projects and files please see Share Files in your MSDN documentation.

  11. Refresh Status: Refresh the status of your project files.
  12. Source Control: This will execute the Visual SourceSafe software.

You can also use the Project->Source Control menu item to use the above functionality.

Some useful tips

  1. How to know whether your files are checked in or checked out:

    If you open your workspace and select the File View tab of the workspace window, you will notice that the files are all marked in gray color, which means that your workspace is checked in. This is a confirmatory test to know whether your files are checked out or checked in.

    Fig 14 File View indicates checked in files.

  2. How to know whether a particular file is checked out or checked in:

    To know the status of a file, i.e. whether it is checked out or checked in, just open the file and right click on the open file, and select ‘Properties’ from the popup menu. You will get the following dialog:

    Fig. 15. Dialog indicates the status of a file in VSS.

    You will be able to notice the status of the file inside the ‘Status:’ edit control. An alternative way to know this information is to look in to Class View tab of your workspace window. If both the header file (.h or. hpp) and code file (.cpp or .c) are checked out, you will see a red tick associated with the particular C++ class. If only one of them is checked out, then you will see a black tick associated with the particular C++ class that is checked out.


It is very simple and effective to use VSS from your development environment, rather than opening the VSS software separately. I hope this approach will surely improve your efficiency as regards usage of VSS, as well as encourage you to do source-safing from the VC++ development environment.

Happy Source-safing all the way!!!<!------------------------------- That's it! --------------------------->


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Ashutosh R. Bhatikar
Team Leader Symphony Services Private Limited.
India India
I have been working with Symphony Services for the past 4 years and have a total of 9+ years experience in Software Development. I have worked mostly in C, C++, MFC, COM/DCOM/COM+. My specialization is in GUI development and Image Processing. I hold a Bachelors Degree in Engineering (Computer) from University of Goa.

You may also be interested in...


Comments and Discussions

GeneralRemove from Source Control does not works in VC++ 6.0 Pin
sandeep222910-Aug-06 1:26
membersandeep222910-Aug-06 1:26 
QuestionExtending VSS toolbar Pin
sandeep222919-Apr-06 2:14
membersandeep222919-Apr-06 2:14 
GeneralVss VS 2003 .NET Integration Pin
buczkow9-Apr-06 23:07
memberbuczkow9-Apr-06 23:07 
Generaladd file to vss by using Pin
adv20056-Mar-06 1:10
memberadv20056-Mar-06 1:10 
GeneralRe: add file to vss by using Pin
Ashutosh R. Bhatikar6-Mar-06 1:52
memberAshutosh R. Bhatikar6-Mar-06 1:52 
GeneralVSS integration Pin
shijuck7-Dec-04 20:53
membershijuck7-Dec-04 20:53 
GeneralRe: VSS integration Pin
Ashutosh R. Bhatikar7-Dec-04 21:52
memberAshutosh R. Bhatikar7-Dec-04 21:52 
GeneralRe: VSS integration Pin
Vaclav27-Apr-05 23:02
memberVaclav27-Apr-05 23:02 
GeneralRe: VSS integration Pin
Ashutosh R. Bhatikar28-Apr-05 2:12
memberAshutosh R. Bhatikar28-Apr-05 2:12 
GeneralRe: VSS integration Pin
Vaclav28-Apr-05 20:26
memberVaclav28-Apr-05 20:26 
GeneralVSS only good for small projects Pin
tidhar12-Aug-03 20:53
membertidhar12-Aug-03 20:53 
GeneralRe: VSS only good for small projects (Not True) Pin
Anil Popli12-Aug-03 21:53
memberAnil Popli12-Aug-03 21:53 
GeneralRe: VSS only good for small projects (Not True) Pin
tidhar12-Aug-03 21:56
membertidhar12-Aug-03 21:56 
GeneralBroken VC++ Sourcesafe link Pin
worksopbenny12-Aug-03 16:40
memberworksopbenny12-Aug-03 16:40 
GeneralRe: Broken VC++ Sourcesafe link Pin
Ashutosh R. Bhatikar12-Aug-03 19:08
memberAshutosh R. Bhatikar12-Aug-03 19:08 
GeneralRe: Broken VC++ Sourcesafe link Pin
theschmitzer11-Apr-05 15:50
susstheschmitzer11-Apr-05 15:50 
GeneralRe: Broken VC++ Sourcesafe link Pin
Anonymous28-Sep-05 21:11
memberAnonymous28-Sep-05 21:11 
QuestionVSS everybody's choise? Pin
Vaclav8-Aug-03 6:59
memberVaclav8-Aug-03 6:59 
AnswerRe: VSS everybody's choise? Pin
.:floyd:.8-Aug-03 11:28
member.:floyd:.8-Aug-03 11:28 
GeneralWho said that?!! Pin
Anonymous7-Aug-03 8:28
memberAnonymous7-Aug-03 8:28 
GeneralRe: Who said that?!! Pin
Ashutosh R. Bhatikar7-Aug-03 18:57
memberAshutosh R. Bhatikar7-Aug-03 18:57 
GeneralRe: Who said that?!! Pin
PerfectDark7-Aug-03 23:28
memberPerfectDark7-Aug-03 23:28 
GeneralRe: Who said that?!! Pin
Anonymous16-Aug-03 3:44
memberAnonymous16-Aug-03 3:44 
GeneralRe: Who said that?!! Pin
Anonymous8-Aug-03 8:11
memberAnonymous8-Aug-03 8:11 
GeneralRe: Who said that?!! Pin
Anonymous8-Aug-03 21:13
memberAnonymous8-Aug-03 21:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190214.1 | Last Updated 7 Aug 2003
Article Copyright 2003 by Ashutosh R. Bhatikar
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid