Why does fopen_s have the paramater FILE **_File rather then the FILE *_File that fopen has?

Standard fopen returns the FILE pointer, but fopen_s instead returns an error code. Thus, an output parameter in the form of a pointer to a pointer to FILE is used to "return" a handle to the opened file.

And what is the difference between those two functions?

My usual response to such a question is that fopen is standard and portable while fopen_s is not. Especially in the case of fopen_s, there's not much benefit because the only real change is fopen_s checks the file name and mode parameters for NULL. Personally, I'm not convinced that the "safe" library Microsoft is determined to bully us into (by way of deprecation warnings) is worth it.

Why does it need to have a FILE ** instead of a FILE *? It works the same way, you just have to put & infront of your FILE *, I don't understand. If I could see the source code of fopen_s it would be easier.