title: CreateMutex on Windows 2012 with error code ERROR_ACCESS_DENIED
body: <p>I am trying to create mutex on Windows 2012 with this code:</p>
  
  <pre><code>CreateMutex(securityAttributes, FALSE, TEXT("Global\\test"));
  </code></pre>
  
  <p>it always gives error code 5 (ERROR_ACCESS_DENIED).</p>
  
  <p>I have tried to create security attributes that I found <a href="http://blogs.msdn.com/b/winsdk/archive/2009/11/10/access-denied-on-a-mutex.aspx" rel="nofollow">here</a> but with no success.
  Note that this code works on Windows 7.</p>
  
  <p>What could be a problem here?</p>
  
  <p>I want to create global mutex that can be used by windows service (System account) and user account.</p>