ImageFile imageFile = null;
CommonDialogClass cdc = new WIA.CommonDialogClass();
try
{
imageFile = cdc.ShowAcquireImage(WIA.WiaDeviceType.ScannerDeviceType,
WIA.WiaImageIntent.TextIntent,
WIA.WiaImageBias.MaximizeQuality,
"{00000000-0000-0000-0000-000000000000}",
true,
true,
false);
}
catch (System.Runtime.InteropServices.COMException)
{
imageFile = null;
}