Mail Archives: djgpp/1996/01/24/02:01:00
On Tue, 23 Jan 1996, A.Appleyard wrote:
> In connection with how a Gnu C/C++ program can find about drives, the
> interrupt `AH=0x60, Int 21h' (Truename) was mentioned. It (like the DOS
> command TRUENAME), converts names of net files into a form starting with \\,
> e.g.:-
>
> C:\AM>x:
> X:\MCCSOFT\UTIL>truename vet.com
> \\UMIST-MT-FS2\SYS\MCCSOFT\UTIL\VET.COM
>
> but trying to use such a filename fails, e.g.:-
>
> C:\AM>edit \\UMIST-MT-FS2\SYS\MCCSOFT\UTIL\VET.COM
> Path/File access error
>
> When and where are those \\... net filenames used? What are they for?
They are meant to be used to distinguish between files and say something
about what they really are, because truename() isn't fooled by various
network redirectors and DOS programs which patch the DOS filesystem
tables. For example, the DOS command JOIN can make drive b: look like
directory on drive c:, but truename() will tell you the truth.
Some programs accept such pathnames, but DJGPP C library doesn't know
about them. However, the output of truename() is NOT meant to be used
as input to DOS functions for file operations like open, findfirst etc.,
so it shouldn't be a problem.
- Raw text -