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. Application Dissapearing After Linking With COM

Application Dissapearing After Linking With COM

Scheduled Pinned Locked Moved COM
csharpc++questioncomsecurity
5 Posts 3 Posters 1 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.
  • A Offline
    A Offline
    Aaron Dilliard
    wrote on last edited by
    #1

    I have a COM dll written in c# that is being called from various c++ applications. On only 1 machine so far, I am having the application that calls the COM dll just dissapear and unload. I am unsure what is happening. I have try catches all through the code trying to catch the exception getting thrown, but it doesnt catch, just unloads. What types of exceptions or security issues would cause the entire application to unload without getting caught? It is worth noting that so far the only applications that are failing are VS6 MFC apps. Apps that are built in VS2005, or that are instantiated in a .net environment do not produce this issue. The scenario is this. C++ app calls VS2005 dll which holds refrences to the c# COM dll. 2005 dll calls into c# COM which provides webservice access to the caller. It is also worth nothing that a static method calls a singleton class in the C# COM dll. (Singleton is for websvc access). I know it is not much to go on, but I need ideas about general security problems or COM issues with what I have described, or even what type of exception is uncatchable and unloads the app :). Thanks in advance.

    C 1 Reply Last reply
    0
    • A Aaron Dilliard

      I have a COM dll written in c# that is being called from various c++ applications. On only 1 machine so far, I am having the application that calls the COM dll just dissapear and unload. I am unsure what is happening. I have try catches all through the code trying to catch the exception getting thrown, but it doesnt catch, just unloads. What types of exceptions or security issues would cause the entire application to unload without getting caught? It is worth noting that so far the only applications that are failing are VS6 MFC apps. Apps that are built in VS2005, or that are instantiated in a .net environment do not produce this issue. The scenario is this. C++ app calls VS2005 dll which holds refrences to the c# COM dll. 2005 dll calls into c# COM which provides webservice access to the caller. It is also worth nothing that a static method calls a singleton class in the C# COM dll. (Singleton is for websvc access). I know it is not much to go on, but I need ideas about general security problems or COM issues with what I have described, or even what type of exception is uncatchable and unloads the app :). Thanks in advance.

      C Offline
      C Offline
      CurtD
      wrote on last edited by
      #2

      Usually an app going *poof* is caused by the instruction ptr sending it off into the Twilight Zone. Most likely your TLB's and DLL's are out of synch. I.e. your application was compiled against a TLB that does not match the DLL.

      S 1 Reply Last reply
      0
      • C CurtD

        Usually an app going *poof* is caused by the instruction ptr sending it off into the Twilight Zone. Most likely your TLB's and DLL's are out of synch. I.e. your application was compiled against a TLB that does not match the DLL.

        S Offline
        S Offline
        Stephen Hewitt
        wrote on last edited by
        #3

        Depends what is meant by “poof”. Normally, in the circumstance you describe (“instruction ptr sending it off into the Twilight Zone”), you'll get some kind of “this application has performed an illegal operation and will be terminated” dialog before it’s terminated. There are some situations where the damage to the process is such that the OS can’t get that far and the application simply vanishes without any warning whatsoever. One cause of this is a corrupted EXCEPTION_REGISTRATION linked list.

        Steve

        A 1 Reply Last reply
        0
        • S Stephen Hewitt

          Depends what is meant by “poof”. Normally, in the circumstance you describe (“instruction ptr sending it off into the Twilight Zone”), you'll get some kind of “this application has performed an illegal operation and will be terminated” dialog before it’s terminated. There are some situations where the damage to the process is such that the OS can’t get that far and the application simply vanishes without any warning whatsoever. One cause of this is a corrupted EXCEPTION_REGISTRATION linked list.

          Steve

          A Offline
          A Offline
          Aaron Dilliard
          wrote on last edited by
          #4

          Well... I guess I could have my files out of sync... anything is possible at this point. It is one of those issues that makes you pull your hair out. I get no information whatsoever from this. I do know from my tracing that it is blowing away in the COM assembly itself, right when it is about to access the webservice. It always goes away at the same place. It just seems odd that it would only be these 2 MFC apps that would get messed up when at least 8 other applications (VS2005 or .net encapsulated admittedly) use the same assembly. At first I thought it was a security problem, so I demanded unrestricted permission... and no exception. I just wish there was a way to figure out what was going on. This machine does not have VS and can not have it installed, so I have to debug with tracing. Not very helpful for this scenario.

          C 1 Reply Last reply
          0
          • A Aaron Dilliard

            Well... I guess I could have my files out of sync... anything is possible at this point. It is one of those issues that makes you pull your hair out. I get no information whatsoever from this. I do know from my tracing that it is blowing away in the COM assembly itself, right when it is about to access the webservice. It always goes away at the same place. It just seems odd that it would only be these 2 MFC apps that would get messed up when at least 8 other applications (VS2005 or .net encapsulated admittedly) use the same assembly. At first I thought it was a security problem, so I demanded unrestricted permission... and no exception. I just wish there was a way to figure out what was going on. This machine does not have VS and can not have it installed, so I have to debug with tracing. Not very helpful for this scenario.

            C Offline
            C Offline
            CurtD
            wrote on last edited by
            #5

            What about the debugging tools for Windows (WinDbg, etc.)? These are not as easy to use as VS, but I have been able to find some deep and nasty problems with them. It was a similar situation where I had to debug in release mode with no VS.

            modified on Thursday, March 5, 2009 2:57 PM

            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