Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7710549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:09:12+00:00 2026-06-01T01:09:12+00:00

I am using c# to build a small test project which will scan a

  • 0

I am using c# to build a small test project which will scan a image .Here is my code to do that

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using WIA;
namespace Scanner
{
    public class Scanner
    {
        Device oDevice;
        Item oItem;
        CommonDialogClass dlg;
        public Scanner()
        {

                dlg = new CommonDialogClass();
                oDevice = dlg.ShowSelectDevice(WiaDeviceType.UnspecifiedDeviceType, true, false);


        }
        public void Scann()
        {
            dlg.ShowAcquisitionWizard(oDevice);
        }
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
       // [STAThread]
        static void Main()
        {
           Application.EnableVisualStyles();
           Application.SetCompatibleTextRenderingDefault(false);
           Application.Run(new Form1());
       }
    }
}

 private void button1_Click(object sender, EventArgs e)
        {
            Scanner oScanner = new Scanner();
            oScanner.Scann();
            button1.Text = "Image scanned";
            OpenFileDialog dlg = new OpenFileDialog();
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                pictureBox1.Image = Image.FromFile(dlg.FileName);
            }
        }

But when I try to run the application and click the button I get the following error at this line dlg = new CommonDialogClass();

Creating an instance of the COM component with CLSID {850D1D11-70F3-4BE5-9A11-77AA6B2BB201} from the IClassFactory failed due to the following error: 80070422.

Can anybody suggest me what the issue here is
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:09:13+00:00Added an answer on June 1, 2026 at 1:09 am

    http://mahaafifi.blogspot.co.uk/2012/03/iclassfactory-failed-due-to-following.html

    “go to windows Adminstrative tools => services => WIA service => enable it and start it”

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using C# to build a small project which scans a image.I am
I have a small gradle build which is using a 3rd party plugin it
I'm using Phonegap to build a small (test only) Macrumors application, and remote hosts
I am trying to build a small page using django which uses a facebook
I recently started using scons to build several small cross-platform projects. One of these
I'm using a build script that calls Wise to create some install files. The
I have a small project that builds a number of targets from the same
I am making a small game as sort of a test project, nothing major.
I am developing a small testing website using Django 1.2 in Aptana Studio build
I'm currently in the early stages of designing a system that will end up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.