Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!van-bc!ubc-cs!alberta!ccu!umcharl3 From: umcharl3@ccu.umanitoba.ca (Mike Charlton) Newsgroups: comp.sys.mac.programmer Subject: Opening files from XCMDs Message-ID: <1990May31.205608.6768@ccu.umanitoba.ca> Date: 31 May 90 20:56:08 GMT Distribution: comp Organization: University of Manitoba, Winnipeg, Canada Lines: 18 Hi there. As a relative newcomer to programming on the Mac (although I have lots of experience on other machines), I would really appreciate some help from someone knowledgable in the area of the File Manager. My problem is that I am writing an XCMD (in Think C 4.0) that needs to read in a text file. Because (as far as I can tell) you can't use virtually any of the ANSI library routines in a code resource, I am forced to use the Mac I/O calls with which I am very unfamiliar. I do an FSOpen() to open my file, which works perfectly in a standalone application, but it gives me a file error when I compile it as an XCMD. Anybody have any idea what the problem could be? (sorry to be so vague, but I just started reading the Inside Macintosh books 2 days ago...). On a similar note, I am a little confused by the way you specify file paths on the Mac. As far as I can tell, you have a volume name and a file name, but you don't have to specify in which directory on the volume the file is. Is this a correct assumption? thanks for any help, Mike