Date: Thu, 28 May 1998 20:03:41 +0300 (IDT) From: Eli Zaretskii To: Anthony Appleyard cc: DJGPP AT delorie DOT com, ralf AT pobox DOT com Subject: Re: A funny in windows 95 In-Reply-To: <200CC431A78@fs2.mt.umist.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 28 May 1998, Anthony Appleyard wrote: > In assembling pathnames it is easy to forget that root level directory names > end in a \, e.g. C:\ , and so to make up a pathname containing two consecutive > \ characters, e.g. C:\\MYFILE.TXT . I have found the hard way that if you call > `AX=0x7160, CX=2 (or 0x8002), int21' to find the longname given the shortname, > if the shortname starts with a drive letter, colon, and TWO \ as above, that > interrupt call takes <> to run even on a very fast new PC, > instead of quickly faulting and exiting. This is most probably because two slashes at the beginning is taken by Windows as a network share (aka UNC), a name that points to another machine. So Windows goes to the network and looks for a machine with a non-existent name, and you wait... To make this problem go away, always use forward slashes, and call DJGPP functions whenever possible. DJGPP library transparently collapses all consecutive slashes to a single slash before calling DOS interrupts, but it only does so for forward slashes. As for function 7160h, you can just call `_truename' from the DJGPP library, it does the same. But you get the above slash-collapsing feature for free, while using it.