Since years I am facing the problem that during backup Windows reports that a file is locked.
Most often it occurs with Visual Studio files.
It causes an error that I need to inspect to see if it is serious or not.
Also I often use an app named LockHunter, but I don't like using closed source software.
While I was searching information on how to implement my own "LockHunter" and also to be able to copy a locked file, I found a code on a website that seems to provide some information about how to do that and even provided some VB6 source code for a start. Using archive.org, I was able to get the accompanying VB6 files.
I tried to enhance it with comments and to implement a functionality that would allow to copy a locked file.
However, I experience a crash, and my knowledge about this is still too limited to see what exactely I am doing wrong.
Well using runtime dependent functions and non-typelib API calls in multithreading is pretty much guaranteed to crash, for starters. Need something like The trick's modMultithreading2.bas ..Not even sure why you'd start a new thread there then just wait on it.