title: Writing device driver?
body: <p>I wonder if I understand correctly...</p>
  
  <p>Say, if I want to control how my mouse work, i.e Left Button open window, Right Button send keystroke 'A' etc.  </p>
  
  <p>But I am not talking about writting something like follows in an application:</p>
  
  <pre><code>void MouseDown(xxxxEventArgs e, sender object)
  {
  
  }
  </code></pre>
  
  <p>I want to completely controls how the device work, then I will need to write a driver for it?  From what I learn in assembly before, controlling a device I should need to know their port to communicate with the device.  But say if I buy a Logitech mouse, is it possible to write a mouse driver myself to use it?</p>
  
  <p>Because I saw some project that they buy a usb web cam from store, and they could able to control the web came to rotate, recevie the image from the web cam, I wonder if that's because the web cam has API provided them? </p>
  
  <p>Thanks in advance.</p>