|
From: Peter M. <Pet...@mi...> - 2004-10-28 17:34:52
|
Hi James, Yes you are right the function call is... ResolveAliasFile(&theFSSpec,=20= true, &targetIsFolder, &wasAliased); I had copied the wrong call. But luckily this did force me to look in developer.apple.com for this=20 function. They have list the call as =A0=A0=A0=A0=A0=A0=A0Not = recommended I also noticed that there is a call the=20 FSResolveAliasFilewithMountFlags. Now I do not really know what is best but should we change the call to=20= be more like this; static void e3mac_load_plugins(const FSSpec *fileInDirToScan) { Boolean targetIsFolder; Boolean wasAliased; FSSpec theFSSpec; FSRef theFSRef; TQ3Int16 theIndex; OSErr theErr; CInfoPBRec thePB; // Iterate through the directory, looking for plug-ins theIndex =3D 1; do { // Get the next file thePB.dirInfo.ioFDirIndex =3D theIndex; thePB.dirInfo.ioVRefNum =3D fileInDirToScan->vRefNum; thePB.dirInfo.ioDrDirID =3D fileInDirToScan->parID; thePB.dirInfo.ioNamePtr =3D theFSSpec.name; =09 theErr =3D PBGetCatInfoSync(&thePB); if (theErr =3D=3D noErr) { // Grab the file theErr =3D = FSMakeFSSpec(fileInDirToScan->vRefNum,=20 fileInDirToScan->parID, theFSSpec.name, &theFSSpec); if (theErr =3D=3D noErr) { // Grab the file's FSRef theErr =3D FSpMakeFSRef(&theFSSpec, = &theFSRef); if (theErr =3D=3D noErr) { // Resolve any aliases targetIsFolder =3D true; theErr =3D = FSResolveAliasFileWithMountFlags ( &theFSRef, = true, = &targetIsFolder, = &wasAliased, = kResolveAliasFileNoUI ) = ; =09 // If this isn't a directory, = check the type if (!targetIsFolder) { if (theErr =3D=3D noErr) { // If this is a = plug-in, load it if = (thePB.hFileInfo.ioFlFndrInfo.fdType =3D=3D=20 kQ3XExtensionMacFileType && = thePB.hFileInfo.ioFlFndrInfo.fdCreator =3D=3D=20 kQ3XExtensionMacCreatorType) = e3mac_load_plugin(&theFSSpec); } } } } // Clear any error - don't stop if we hit an = error at this point theErr =3D noErr; } =09 theIndex++; } while (theErr =3D=3D noErr); } I will have to test this tomorrow as my tester has gone home for the=20 day but it seems to run on my machine. Peter Michelsen On 28 Oct 2004, at 17:11, James W. Walker wrote: > > On Oct 28, 2004, at 8:04 AM, Peter Michelsen wrote: > >> >>>> theErr =3D GetProcessBundleLocation( &thePSN, &bundleFSRef ); >> >> This line above returns a link to where the application is stored=20 >> e.g. " /private/Network/Servers/jupiter/Users/jbatt/Desktop/3D\=20 >> World.d.app " Later the function " e3mac_load_plugins( &fileSpec[i]=20= >> ); " is called which calls " theErr =3D ResolveAlias(NULL, gQuesaLib,=20= >> &fileSpec[ dirCount ], &wasChanged); " This fails causing Quesa to=20 >> assert. > > The only ResolveAlias call in E3MacSystem.c is in=20 > E3MacSystem_LoadPlugins. I think you must mean the ResolveAliasFile=20= > call in e3mac_load_plugins. But we don't even check for an error code=20= > from that, so I don't see how it can cause Quesa to assert. > -- > <http://www.jwwalker.com/> > > > > ------------------------------------------------------- > This Newsletter Sponsored by: Macrovision For reliable Linux=20 > application installations, use the industry's leading > setup authoring tool, InstallShield X. Learn more and evaluate today.=20= > http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/ > _______________________________________________ > Quesa-develop mailing list > Que...@li... > https://lists.sourceforge.net/lists/listinfo/quesa-develop > |