Windows Service support code
Removed a useless function and add win32 compatibility stuff
Removal of warnings and errors on Windows build
The last pieces of Win32 support. Now it compiles but it needs major rework.