title: Detect OpenFileDialog
body: <p>For a very peculiar requirement of a DLP software, I'm trying to detect OpenFileDialogs and cancel the file selection action, after capturing the selected file.</p>
  
  <p>How am I trying to do this?</p>
  
  <p>I put a global hook on the mouse and keyboard. I detect all actions that the user can perform to select a file in the OpenFileDialog window.</p>
  
  <p>What I could not do until now is to detect if the window is an OpenFileDialog by hwnd.</p>
  
  <p>Why am I trying this way?</p>
  
  <p>I am a high level programmer and tried initially with windows hooks, without success. I tried with easyhook and deviare2. There seems to be no simpler way to put a global hook in a COM (IFileDialog) component call.</p>
  
  <p>Is there any way to detect if a window is the default Windows OpenFileDialog window by hwnd?</p>
  
  <pre><code>public bool IsOpenFileDialog(IntPtr hwnd)
  {
      return ?
  }
  </code></pre>