A How To

For reasons known only to the development team of LiteStep, they only maintain the VC6 and mingw project files. Despite this, they still keep project files for newer versions of the MS development suite in CVS - for VC7 and VC8 at the time of writing. Don't use them, they are broken. You will need to load the .dsw (VC6) project file and allow the development suite to update it. This does a pretty good job, but some massaging is needed before you get much further.

Requirements

VS.NET 2003 or 2005
Platform SDK (XP SP2 or newer)

lsdev.org hosts an article summarising the steps and additional libraries you will need. A mirror of the article is available here. A supplementary note here is that the Platform SDK for Win2K3 SP1 fails to register itself properly with VS2005 - you will need to correct the paths inside the dialog (where you add libpng and zlib references).

If you try to compile LS with VS2005 at this point, you will still fail:

1) The conversion wizard enabled a security feature that checks for buffer vulnerabilities in the code. I'm not particularly concerned about this for LS, so simply disabled it. For each subproject in the LiteStep solution (hook, utility, lsapi and litestep), right click its name in the solution explorer and bring up the properties dialog. Head for the code generation entry under 'Configuration properties...C/C++...Code generation' and disable the 'Buffer Security Check'.

2) The last problem is the hook project. VS2005 doesn't add the msvcrt.lib and msvcmrt.lib blobs to the linker definition. This stops hook from being built. To fix this, add 'msvcrt.lib msvcmrt.lib' to the 'Additional options' field under 'Configuration properties...Linker...Command line'.

3) For each subproject, in the command line field for the linker, remove '/MAPINFO:LINES /MAPINFO:EXP /MAPINFO:EXPORTS' otherwise the linker will complain. Hook will still give a harmless warning about EXETYPE, which you can resolve by nuking the reference in the .def file (under source files within the hook subproject).

After all this messing around, you should be able to compile the code. Don't forget to reproduce these 3 changes under release or debug, if you want to switch the configuration from one to the other.