Source Code Control (SCC) in Visual Basic 4.0 Enterprise Ed
  
PSS ID Number: Q129890
Article last modified on 10-30-1995
 
4.00
 
WINDOWS
 

---------------------------------------------------------------------
The information in this article applies to:
 
 - Enterprise Edition of Microsoft Visual Basic, 16-bit and 32-bit,
   for Windows, version 4.0
---------------------------------------------------------------------
 
SUMMARY
=======
 
With the Enterprise Edition of Visual Basic version 4.0, you can use a
Source Code Control (SCC) package in the Visual Basic development
environment. This article outlines how that process works and covers these
areas:
 
 - How Visual Basic Supports Source Code Control
 - How to Enable Source Code Control in Visual Basic
 - The Link Between Visual Basic and the SCC Add-In
 - The Link Between the SCC Add-In and the SCC Provider
 - SourceSafe Specific Configuration
 
NOTE: Some products mentioned in this article are manufactured by vendors
independent of Microsoft; we make no warranty, implied or otherwise,
regarding these products' performance or reliability.
 
MORE INFORMATION
================
 
How Visual Basic Supports Source Code Control
---------------------------------------------
 
The Enterprise Edition of Visual Basic version 4.0 provides a standard
interface for a Source Code Control (SCC) Add-In. Through this interface,
SCC Providers (such as Microsoft SourceSafe, PVCS, MKS, and so on) can
expose a standard set of features within the Visual Basic development
environment. This will greatly assist with the development of large or
group projects.
 
The Enterprise Edition also includes the latest release of Microsoft
SourceSafe, Microsoft's version control product. SourceSafe version 4.0 is
compliant with the SCC Add-In interface. In addition, the SCC Add-In
interface is publicly available, so other version control vendors can link
their SCC product to Visual Basic version 4.0, as long as their product is
compliant with the Add-In specification.
 
Support for an SCC Provider is provided in a combination of entries to both
the VB.INI file and the OLE Registry. These entries provide linkage between
Visual Basic version 4.0 and the SCC Add-In interface as well as between
the SCC Add-In interface and the SCC Provider.
 
   +-----+      +------------+      +--------------------------------+
   |     |      |            |      | Source Code Control Provider:  |
   | VB4 | <--> | SCC Add-In | <--> | SourceSafe or any product that |
   |     |      |            |      | follows the SCC Add-In spec.   |
   +-----+      +------------+      +--------------------------------+
 
   |--Provided by Microsoft--|
   |--Within Visual Basic  --|
 
The installation process of your SCC Provider should properly link itself
to the Visual Basic SCC Add-In interface.
 
The following discussion details the connections between Visual Basic, the
SCC Add-In, and the SCC Provider. It offers the differences in these
connections on Windows version 3.X versus the Win32 operating systems such
as Windows NT version 3.51 and Windows 95. It also provides sample values
needed to use SourceSafe or another SCC Provider. You can use this
information to better understand the linkage between all three components,
and to diagnose any issues that may come up.
 
How to Enable Source Code Control in Visual Basic
-------------------------------------------------
 
To enable the SCC Add-In manager:
 
1. Start the Enterprise Edition of Visual Basic version 4.0.
 
2. Select the Add-In Menu.
 
3. Select the Add-In Manager.
 
4. Select the check box for "Source Code Control Add-In."
 
The Link Between Visual Basic and the SCC Add-In
------------------------------------------------
 
There are two steps to linking Visual Basic and SCC Add-In DLL:
 
1. Set up the VB.INI file.
 
2. Set up the OLE Registry so that Visual Basic knows where the SCC Add-In
   is located.
 
Within the VB.INI file you should see one of the two entries given below.
For the 16-bit edition of Visual Basic you should see this:
 
   [Add-Ins16]
   SccAddIn.SourceCodeControlAddIn=1
 
For the 32-bit edition of Visual Basic you should see this:
 
   [Add-Ins32]
   SccAddIn.SourceCodeControlAddIn=1
 
The content of both of these entries are independent of the SCC Provider
you use.
 
The OLE Registry establishes where the SCC Add-In server is located.
Depending on the provider used, you need to find a specific CLSID for
that provider, and verify two subkeys for that provider's CLSID. Those two
keys are:
 
 - InProcServer, which is the full path/file name for the 16-bit server.
 
 - InProcServer32, which is the full path/file name for the 32-bit server.
 
