title: PostMessage: How to post a message to a process that does not have a window?
body: <p>I am working with windows credential provider using a device that authenticates a user. Communication with the device is done on a separate thread.</p>
  
  <p>I created and registered a credential provider <code>dll</code> that windows interfaces with. The <code>dll</code> creates a thread that authenticates the user and calls the credential provider. However, the call to the credential provider is currently on the thread that was created and not the main thread that windows <code>Logon/UI</code> is on. This is clearly going to cause threading problems.</p>
  
  <p>The solution is to use <code>PostMessage</code> to post a message from the created thread to the <code>Logon/UI</code> thread. I've only used <code>PostMessage</code> with a windows gui application. How can I post a message from a thread to the windows <code>Logon/UI</code> process in my application?</p>