Building the Microsoft Detours library for Visual Studio 2008

- Download Microsoft Detours .
- Install (all by default).
- Go to the project folder, open the samples \ common.mak file in any text editor (I have the full path to this file: C: \ Program Files \ Microsoft Research \ Detours Express 3.0 \ samples \ common.mak ). Attention - if you use Vista \ Win7 with UAC enabled, you will need an editor running with administrator privileges (“Run as administrator”).
- Find the line
and replace it withrc /nologo /fo$(@) /i$(INCD) $(*B).rc
rc /fo$(@) /i$(INCD) $(*B).rc
those. remove "/ nologo" - We launch the Visual Studio console with administrator privileges: Start-> All programs-> Microsoft Visual Studio 2008-> Visual Studio Tools-> Visual Studio 2008 Command Prompt - “Run as administrator”
- Go to the Microsoft Detours folder
cd "C:\Program Files\Microsoft Research\Detours Express 3.0"
- Declare an environment variable with the target platform
set DETOURS_TARGET_PROCESSOR=x86
- Build
nmake all
At the output, we get the assembled library and all the examples from the samples folder.
Good luck to use.