title: ConvertStringSecurityDescriptorToSecurityDescriptor() prevents my program to end properly
body: <p>I've found that function <code>ConvertStringSecurityDescriptorToSecurityDescriptor()</code> is preventing my program to end properly. Even if I call <code>ExitProcess(0)</code>, my program stays open in background. If I remove this function, program ends properly.</p>
  
  <p>With a help of a debugger I've found that this function creates a new thread which stays open after this function end.</p>
  
  <p>How to force this function to behave correctly and close all threads which it opens?</p>
  
  <p>My code:</p>
  
  <pre><code>int main() {
    PSECURITY_DESCRIPTOR d;
    // program has 1 thread
    ConvertStringSecurityDescriptorToSecurityDescriptorW(L".....", SDDL_REVISION_1, &amp;d, NULL);
    // program has 2 threads
    return 0; // still running in background after this
  }
  </code></pre>