Why do we get System.Runtime.InteropServices.COMException

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bharathreddy
    New Member
    • Aug 2006
    • 116

    #1

    Why do we get System.Runtime.InteropServices.COMException

    Hi,

    Why do we get System.Runtime. InteropServices .COMException.
    Simple terms exception is thrown when an unrecognized HRESULT is returned from a COM method call. Apart from this is there any other kind of explanation.



    Thanks & Regs
    Bharath Reddy VasiReddy
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by bharathreddy
    Hi,

    Why do we get System.Runtime. InteropServices .COMException.
    Simple terms exception is thrown when an unrecognized HRESULT is returned from a COM method call. Apart from this is there any other kind of explanation.



    Thanks & Regs
    Bharath Reddy VasiReddy
    I received a similar error once before when I hadn't properly registered/referenced the object.
    I recommend you try:
    • Uninstall the DLL (use the regsvr32 -u tool to unregister from the registry)
    • Reboot your computer
    • Re-register the DLL (use the regsvr32 tool to re-register it)
    • Re-reference the DLL in your project
    • Recompile your project


    Cheers!

    -Frinny

    Comment

    • bharathreddy
      New Member
      • Aug 2006
      • 116

      #3
      Thankyou Frinny,
      It worked out.


      Thanks & Regs
      Bharath Reddy VasiReddy

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Glad it helped :)

        -Frinny

        Comment

        Working...