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. COM
  4. Runtime error when calling COM object

Runtime error when calling COM object

Scheduled Pinned Locked Moved COM
helpcomdotnetwindows-admindata-structures
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.
  • M Offline
    M Offline
    MAW30
    wrote on last edited by
    #1

    I resolved the problem for reading registry (see last entry for that problem) and now I have the following error when trying to run the COM. This error occurs in main() method for my .exe project as follows: static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ****HERE**** Application.Run(new FormXXXXXCS()); } The runtime has encountered a fatal error. The address of the error was at 0x7f5dd68b, on thread 0xdf4. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. Does anyone know what is causing this and how to solve. Michael

    L 1 Reply Last reply
    0
    • M MAW30

      I resolved the problem for reading registry (see last entry for that problem) and now I have the following error when trying to run the COM. This error occurs in main() method for my .exe project as follows: static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ****HERE**** Application.Run(new FormXXXXXCS()); } The runtime has encountered a fatal error. The address of the error was at 0x7f5dd68b, on thread 0xdf4. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. Does anyone know what is causing this and how to solve. Michael

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      0xc0000005 is access violation. Possibly in the COM component being accessed. If you can post the call stack, we can find the cause. Do you have source code of COM compoent? Also, are you using COM Events?

      Sohail

      M 1 Reply Last reply
      0
      • L Lost User

        0xc0000005 is access violation. Possibly in the COM component being accessed. If you can post the call stack, we can find the cause. Do you have source code of COM compoent? Also, are you using COM Events?

        Sohail

        M Offline
        M Offline
        MAW30
        wrote on last edited by
        #3

        No I don't have the source code. The COM works fine if executed from an .exe project but not as a Library, why would that be. Michael

        S 1 Reply Last reply
        0
        • M MAW30

          No I don't have the source code. The COM works fine if executed from an .exe project but not as a Library, why would that be. Michael

          S Offline
          S Offline
          sunil2004
          wrote on last edited by
          #4

          If the COM wroks fine in Exe and not as a library then finger point to the marshalling problem, can you please check whether the library and the application loads in the same AppDomain Regards, Sunil Tonger

          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