Using Visual C++ 2005 express edition

This is a long procedure, and needs to be followed carefully. If you are wild and/or wobbly after a party of some kind, save it until tomorrow. Two large downloads are needed. Both are around 400 MB. You don't want to be using a dial up modem for this.

Be careful, or you'll just get cross. It might help to avoid mistakes if you do this with a friend. So long as she/he isn't the exciting or distracting type of friend.

From this link you can download legally and for free Visual C++ 2005 express edition: download here. Microsoft occasionally confuse their web site. If that link doesn't work, try this one.
Assuming that one of those links works, scroll down to the bottom and do most of what they say.
  1. Uninstall any previous versions of visual studio/C++ 2005, or .NET 2.0 that you may have. Leaving them installed will make everything fail. Other, older versions such as version 6 or the first .NET version (version 7) are harmless, you can, and probably should keep them. Just in case.
  2. Click their "download" link. This starts up an internet installation. If you want something more permanent, something you can burn onto a CD, scroll down to the "file packaging and download paths" section, and use the "Visual C++ 2005 Express Edition" entry. Unless you have some experience of this kind of thing, you will find the ".ISO" version easiest to handle. Use it to burn a CD (don't just store the file on a CD, treat it as a CD image), and install directly from that CD.
  3. I don't care whether you register or not. I didn't (if some corporation wants my help with customer research, they can pay for it.). My installation still works properly.
  4. It doesn't stop there. You now need to go though another long download to get the PSDK (platform software development kit). Without it, nothing useful works. Here is a copy of the link, but you'd be better off clicking on the link they give you in step 4.
  5. Go straight to step two (you've just done step 1, don't repeat it) and click the "platform SDK" link.
  6. You have to go through their validation procedure. It is quite quick, and lets them check that you are not using an obviously pirated copy of windows. If you are using a pirate windows, I don't know what you can do. Well, I do, but I'm not going to say it in public.
  7. Once validated, scroll right down to "related resources" and use eirther the second or third link. What you need is "Windows Server R2 Platform SDK". The .ISO version gives you something convenient for burning on a CD, and is no less full than the "full download".
  8. Install it.
  9. Here's something they don't tell you. At this stage you may well find it is impossible to start up the visual C++ application (under the start menu). Trying to start it may do absolutely nothing. No warnings or error messages, just nothing happening. In this case you will have to reboot you computer (shutdown then turn it on again. Hibernate or Sleep do not do the job.)
  10. Now start up visual C++ 2005 express edition. Under the "tools" menu, click on "options...". Click the + sign to the left of "projects and solutions", near the left of the window. When that section expands, click on "VC++ directories". Now:
    1. Make sure "executable files" is selected under "show directories for".
    2. Click on the little icon showing a folder with a sparkle on it.
    3. It gives you a little box for adding a new entry. Use the "..." button beside it to browse for "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin"
    4. When you find it, DON'T double click it. Just select it with a single click, then press the "open" button. When you see the whole path appear, press the "OK" button.
    5. Now you need to go through that procedure twice more.
    6. Under "show directories for", select "include files"
    7. Add "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include" in the same way.
    8. Under "show directories for", select "library files"
    9. Add "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib" in the now faniliar way.
  11. Now you have to exit from the visual C++ 2005 express edition application. Don't just minimise its window, completely exit.
  12. Now, using your favourite simple text editor (even notepad will do), open the file "C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\corewin_express.vsprops". Go to the line that says AdditionalDependencies="kernel32.lib" and change it so that it says AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib" (that is ten file names in the quotes).
  13. Now, with your favourite simple text editor again, open the file "C:\Program Files\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\AppSettings.htm" (they don't make anything easy). Go down to line number 441. (I hope they don't make any little changes to the file's format). You should see four lines that say
    "WIN_APP.disabled = true;
    WIN_APP_LABEL.disabled = true;
    DLL_APP.disabled = true;
    DLL_APP_LABEL.disabled = true;"
    They are bad. The safest way to get rid of them is to turn them into comments. Just put "//" in front of each one, so they now say
    "// WIN_APP.disabled = true;
    // WIN_APP_LABEL.disabled = true;
    // DLL_APP.disabled = true;
    // DLL_APP_LABEL.disabled = true;"
    Save and exit.
  14. Now you are ready to go. When you create a new "project" in visual C++ 2005 express edition, you have to go through slightly different steps than with other versions:
    1. Under the "file" menu, select "new" then "project".
    2. under "project types" you should see "visual C++". If there is a plus sign beside it, click it and it expands.
    3. Select "win32", then to the right, select "win32 console application" (this is exactly the wrong thing to do in other versions).
    4. Down below, choose the project's location, and give it a name.
    5. Click "OK".
    6. Now you'll see the "Win32 Application Wizard"
    7. Click the thing labelled "Application Settings" at the left.
    8. Now you need to change two settings: Select "windows application", do NOT leave it on "console", you don't get a second chance. Also select "Empty Project" instead of the "precompiled" nonsense. Now it is OK to press FINISH.
    9. You won't see much, but the project is ready to go. Under the "Project" menu you'll see the familiar "add existing item" and "add new item" entries. Use them in the familiar way, and enter your program.
    10. But make sure you have got the new (version 8 or 2005) version of both library files. The older versions will produce a complete disaster.
    11. If you got each step exactly right, everything will work perfectly. If you got a step wrong, you have probably caused the end of the world and doomed us all.
    But even so, please let me know if something fails. For all future projects, you don't need to go through all this rubbish. You can start from the "now you are ready to go" step.

    This complexity isn't my fault! If you get frustrated and want revenge, you want it on someone else.