Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!dlyons From: dlyons@Apple.COM (David A. Lyons) Newsgroups: comp.sys.apple2 Subject: Re: ProDOS files under ORCA/C Keywords: prodos Message-ID: <42398@apple.Apple.COM> Date: 27 Jun 90 06:44:53 GMT References: <348@ankh.ftl.fl.us> Organization: Apple Computer Inc, Cupertino, CA Lines: 38 In article <348@ankh.ftl.fl.us> chin@ankh.ftl.fl.us (Albert Chin) writes: >I am trying to do a GET_FILE_INFO using the header and I >am having problems. Here is what I do: > > ... > FileRec fileinfo; > ... > strcpy(fileinfo.pathname,"/myfile"); > GET_FILE_INFO(&fileinfo); > printf("%u %u\n",fileinfo.fAccess,fileinfo.fileType); > ... Assuming you have not assigned a value to the pathname field of fileinfo, your strcpy is wrong, because it's using a random value as the target address for the copy. If your have a hard-coded pathname, try: fileinfo.pathname = "\p*/system/desk.accs/my.desk.acc"; for example (the \p makes it a Pascal string, meaning that the first byte is a length count). If your string isn't hard-coded, then do something like: char myString[256]; ... fileinfo.pathname = myString; Copy your real string into myString at your convenience. -- David A. Lyons, Apple Computer, Inc. | DAL Systems Apple II Developer Technical Support | P.O. Box 875 America Online: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.