0

I had a Windows Forms application that I published and installed on my server, but when I tried to use it sadly gave me this error:

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} failed due to the following error:
80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
    at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
    at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
    at System.Activator.CreateInstance(Type type, Boolean nonPublic)
    at System.Activator.CreateInstance(Type type)
    at PDFtoDoc.Form1.DoOCR(String FullPath)
    at PDFtoDoc.Form1.CheckFileAndDoOCR(String directoryPath)
    at PDFtoDoc.Form1.timer1_Tick(Object sender, EventArgs e)
    at System.Windows.Forms.Timer.OnTick(EventArgs e)
    at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This seemed like a ".dll" file missing to me, but I couldn't figure out which one or if this is the real problem. What could cause this? And how do I solve it?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Berker Yüceer
  • 7,026
  • 18
  • 68
  • 102
  • 2
    This answer should cover it: http://stackoverflow.com/questions/8213894/using-interop-modi-throws-0x80040154-exception – Preet Sangha Jul 05 '12 at 08:15

1 Answers1

1

This is the issue of COM Interop. You need to copy manually the dll file to the application or package dll file into installer.

  • 1
    Well, instead of copying manually, re-installing `Microsoft Image Acquisition Library` solves the problem more safely. thanks for the idea its solved now. – Berker Yüceer Jul 05 '12 at 10:29