I have problems with this part of code :
err = FindFolder(kOnSystemDisk, kSystemPreferencesFolderType, kDontCreateFolder, &foundVRefNum, &foundDirID);
if (err != noErr) {
printf("\nError while finding preference folder");
return;
}
err = FSMakeFSSpec(foundVRefNum, foundDirID, "\p", &preferenceFolder);
if (err!=noErr) {
printf("\nError while making a FSSpec");
return ;
}
This is a problem at execution.
Every time the FSMakeFSSpec is called, it return an error. The error says that the folder does not exist. It's stange because it is the system which give me the references...
Do you have some examples?