file-iofopenlibccreatefilekernel32

Does fopen call CreateFile on Windows?


From what I know CreateFile is found in kernel32.dll, and fopen is found in libc. Assuming for this question they are both being used for file operations, does fopen call CreateFile on Windows or is it its own standalone file io function with its own code?


Solution

  • fopen() calls CreateFile(). I debugged into fopen before and ended up in CreateFile. Unless something changed (which I doubt).. it would still be that way.

    I also found this on osr: https://community.osr.com/discussion/119538