I could use some help working through a problem I encountered while following along with Day 25. My CreateFileA returns error 32 which means "The process cannot access the file because it is being used by another process.". Does anyone know what could be making it this way?
Do you have this file present on disk? If yes, can you trey opening it in some hexeditor and see it succeeds? What if you open it as read-only vs read-write?
Does this error happen every time you call loop editing code, or maybe it succeeds first time and fails later (which would indicate you are not closing file properly).
Is the path really with \\ characters, or you are showing simply escaped \ character?
Wait, how can this error happen on first call to CreateFile and file already exists? Who creates file if first call to create fails?
Try opening file with different hexeditor who can open the file. I want to see if other programs can open this hmi file. Other than that I have no idea what is wrong.
Using \\ is wrong, that shouldn't work, it should be just \. Of course looking in the debugger it should show \\ which is escaped \ character, which is fine.