If I open a file using the following code:
FILE *file = fopen("D:\\1.mp4", "rb");
This will not lock the file, so for example I can open this file using Notepad and write to it!
So is there a way I can make sure that no other application is allowed to write to this file, or should I use WinAPI to accomplish this?