Microsoft KB Archive/220971

= SAMPLE: VSSAddin.exe Notifies Administrator of SourceSafe Events =

Article ID: 220971

Article Last Modified on 8/5/2004

-

APPLIES TO


 * Microsoft Visual SourceSafe 6.0 Standard Edition

-



This article was previously published under Q220971



SUMMARY
The VSSAddin.exe sample program implements automatic notification of Visual SourceSafe events to specified individuals. This sample program demonstrates how to create a Control Panel application that is integrated with a Visual SourceSafe add-in.



MORE INFORMATION
The VSSAddin.exe file is available for download from the Microsoft Download Center. Click the file name below to download the file:

VSSAddin.exe

Release Date: June 9, 2000

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Install the VSSAddin Program Files
VSSAddin.exe is a self-extracting executable file; double-click it and the file extracts two folders, SSAddin and VSSCtlApp.

The sample program consists of three projects:
 * A Control Panel application (VSSCtlApp.dsw) that allows an Administrator to specify which events to send notification of, as well as the email and pager address information of the individuals to notify. This application writes the entered information to a file on the Visual SourceSafe server.
 * A Visual SourceSafe add-in (SSaddin.dsw) that reads the entered information from the Visual SourceSafe server, handles the specified events, and sends notification to the specified recipients.
 * A third project (VSSAddin.dsw) that creates the DLL that holds the icon for the Control Panel application.

Build the Control Panel Application
 In Microsoft Visual C++, browse to the VSSCtlApp folder and open the VSSCtlApp.dsw project. Open the MyDialog.cpp file and change the blank path on line 32 to the universal naming convention (UNC) path of the file to create on the Visual SourceSafe server. This path should resemble the following:

\\\\Server\\Share\\Ssaddin.dat

 Save the MyDialog.cpp file, and then press F7 to create the VSSCtlApp.cpl file.

Build the Visual SourceSafe Add-in

 * 1) Browse to the SSAddin folder and open the Ssaddin.dsw project.
 * 2) Open the Ssaddin.cpp file. Change the blank path on line 35 to point to the same file that you specified in the Control Panel application.
 * 3) Change the blank profile and password on lines 50 and 51 to be a valid Microsoft Exchange profile and password.
 * 4) Save the Ssaddin.cpp file, and then press F7 to create the Ssaddin.dll file.

Build the VSSAddin DLL

 * 1) Browse to the VSSCtlApp\VSSAddin folder and open the VSSAddin.dsw project.
 * 2) Press F7 to create the VSSAddin.dll file.

Configure and Run the Application
 Copy the VSSAddin.dll and VSSCtlApp.cpl files into the %SystemRoot%\System32 folder. From a command prompt, register Ssaddin.dll with the following command:

RegSvr32 ssaddin.dll

</li> Create a file named Ssaddin.ini in the VSS\Win32 folder where the Ssapi.dll file is registered (in other words, the folder where you installed Visual SourceSafe). This folder should also be the folder that the following registry key points to:

<pre class="fixed_text"> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SourceSafe\SCCServerPath

</li> Open the Ssaddin.ini file and add the following line to it:

SSAddIn.0=1

</li> Open Control Panel and start the VSSAddin application.</li> Specify an event and the email address of someone to notify.</li> Quit the VSSAddin application. There should now be a file with the name you specified in the Control Panel application and Visual SourceSafe add-in projects.</li> Open Visual SourceSafe and make the specified event occur. The email address that you specified should receive an email stating that the event occurred.</li></ol>

<div class="references_section">