title: How to check if a process has access to a securable object in windows
body: <p>Scenario: I have a service that can create, start, stop other services and offers this through IPC to user processes.</p>
  <p>How can I check in my service if the calling process has permissions to access the SCM?</p>
  <p>So on a more abstract level I have some securable object, in this case the SCM but it can be really anything an other process a thread, a file, folder or reg key, etc...
  And I have some user process that may or may not have the permissions to access that resource.
  How can I in a 3rd party process determine if said user process has access to a given securable object?</p>