Path: utzoo!attcan!uunet!microsoft!mikemo From: mikemo@microsoft.UUCP (Mike Morearty) Newsgroups: comp.os.os2.misc Subject: Re: Using fopen with HPFS Message-ID: <56142@microsoft.UUCP> Date: 29 Jul 90 01:29:22 GMT References: <1990Jul25.210712.14454@csc.ti.com> Reply-To: mikemo@microsoft.UUCP (Mike Morearty) Organization: Microsoft Corp., Redmond WA Lines: 28 In article <1990Jul25.210712.14454@csc.ti.com> NEATH@cgi.com writes: > I am unable to get >fopen() to work if the character string argument specifies a filename >that is not of the 8.3 variety, ie. a *new* longer but valid HPFS filename. >I am using MSC 6.0 and associated utilities. Is there a new/different C >runtime library needed for file I/O under HPFS? Programs that can use the abilities of HPFS filesystems (mixed case, long names, extended attributes, etc.) must be explicitly marked as such. If the executable does not have the NEWFILES bit of the exe header set, OS/2 will not allow the program to access files that have filenames other than 8.3. (The reason for this is backwards compatibility, so that old programs don't become confused when run on an HPFS drive.) Since you want your program to support HPFS filenames, you must put the following line in the .DEF file used to compile the program (if it doesn't have one, you must create one): NEWFILES Or alternatively, after the link has finished, run the EXEHDR program on your file to set the NEWFILES bit: exehdr /newfiles foo.exe -- mikemo@microsoft