Upgrade to use on Visual Studio

Repaired some security errors occures in sourcecode.