No matching handle found. Complain. It must have been garbage collected or a wro

Home Forums kbmMW No matching handle found. Complain. It must have been garbage collected or a wro

Viewing 3 reply threads
  • Author
    Posts
    • #56024
      VadimMest
      Participant

      Dear Kim

      I think this exception needs to be commented out. If the handle was deleted let it creates new one. You’ve put a right comment before this line

      function TkbmMWFilePool.Access
      …….
      if AHandle=INVALID_HANDLE_VALUE then
      // No matching handle found. Complain. It must have been garbage collected or a wrong token given.
      // kbmMWRaiseException(KBMMW_ERR_FILEPOOL_ACCESSDENIED,Format(‘Access denied. %s’,[AFilePath]))

    • #56042
      kimbomadsen
      Keymaster

      The problem here is that the token could also be wrong. Not throwing an exception, and just producing a new handle for the token, would potentially allow someone else to hijack access to the file under false pretense.

      Kim/C4D

      • This reply was modified 4 years, 2 months ago by kimbomadsen.
    • #56070
      VadimMest
      Participant

      But in the real life the client misses files and my version control system doesn’t work properly.

      • #56111
        kimbomadsen
        Keymaster

        Hi,
        I just wonder why the client would end up using a timed out token?
        If the client is doing something with it regularly (which it ought to do while handling the file), it should not time out and be garbage collected.
        /Kim

    • #56113
      VadimMest
      Participant

      The version control system needs to refresh handles for new versions of files.

      The operator runs the program (a client for version control). This program checks new files on the version control system (main application exe, the FastReport templates), downloads them on the client’s computer and runs the main application. I need to refresh files on the cache for a new one.

      I agree with the time out garbage collection isn’t convenient for renewing a cache of handles but how can I renew it?

       

Viewing 3 reply threads
  • You must be logged in to reply to this topic.