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

  • Live Event Date: May 6, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT While you likely have very good reasons for remaining on WinXP after end of support -- an estimated 20-30% of worldwide devices still are -- the bottom line is your security risk is now significant. In the absence of security patches, attackers will certainly turn their attention to this new opportunity. Join Lumension Vice President Paul Zimski in this one-hour webcast to discuss risk and, more importantly, 5 pragmatic risk mitigation techniques …

  • When it comes to desktops – physical or virtual – it's all about the applications. Cloud-hosted virtual desktops are growing fast because you get local data center-class security and 24x7 access with the complete personalization and flexibility of your own desktop. Organizations make five common mistakes when it comes to planning and implementing their application management strategy. This eBook tells you what they are and how to avoid them, and offers real-life case studies on customers who didn't let …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds