Edit, Nov 19, 2011

NOTE: this post is out of date. Instead, please see the project here:
DM plugin - serial communication

This project uses relative paths everywhere, and sets output filenames dynamically based on the project name. To use it, extract/sync the github repository to an installation of the DMSDK, then rename the project in Visual Studio. You should be able to safely rename the project folder without breaking anything.

======================= Original post below ===================================

Yes, VS 2003 is out of date. I use it to compile C++ extension plugins for Gatan Digital Micrograph (DM), which we use to control our microscopes and acquire/process data. The SDK for DM is designed for Visual Studio 2003 (or older).

Part of the problem of doing something that very few others do is that the documentation is usually poor. This is very much the case with the SDK.

Here was my problem:

  • I don't know how to create a new project and have it compile. The SDK is sufficiently complicated and different from any standard Visual Studio project that it is difficult to take this path.
  • I don't know how to rename my VS 2003 project files without breaking the project. Thus, I am unwilling to distribute the source code to my project, since it is named something completely unrelated.

Here's my solution:

  • In Windows Explorer:
    1. Rename the project folder in the filesystem.
    2. Rename the .sln and .rc files in the project folder. DO NOT rename the .vcproj file.
  • In VS2003:
    1. Open the project by picking the .sln file to open.
    2. Rename the project in the solution explorer (right click, and select rename)
    3. Select the project in the solution explorer, and then click the File menu. Select Save as... and enter the new filename for your .vcproj file. You can now delete the old .vcproj file from the folder.
    4. For old source files to be excluded, right click them in the solution explorer, and click remove.
    5. For new files to be included, right click on the project or folder in the solution explorer, and select Add... -> Add existing item...
    6. In the project properties (right click the project, and select properties):
      1. Under C/C++, pick the Precompiled Header options, and rename the Precompiled header file appropriately (not entirely necessary, this is a cosmetic change since this file gets (re)generated automatically when necessary)
      2. Under Linker, in the General options, change the Output File.
      3. Under Linker, Debugging: update the "Generate Program Database File" option
      4. Under Linker, Advanced: update the "Import Library" option

      Now you should no longer have any files popping up with the old name.

      Good luck with your DM plugins and renamed VS 2003 projects!