Paul said:
"Tor Rustad" <
[email protected]> wrote in message
Well I didn't know that until you told me just now.
Any other way will cause your CRT to be dependant on another library in
the system, not the way I think that you want it.
Well, not the way I'm doing it. I'm using the published
interface, which means I have coded CreateFile() in my
implementation of fopen(), which means I am polluting
the namespace.
By 'coded' you do mean calling CreateFile() defined in kernel32.dll,
don't you. If so that won't pollute the namespace more than other C
libraries will do.
You're missing the fact that I thought it was a good idea to
use the OS's published interface, at least for Win32 and
OS/2.
That's how it ought to be done. You're not polluting the namespace, the
OS is, and that's a restriction we've got to live with.
And
now I am looking into Unix and wondering what I should
use as the "official interface".
The system call interface exported by the kernel. For the case of Linux
under x86, it's through INT 0x80. Consult the kernel's source and
documentation for details.