title: Class cannot be embedded. Use the applicable interface instead
body: <p>I'm using WIA to capture an image fron the scanner to the windows form. Here is the code I'm using:</p>
  
  <pre><code>private void button2_Click(object sender, EventArgs e)
  {
      const string wiaFormatJPEG = "{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}";
      CommonDialogClass wiaDiag = new CommonDialogClass();
      WIA.ImageFile wiaImage = null;
  
      wiaImage = wiaDiag.ShowAcquireImage(
              WiaDeviceType.UnspecifiedDeviceType,
              WiaImageIntent.GrayscaleIntent,
              WiaImageBias.MaximizeQuality,
              wiaFormatJPEG, true, true, false);
  
      WIA.Vector vector = wiaImage.FileData;
  
      Image i = Image.FromStream(new MemoryStream((byte[])vector.get_BinaryData()));
      i.Save(@"D:\prueba1.jpeg");
  }
  </code></pre>
  
  <p>When trying to run this little test, I get this error:</p>
  
  <blockquote>
    <p>Interop type 'WIA.CommonDialogClass'
    cannot be embedded. Use the applicable
    interface instead.</p>
  </blockquote>
  
  <p>And this:</p>
  
  <blockquote>
    <p>'WIA.CommonDialogClass' does not
    contain a definition for
    'ShowAcquireImage' and no extension
    method 'ShowAcquireImage' accepting a
    first argument of type
    'WIA.CommonDialogClass' could be found
    (are you missing a using directive or
    an assembly reference?</p>
  </blockquote>
  
  <p>I'm guessing the second error is being risen because of the first error, right?</p>
  
  <p>Any suggestions on how to fix this?</p>