title: Using IMessageFilter not working under windows 7 64bit (C#, .net 2.0)
body: <p>We are working on a USB device program. Following code snippet is my UsbComponent class.
  It works fine under windows XP or even windows 64 32bit.
  But under windows 7 64bit, PreFilterMessage never gets entered whenever I plugin/remove our USB device. Did I miss anything to make following code working under windows 7 64bit?</p>
  
  <pre><code>using System;
  using System.ComponentModel;
  using System.Collections.Generic;
  using System.Diagnostics;
  using System.Text;
  using System.Windows.Forms;
  
  public partial class UsbComponent : Component, IMessageFilter {
        private const int WM_DEVICECHANGE = 0x219;
  
        public UsbComponent() {
          InitializeComponent();
          Application.AddMessageFilter( this );
        }
  
        public UsbComponent( IContainer container ) {
          container.Add( this );
          InitializeComponent();
          Application.AddMessageFilter( this );
        }
  
        bool IMessageFilter.PreFilterMessage( ref Message m ) {
          if( m.Msg == WM_DEVICECHANGE ) {
            MessageBox.Show("device changed");
            return true;
          }
          return false;
        }
  }
  </code></pre>