Visual Studio 2010 kills (there is no other word) data in one of the arguments of the function in the unsafe block. What could cause this error? The following message shows
In Visual Studio 2012:
Go to the project properties -> Debug -> Uncheck "Enable the Visual Studio hosting process"