Hey Allen,
I am working on a hot-reload shader system, were a shader is reloaded whenever a file change is detected. I am keeping a handle to the file open with full sharing for the duration of my app's lifecycle.
| CreateFileA(FilePath, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, OPEN_EXISTING, 0, 0);
|
With the file in this state, I cannot open the file in 4coder. I can open/modify it in Notepad++ and Atom just fine. 4coder doesn't crash or report to *messages* buffer, just nothing happens.
Tested with 4coder-alpha-4-0-21-super-win-x64 no custom layer.
If I have the file already open in 4coder, then launch my app, I get a valid handle, but updates from 4coder aren't actually applied to the file? Not really sure whats going on. By the way, I am checking for updates by seeing if the "last edit time" has changed.
Just wondering if this is something you think is solvable on your end, you have more experience with file IO than I. If not I can try some other solution like opening/closing a shared read handle every frame (previous working solution), or something more fancy like FindFirstChangeNotification. I'd just like to be able to leave the handle open so I don't have to bandy the file path throughout my codebase.