|
|
#1 |
|
error for FSOpenFork
Hello All,
In Xcode Carbon C bundel application I want to open a file and read data from it, but at runtime I am not able to make FSRef from file path. Following code I am using please tell me what changed are required in this code. CFURLRef url ; Boolean flag; FSRef ref , ref2 ; OSErr error ,result; char *volname = NULL; char revpath[PATH_MAX]; HFSUniStr255 dataForkName; SInt16 forkRefNum; volumeNameForPath("/", &volname);//user defined function to get default volume name strcat(volname,":CFURL.txt");//now volname = "Macintosh HD:CFURL.txt" and strlen((char*)volname = 22 url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,volname,strlen((char*)volname),false); flag = CFURLGetFSRef((CFURLRef)url , &ref);//true if success else false //flag returned is 0 it should be 1 or error = FSPathMakeRef(volname,&ref2,false); result = FSGetDataForkName(&dataForkName); if (result != noErr) { syslog(LOG_INFO, "FSGetDataForkName() returned %d", result); return; } result = FSOpenFork(&ref, dataForkName.length, dataForkName.unicode, fsRdPerm, &forkRefNum);//result returned is -35. Thanks & Regards, Pallavi. |
|
|
|
0
|
|
|
#2 | |
|
Quote:
|
||
|
|
0
|
|
|
#3 |
|
now error for FSReadFork
Hello gnasher729,
Now I am using posix file path , but for reading file every time new error code is returned like -4628 ,-4132,-5380 etc. ByteCount requestCount; void *buffer; ByteCount *actualCount; result = FSOpenFork(&ref, dataForkName.length, dataForkName.unicode, fsRdPerm, &forkRefNum);// returns noErr if(result == noErr) { buffer = malloc(1024); requestCount = 128; Err1= FSReadFork(forkRefNum,fsFromStart,0, requestCount,&buffer, &actualCount);//program get hanged } Last edited by pallavi0703; Jun 25, 2008 at 04:24 AM. |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| iPhone unknown error (-200) | horace528 | Mac Applications and Mac App Store | 0 | Oct 10, 2011 10:14 AM |
| Time Machine - Error 22 Randomly Appears | VaatiKaiba | OS X | 1 | Aug 29, 2011 01:45 PM |
| Resolved: iTunes error 3194 when restoring | sclomps | Jailbreaks and iOS Hacks | 1 | Mar 31, 2011 06:30 PM |
| For those of you who get quickpwn error for JB 2.1...ANSWER! | rotobadger | Jailbreaks and iOS Hacks | 1 | Oct 21, 2008 10:05 PM |
| I keep getting and error for ijailbreak? help please | I-V-A-N-qws | Jailbreaks and iOS Hacks | 1 | Feb 15, 2008 11:29 AM |
All times are GMT -5. The time now is 01:19 AM.







Linear Mode

