- This topic has 4 replies, 2 voices, and was last updated 4 years, 2 months ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
Home › Forums › kbmMW › No matching handle found. Complain. It must have been garbage collected or a wro
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]))
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
But in the real life the client misses files and my version control system doesn’t work properly.
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
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?