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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Delayed QueryInterface error Exception!!!

Delayed QueryInterface error Exception!!!

Scheduled Pinned Locked Moved C#
c++helpcsharpcomquestion
6 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.
  • E Offline
    E Offline
    EdgarBM
    wrote on last edited by
    #1

    Hi, I'm using a VC++ 6.0 ATL COM object in a .NET code. The library is registered before usign it. Everything work correctly if the library is being accessed continuously; the problem appears when it's not accessed for a while (maybe 5 minutes, it has not been completely assumed) so when it's accessed again it returns an exception of a QueryInterface error for the library interface, although the library has not been modified, neither changed or deleted...nothing! the system only has been forgotten for a while... Any suggestion or good idea?, any knowledge about it? Thank you in advance, Edgar __________________________________________ Edgar Berengena Moreno Software Engineer Appeyron Research

    J L 2 Replies Last reply
    0
    • E EdgarBM

      Hi, I'm using a VC++ 6.0 ATL COM object in a .NET code. The library is registered before usign it. Everything work correctly if the library is being accessed continuously; the problem appears when it's not accessed for a while (maybe 5 minutes, it has not been completely assumed) so when it's accessed again it returns an exception of a QueryInterface error for the library interface, although the library has not been modified, neither changed or deleted...nothing! the system only has been forgotten for a while... Any suggestion or good idea?, any knowledge about it? Thank you in advance, Edgar __________________________________________ Edgar Berengena Moreno Software Engineer Appeyron Research

      J Offline
      J Offline
      John Fisher
      wrote on last edited by
      #2

      Is it possible that all of the .NET references to your COM object are being released in that 5 minutes? If not, have you debugged both your .NET code and the COM object to see which side actually returns the error? John :D

      E 1 Reply Last reply
      0
      • E EdgarBM

        Hi, I'm using a VC++ 6.0 ATL COM object in a .NET code. The library is registered before usign it. Everything work correctly if the library is being accessed continuously; the problem appears when it's not accessed for a while (maybe 5 minutes, it has not been completely assumed) so when it's accessed again it returns an exception of a QueryInterface error for the library interface, although the library has not been modified, neither changed or deleted...nothing! the system only has been forgotten for a while... Any suggestion or good idea?, any knowledge about it? Thank you in advance, Edgar __________________________________________ Edgar Berengena Moreno Software Engineer Appeyron Research

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        EdgarBM wrote: 5 minutes Sounds like remoting :) Well thats the timeout anyways... MyDUMeter: a .NET DUMeter clone

        E 1 Reply Last reply
        0
        • J John Fisher

          Is it possible that all of the .NET references to your COM object are being released in that 5 minutes? If not, have you debugged both your .NET code and the COM object to see which side actually returns the error? John :D

          E Offline
          E Offline
          EdgarBM
          wrote on last edited by
          #4

          Thanks, John, It's said it's a hidden bug almost solved from Microsoft. There's a hotfix still not published (Q325699) which you can ask for to Microsoft Support, but it's only available for NET english version. This bug consists of an incorrect behaviour of the garbage collector, which removes the instance of the COM objects unsued after a few time. I'll try to solve it manually until Microsoft publish the fix for my spanish version, accessing the object between short periods of times. Thank you again, Edgar __________________________________________ Edgar Berengena Moreno Software Engineer Appeyron Research

          L 1 Reply Last reply
          0
          • L leppie

            EdgarBM wrote: 5 minutes Sounds like remoting :) Well thats the timeout anyways... MyDUMeter: a .NET DUMeter clone

            E Offline
            E Offline
            EdgarBM
            wrote on last edited by
            #5

            Thanks for your interest, Leppie, It's said is a Microsoft bug (Q325699), althought it's not published, so it must be requested directly to Miscrosoft Support. Thank you again, Edgar __________________________________________ Edgar Berengena Moreno Software Engineer Appeyron Research

            1 Reply Last reply
            0
            • E EdgarBM

              Thanks, John, It's said it's a hidden bug almost solved from Microsoft. There's a hotfix still not published (Q325699) which you can ask for to Microsoft Support, but it's only available for NET english version. This bug consists of an incorrect behaviour of the garbage collector, which removes the instance of the COM objects unsued after a few time. I'll try to solve it manually until Microsoft publish the fix for my spanish version, accessing the object between short periods of times. Thank you again, Edgar __________________________________________ Edgar Berengena Moreno Software Engineer Appeyron Research

              L Offline
              L Offline
              leppie
              wrote on last edited by
              #6

              EdgarBM wrote: I'll try to solve it manually until Microsoft publish the fix for my spanish version, accessing the object between short periods of times. Another bug, another 10 things to worry about. Generally I must say that core (as in the SS CLI) .NET framework is pretty much bugfree. MyDUMeter: a .NET DUMeter clone

              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