i've developed a small c/c++ like project to ease the
process of logging the communication from/to other applications

the tracer loggs some of the exported functions
and the PostMessageW communication into an binary file

you need
  * VS2005 (SP1)
  * Microsofts Detours Express 2.1
    http://research.microsoft.com/sn/detours/

install Detours
  1. open a shell with run -> "cmd"
  2. c:\Programme\Microsoft Visual Studio 8\VC\vcvarsall.bat
  3. cd c:\Programme\Microsoft Research\Detours Express 2.1
  4. nmake

how to compile
  1. open tracer\tracer.sln
  2. compile

how to use:
  the withdll.exe from C:\Programme\Microsoft Research\Detours Express 2.1\bin\withdll.exe
  and maybe C:\Programme\Microsoft Research\Detours Express 2.1\bin\withdll.exe.manifest if
  you want to move the withdll.exe around

  withdll /d:tracerdll.dll [s7onlinx.dll using application]

  example: withdll /d:tracerdll.dll ncdde.exe
  (you need to kill the ncdde.exe prozess after finish logging)
 
  this produce an tracerdll.bin in the folder of the tracerdll.dll

  you can inspect the tracerdll.bin file with the tracerview.exe
  tracerview tracerdll.bin

LowLevelMahn

get it here: http://sps-forum.de/showthread.php?t=17686