• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Error for FSReadFork
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error for FSReadFork


  • Subject: Error for FSReadFork
  • From: pallavi khutal <email@hidden>
  • Date: Thu, 26 Jun 2008 09:53:52 +0530 (IST)

Hello All ,
  Using FSReadFork I want to read a text file but while reading that returns error code like --4628 ,-4132,-5380 etc.
Following code I am using for opening and reading file.
FSOpenFork return successfully, but for FSReadFork is unuccessfull.

CFURLRef url;
Boolean flag;
FSRef ref;
OSErr error ,result, Err1;
HFSUniStr255    dataForkName;
SInt16        forkRefNum;
SInt64        forkSize; 
UInt8        *forkData;
ByteCount      actualRead;
CFDataRef      dataRef = 0;
CFPropertyListRef  propertyListRef = 0;
ByteCount *actualCount;
UInt8 * volname = NULL;

volname = "/CFURL.txt";
url = "" UInt8 *)volname,strlen((char*)volname),false);
flag = CFURLGetFSRef((CFURLRef)url , &ref);
result = FSGetDataForkName(&dataForkName);
result = FSOpenFork(&ref, dataForkName.length, dataForkName.unicode, fsRdPerm, &forkRefNum);
if (result == noErr)
 {
       result = FSGetForkSize(forkRefNum, &forkSize);
       if (result != noErr)
       {
         forkData = malloc(forkSize);
         if (forkData != NULL)
         {
           Err1= FSReadFork(forkRefNum,fsFromStart,0, forkSize,&forkData, &actualCount);
         }
          free(forkData);
          FSCloseFork(forkRefNum);
       }
     
       CFRelease(url);
}
    DisposePtr(volname);

 

Please tell me where I making mistake in FSReadFork function call.

 

Thanks,

Pallavi.



Bring your gang together. Do your thing. Find your favourite Yahoo! Group.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Error for FSReadFork
      • From: Marshall Clow <email@hidden>
    • Re: Error for FSReadFork
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: Xcode-users Digest, Vol 5, Issue 396
  • Next by Date: Interface builder plugin
  • Previous by thread: Re: multiple definitions errors
  • Next by thread: Re: Error for FSReadFork
  • Index(es):
    • Date
    • Thread