Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows 7: Winform application report error when try to invoke the COM object

Windows 7: Winform application report error when try to invoke the COM object

Scheduled Pinned Locked Moved C#
helpcsharpdotnetcomgraphics
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cracked Down
    wrote on last edited by
    #1

    Hi all, I am gettting following error when I try to run a winform application which invokes the COM component Anybody have idea how to resolve this problem? I could not get any info from googling on net Unhandled exception has occured in your application. If you......blaw blaw Retriving the COM class factory for component with CLSID {491B.....} failed due to following error 80080005 Error : ************** Exception Text ************** System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {491B6189-7E9D-43F4-A7DE-C062DF7B326E} failed due to the following error: 80080005. at ComInvoker.Form1.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900) CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- ComInvoker Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/CUMMINS/InvkoerSetup/ComInvoker.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version

    P L 2 Replies Last reply
    0
    • C Cracked Down

      Hi all, I am gettting following error when I try to run a winform application which invokes the COM component Anybody have idea how to resolve this problem? I could not get any info from googling on net Unhandled exception has occured in your application. If you......blaw blaw Retriving the COM class factory for component with CLSID {491B.....} failed due to following error 80080005 Error : ************** Exception Text ************** System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {491B6189-7E9D-43F4-A7DE-C062DF7B326E} failed due to the following error: 80080005. at ComInvoker.Form1.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900) CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- ComInvoker Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/CUMMINS/InvkoerSetup/ComInvoker.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Check in the registry to see if this component is registered. If not, attempt to register it using the regsvr32 command. It it is registered, use depends.exe[^] to check that all the things it's relying on are registered.

      I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

      My blog | My articles | MoXAML PowerToys | Onyx

      1 Reply Last reply
      0
      • C Cracked Down

        Hi all, I am gettting following error when I try to run a winform application which invokes the COM component Anybody have idea how to resolve this problem? I could not get any info from googling on net Unhandled exception has occured in your application. If you......blaw blaw Retriving the COM class factory for component with CLSID {491B.....} failed due to following error 80080005 Error : ************** Exception Text ************** System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {491B6189-7E9D-43F4-A7DE-C062DF7B326E} failed due to the following error: 80080005. at ComInvoker.Form1.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900) CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- ComInvoker Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/CUMMINS/InvkoerSetup/ComInvoker.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        and it works well on an earlier system? could it be your app is compiled for "AnyCPU", your Win7 machine uses 64-bit, and your DLL is built for 32-bit? On Win64, you can't mix and match within a single process. If the above applies, then: - either build for "x86" (i.e. 32-bit); this assumes all your native code is 32-bit; - or look for a 64-bit DLL (and give your app the advantages, if any, of 64-bit). :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

        Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

        C 1 Reply Last reply
        0
        • L Luc Pattyn

          and it works well on an earlier system? could it be your app is compiled for "AnyCPU", your Win7 machine uses 64-bit, and your DLL is built for 32-bit? On Win64, you can't mix and match within a single process. If the above applies, then: - either build for "x86" (i.e. 32-bit); this assumes all your native code is 32-bit; - or look for a 64-bit DLL (and give your app the advantages, if any, of 64-bit). :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

          Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

          C Offline
          C Offline
          Cracked Down
          wrote on last edited by
          #4

          I have created a test application and and I am invoking two COM objects from it one is Matlab application and other is Word. I am getting above error for Matlab COM and Word Com is opens without error I have already done the above changes like build for "x86", we are just porting our application to windows 7 and we are gettting this error. I got admin rights on windows 7. one info this com is present in registry

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups