delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/11/07/17:45:26

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Mon, 08 Nov 2004 00:39:18 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-ID: <01c4c51a$Blat.v2.2.2$c3201de0@zahav.net.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2
In-reply-to: <VGwjd.733$127.100@newsfe2-gui.ntli.net> (My.address@end.of.post)
Subject: Re: Getting long file names from the 8.3 name passed from Windows
References: <VGwjd.733$127 DOT 100 AT newsfe2-gui DOT ntli DOT net>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Mike C" <My DOT address AT end DOT of DOT post>
> Date: Sun, 07 Nov 2004 21:44:21 GMT
> 
> I trawled Ralf Brown's list of interrupts today, but I didn't see anything
> too hopeful. I had expected to see an interrupt to return the long filename,
> given the file handle

Not given the handle, but given the short 8+3 alias.

Here's the relevant excerpt from the file INTERRUP.H:

--------D-217160CL02-------------------------
INT 21 - Windows95 - LONG FILENAME - GET CANONICAL LONG FILENAME OR PATH
	AX = 7160h
	CL = 02h
	CH = SUBST expansion flag
	    00h return a path containing true path for a SUBSTed drive letter
	    80h return a path containing the SUBSTed drive letter
	DS:SI -> ASCIZ short filename or path
	ES:DI -> 261-byte buffer for canonicalized long name
Return: CF set on error
	    AX = error code
		02h invalid component in directory path or drive letter only
		03h malformed path or invalid drive letter
	    ES:DI buffer unchanged
	CF clear if successful
	    ES:DI buffer filled with qualified long name (can contain
		  lowercase letters)
Desc:	determine the canonical name of the specified filename or path,
	  corresponding to the undocumented TRUENAME command in COMMAND.COM
BUGS:	even though the maximum length of a complete long pathname is 260
	  characters, Windows95 returns CF set/AX=0003h even if the file
	  exists whenever the full pathname is more than 255 characters
	Windows95 incorrectly treats filenames where the first two characters
	  after the drive letter and colon are both slashes (either forward
	  or backward) as a UNC (network name) and requires several seconds
	  to attempt to resolve the name before returning an unchanged
	  string
SeeAlso: AH=60h,AX=7160h/CL=00h,AX=7160h/CL=01h

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019