Apollyon said:
I'm trying to figure out if there's a function that takes a file pointer
(FILE *) and will return a HANDLE type ... I'm trying to modify
some code and I've looked everywhere to no avail.
On older implementations you often have low-level, unbuffered IO and
functions like open(), read(), and write().
These are not ANSI, are not supported on all platforms, and are virtually
obsolete on a modern hosted system, because it is no longer possible to get
significant performance increases by messing with the buffering.
If you mix the fopen() family of functions with another IO family then you
risk having problems, such as the stdio functions buffering input so it gets
written in the wrong order.
However if you are determined, there will probably be a function that gets a
"handle" from a FILE *. If not, look at the structure members and one of
them will probably be what you are looking for. However you are now leaving
ANSI C land.