Project Line Counter Add-In

Line Counter Main Dialog

Project Statistics

Environment: Visual C++ 5 and 6


The Project Line Counter add-in reports statistics about files in your Visual C++ projects. Line Counter was created in order to demonstrate various programming tools and techniques.


  • Varied statistical data about your source code, including:
    • Number of lines
    • Lines with code
    • Lines with C/C++ style comments
    • Mixed lines (code and comments)
  • Reports the distribution of files in your project, by extension.  NEW!
  • Can export the statistical data to a text report file.  NEW!
  • Automatic scan of your project file.
  • Single-click activation.
  • Various parsing options.
  • Online help.
  • Full source code.

The Source Code

Line Counter is a demo/proof of concept application for demonstrating various technologies:

  1. Reusable components from WndTabs (pluggable online help, registry configuration, etc.)
  2. The Add-In Communication Library.
  3. Joshua Jensen's Workspace Whiz! Interface - a powerful extension library for DevStudio add-ins.
All of these components are discussed in detail in the add-in's on-line help file.

What's New?

Version 1.11 is a maintenance release that adds support for WWhizInterface! v2.10

The previous Version 1.10 was a maintenance release, with some new features and a few internal changes:

  • Line-Counter no longer uses the STL, and dependencies on the various STL runtime libraries (such as MSVCP60.dll) has been removed.
  • New feature: A file summary dialog which displays the distribution of files by extension.
  • New feature: Ability to export the statistical results as a simple text report.
  • The old HTML Help support module (HTMLHelpBase.cpp) has been replaced with a new and much improved support module (HHSupp.cpp). Unlike the old HTMLHelpBase which only handled help for dialogs and property pages, the new support module supports full MFC applications. There have also been improvements in the dialog handling code.
See the full version history.


Download binaries (v1.11) - 117 KB
Download binaries with source (v1.11) - 221 KB
NOTE: Please refer to the PLC.txt file for installation instructions.


  • How to install for VS .NET 2003?

    Posted by Frank Lagattuta on 03/23/2005 07:26pm

    How do you install this addin for Visual Studio .Net 2003?

  • Export Summary crashes!

    Posted by Legacy on 09/05/2002 12:00am

    Originally posted by: Ramachandran/Raghu

    Good tool - useful in finding the LOC and comment percentage for large size projects.
    However, we found that the application crashes consistently when attempted to export the result summary.
    Not only this, it even kills the active Visual Studio instance.
    Would be nice if this bug is fixed...

    Good going!

    Mumbai, INDIA

  • Nice code

    Posted by Legacy on 06/06/2002 12:00am

    Originally posted by: Ai Xing

    Excellent source.

  • exclusive files

    Posted by Legacy on 02/21/2002 12:00am

    Originally posted by: smxiang

    for projects that reuse source files from other projects or common libraries, the resued files should be not take in count. so, how about to add "exclusive files list" feature?

    thanks for your great work!

    ABCom, R&D
    Shanghai, China

  • Great..

    Posted by Legacy on 07/11/2001 12:00am

    Originally posted by: Shinto

    Good work Oz.

    saved lot of my time.


  • Suggestions

    Posted by Legacy on 05/10/2001 12:00am

    Originally posted by: Darrell Gerber

    Some suggestions for future versions:

    1) Apply only to the current file
    2) Apply only to the current selection
    3) Options for what is counted as not a line of code.
    i.e. -- lines with only a curly bracket may or may not be counted.

    Otherwise it is great. Saved me alot of time of having to write a macro or something myself.

  • Excellent

    Posted by Legacy on 04/22/2001 12:00am

    Originally posted by: sally

    Excellent - Just what I needed


  • !

    Posted by Legacy on 04/04/2001 12:00am

    Originally posted by: TheAxe


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

Top White Papers and Webcasts

  • Learn How A Global Entertainment Company Saw a 448% ROI Every business today uses software to manage systems, deliver products, and empower employees to do their jobs. But software inevitably breaks, and when it does, businesses lose money -- in the form of dissatisfied customers, missed SLAs or lost productivity. PagerDuty, an operations performance platform, solves this problem by helping operations engineers and developers more effectively manage and resolve incidents across a company's global operations. …

  • Live Event Date: December 18, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT The Internet of Things (IoT) incorporates physical devices into business processes using predictive analytics. While it relies heavily on existing Internet technologies, it differs by including physical devices, specialized protocols, physical analytics, and a unique partner network. To capture the real business value of IoT, the industry must move beyond customized projects to general patterns and platforms. Check out this upcoming webcast …

Most Popular Programming Stories

More for Developers

RSS Feeds