Opening 3ds files in Mac OSX, using CFM

OK. I’ve been doing this for 6 hours a day for the last couple days. It’s beyond ridicolous. I have a Carbon CFM application, and am using some source code from apple and a website. I put them together, and they should work but done. I finally figured out what the problem was, but for some reason I can’t fix it.

Basically, the file manager just doesn’t work. I can’t use fopen, because the file is not found. I can’t use HOpenDF, because the file isn’t found. The file is in the same directory as the application. I’ve even used a function made by apple themselves to get the application directory, and set the application directory. Still doesn’t work. I opened up an old project from OS9, tried opening a file, and it worked perfectly fine. What is going wrong here?

Here’s just one example of my code not working:
JString PicName=“Picture 1”;
short vrefnum;
long dataLength;
PicHandle thePicture;

PicName=PicName;
PicName.PStr(fileName);
theErr=GetApplicationDirectory(&vrefnum,&dirID);
theErr=HOpenDF(vrefnum,dirID,fileName,fsRdPerm,&refnum);

theErr is -43. fnF, file not found.

This is a question for Apple’s Carbon mailing list, not a question for the OpenGL boards. I doubt very much you’ll get a reply here.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.