If you're using SourceSafe under Windows version 3.x, open REGEDIT (with
the /v switch) and search for these two keys. Then confirm that their
values are correct. For example, here are the DLLs for SourceSafe:
 
   Key                Value
   -----------------------------------------
   InProcServer       C:\SS40\WIN\SSVB16.DLL
   InProcServer32     C:\SS40\WIN32\SSVB.DLL
 
For Sourcesafe, you will find them with the key for SourceSafe under CLSID.
The value for SourceSafe's CLSID is {2F998FDA-3487-11CE-BCB6-00AA00688899}.
 
If you are not using SourceSafe, and are working under either Windows NT
version 3.51 or Windows 95, you will find the InProcServer and
InProcServer32 keys under HKEY_CLASSES_ROOT\CLSID for the key value of your
SCC Provider. If you don't know what that key value is, you can search
through the entries under CLSID until you find the name of your SCC
Provider.
 
If you were using SourceSafe under Windows NT version 3.51 or Windows 95,
you can find InProcServer and InProcServer32 by looking under
HKEY_CLASSES_ROOT\CLSID in the {2F998FDA-3487-11CE-BCB6-00AA00688899}
subkey. The values for both InProcServer and InProcServer32 should be
valid and point to the same files as shown above for the Windows version
3.x operating systems.
 
Once the VB.INI and OLE Registry entries are correct, Visual Basic can
correctly communicate with the SCC Provider.
 
The Link Between the SCC Add-In and the SCC Provider
----------------------------------------------------
 
Once Visual Basic can connect with the SCC Add-In DLL, it needs to make the
connection the SCC Provider DLL.
 
If you are working under Windows 3.X, you need to make the following
changes to the WIN.INI file. This example assumes you are using SourceSafe.
 
   [Source Code Control]
   SourceCodeControlProvider=SourceSafeSCCServer
 
   [SourceSafeSCCServer]
   SCCServerPath="c:\ss40\win\ssscc.dll"
 
The last entry is specific to SourceSafe. For a different SCC Provider, put
in the path to the correct DLL.
 
If you are using either Windows NT version 3.51 or Windows 95, you need
to verify the following changes to your registry with REGEDT32:
 
1. Verify that the following key exists, or create it if it doesn't:
 
   HKEY_LOCAL_MACHINE\Software\Microsoft\SourceSafe
 
   For this key, create a value "SCCServerName" and assign it to a value of
   "Microsoft SourceSafe."
 
   For another SCC Provider, the actual key would be different, but you
   still need the "SCCServerName" value and need to assign it a string
   equal to the name of the product.
 
2. Verify that the following key exists, or create it if it doesn't:
 
   HKEY_LOCAL_MACHINE\Software\Microsoft\SourceSafe
 
   For this key, create a value "SCCServerPath" and assign it to the string
   "C:\ss40\win32\ssscc.dll."
 
   For a different SCC Provider, the actual key would be different, but you
   still need the "SCCServerPath" value and need to assign it a string
   equal to the path and filename of the provider DLL.
 
3) Verify that the following key exists, or create it if it doesn't:
 
   HKEY_LOCAL_MACHINE\Software\SourceCodeControlProvider
 
   For this key, create a value "ProviderRegKey" and assign it to the
   string "Software\Microsoft\SourceSafe,"
 
   The ProviderRegKey is not a file path, but a path within the registry to
   the registry key for the SCC Provider software, which in this case is
   SourceSafe. Within that key, the two values SCCServerName and
   SCCServerPath provide the final information to link the SCC Add-In to
   the SCC Provider.
 
   For a different SCC Provider, the value in ProviderRegKey will be
   different, but whatever it points to must have SCCServerName and
   SCCServerPath values with the correct strings in them.
 
SourceSafe Specific Configuration
---------------------------------
 
Finally, SourceSafe requires that the SRCSAFE.INI file be located in the
same directory as Visual Basic. Just copy SRCSAFE.INI from the directory
you installed SourceSafe, and make sure it has the correct values set for
the following entries:
 
   Data_Path = c:\ss40\data
   Temp_Path = c:\ss40\temp
   Users_Path = c:\ss40\users
   Users_Txt = c:\ss40\users.txt
 
   [Printer Config Files]
   Text = c:\ss40\text.cfg
 
Note that SRCSAFE.INI does not require a key before the first four entries,
these are default values valid for all projects stored within SourceSafe.
 
Additional reference words: 4.00 vb4win vb4all
KBCategory: kbtool
KBSubcategory: SourceSafe
=============================================================================
Copyright Microsoft Corporation 1995.
