title: App crashes with Attempted to read or write protected memory
body: <p>Please someone can tell me about what could possibly be causing this error below :</p>
  
  <blockquote>
    <p>Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
           at System.String.wcslen(Char* ptr)
           at System.String.CtorCharPtr(Char* ptr)
           at System.Runtime.InteropServices.Marshal.PtrToStringUni(IntPtr ptr)
           at Microsoft.Win32.SystemEvents.GetUserPreferenceCategory(Int32 msg, IntPtr wParam, IntPtr lParam)
           at Microsoft.Win32.SystemEvents.OnUserPreferenceChanging(Int32 msg, IntPtr wParam, IntPtr lParam)
           at Microsoft.Win32.SystemEvents.WindowProc(IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           at My.Program.Main(String[] args)</p>
  </blockquote>
  
  <p>Application: My.exe (C#)
  Framework Version: v4.0.30319
  Installed .Net Framework : 4.5.2</p>