Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!brunix!phg From: phg@cs.brown.edu (Peter H. Golde) Newsgroups: comp.os.os2 Subject: Re: DosFindFirst with HPFS names ? Message-ID: <35813@brunix.UUCP> Date: 10 Apr 90 03:08:56 GMT References: <90098.181854ARMENGAU@FRECP12.BITNET> Sender: news@brunix.UUCP Reply-To: phg@cs.brown.edu (Peter H. Golde) Organization: Brown University Department of Computer Science Lines: 21 In article <90098.181854ARMENGAU@FRECP12.BITNET> ARMENGAU@FRECP12.BITNET (Joel Armengaud) writes: >How can I get the long file names on an HPFS partition ? >When I use DosFindFirst, increasing the FILEFINDBUF structure, it doesn't >work... Do I have to put a non-zero value in the last argument, >documented as "Reserved" ? You have to set a special NEWFILES bit in the .EXE to gain access to the long file names. This can be done at link time with the word NEWFILES after the name of the file and app types in the NAME statement. Or you can modify it after the fact; Microsoft C 6.0 had an EXEMOD utility to do it, and the 1.2 toolkit probably has a way to do it as well, though I don't know for sure. Should be real easy to cobble one together yourself, too. This seems like a stupid way to do it, but I guess it was done so that stupid 1.1 programs which do DosFindFirsts won't crash when run on an HPFS system. Pity we have to put up with goofiness like this, but better than killing old programs (even if they were written wrong). --Peter Golde