home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!uakari.primate.wisc.edu!usenet.coe.montana.edu!nntp.uoregon.edu!eric_gorr@coglab_psych.uoregon.edu
- From: eric_gorr@coglab_psych.uoregon.edu (Eric Gorr)
- Newsgroups: comp.sys.mac.programmer
- Subject: Code not converting vRefNum & DirID to just vRefNum correctly
- Message-ID: <1992Aug28.191236.10477@nntp.uoregon.edu>
- Date: 28 Aug 92 19:12:36 GMT
- Sender: news@nntp.uoregon.edu
- Distribution: usa
- Organization: University of Oregon Network Services
- Lines: 37
-
-
- Everything appears to work properly up to and including the FSMakeFSSpec
- call.
-
- I am certain that myPictSpec.vRefNum and myPictSpec.parID contain the
- correct values.
-
- What I think is happening is that I am not initializing myPictBlock
- correctly.
-
- The value in myPictBlock->ioVRefNum after the PBOpenWB call is -32xxx and
- when I use this number to specify a directory, it chooses the System Folder
- on my start up disk - this is incorrect.
-
- Any ideas? I am sure that it is something fairly obvious...
-
- I am using THINK C 5.0.
-
-
- thanx...
-
- myErr = AEGetParamPtr( theAppleEvent, ribPathKey, typeChar, &ignoredType,
- pathPtr, maxSize, &theSize );
- pathPtr[theSize] = '\0';
- strcpy( thePath, (char*)pathPtr );
- strcat( thePath, (char*)"tmp.tmp" );
- CtoPstr( thePath );
- myErr = FSMakeFSSpec( 0L, 0L, thePath, &myPictSpec );
- myPictBlock->ioCompletion = 0L;
- myPictBlock->ioNamePtr = 0L;
- myPictBlock->ioVRefNum = myPictSpec.vRefNum;
- myPictBlock->ioWDProcID = 0;
- myPictBlock->ioWDDirID = myPictSpec.parID;
- myErr = PBOpenWD( myPictBlock, false );
- strcpy( (char*)theHead.pictureName.fName, (char*)theHead.picName );
- theHead.pictureName.vRefNum = myPictBlock->ioVRefNum;
- myErr = PBCloseWD( myPictBlock, false );
-