SourceSafe Keyword Expansion Creator

other mail Hubert Coupez

I also use Visual source safe for more than two years so I wrote a file header macro creator.

This macro inserts Visual SourceSafe's keyword expansion depending of information found in the file.

This macro checks for :

  • class Interface
  • class Implementation
  • class Type library

The Macro checks for more than one class on the file, if there is no class, or if the file hasn't been saved.

A message box is opened to enter the file description. If there is more than one class in the file, the macro inserts one line for each class (interface or implementation) found in the file.

The main function of the macro is InsertVssHeader()

The header include at the top of the file looks like:

  • for class Interface :
// File.h : Interface for the First Class
//
////////////////////////////////////////////////////////////////////////////
// Description : 
//
/////////////////////////////////////////////////////////////////////////////
//
// $Header: $
// $Modtime: $

/* --------------------------------------------------------
 * $History: $
 *
 * --------------------------------------------------------
 */

 

  • For the class Implementation:
// File.cpp : implementation of the FirstClass class
//          : implementation of the SecondClass class
//
/////////////////////////////////////////////////////////////////////////////
//
// $Header: $ 
// $Modtime: $ 

/* --------------------------------------------------------
 * $History: $
 *
 * --------------------------------------------------------
 */

static char _CppVersion[] = "@(#) $Header: $"

 

  • For the class Type library:
// File.odl : type library source for FirstControl Control
//
/////////////////////////////////////////////////////////////////////////////
//
// $Header: $
// $Modtime: $

/* --------------------------------------------------------
 * $History: $
 * --------------------------------------------------------
 */

and in library section

typedef enum
{
[helpstring("@(#) $Header: $" )] OdlVersion = 0,
} enumVersion;

About the line included in .odl and .cpp file

@(#) $Header: $

this stuff allow to use the utilty ident who list the version component of an exe, dll, ocx file

I post in a short time a tool to read this line on executable or Dll.

Update:

  • fix for VC++6.0 on 12 February 1999

Download Macro File - 1.74 KB

Last updated: 19 March 1999



Comments

  • settings in vss

    Posted by Legacy on 10/24/2003 12:00am

    Originally posted by: Paul

    Is it possible to change some setting
    
    in visual sourcesafe itself
    to have this macro
    run whenever a file is checked in??

    I guess it's possible, but can't find it!


    regards,
    Paul

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: August 20, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT When you look at natural user interfaces as a developer, it isn't just fun and games. There are some very serious, real-world usage models of how things can help make the world a better place – things like Intel® RealSense™ technology. Check out this upcoming eSeminar and join the panel of experts, both from inside and outside of Intel, as they discuss how natural user interfaces will likely be getting adopted in a wide variety …

  • Hybrid cloud platforms need to think in terms of sweet spots when it comes to application platform interface (API) integration. Cloud Velocity has taken a unique approach to tight integration with the API sweet spot; enough to support the agility of physical and virtual apps, including multi-tier environments and databases, while reducing capital and operating costs. Read this case study to learn how a global-level Fortune 1000 company was able to deploy an entire 6+ TB Oracle eCommerce stack in Amazon Web …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds