Close some B.O., fix the parameters (constness, type) and mark unused functions with our macro for that purpose.
placed some variables in context fixed some function signatures closed a few possible buffer overruns sorry to the platform maintainers, I can't verify what I did for non-Win32 builds
removing underscores in macros DLL_EXPORT cleaning