Forum Navigation
You need to log in to create posts and topics.

Re: [FB} volume reference discussion- revisited

Posted by: GBeckman <GBeckman@...>

Well, I certainly cannot complain about not getting help. I have had several
lengthy efforts to solve my vRefNum problems. Thank you.

Below you will see how I am trying without success to use:

% _SFSaveDisk,-myFSSpec.fsVrefNum%
& _CurDirStore, myFSSpec.fsParID&

I keep returning to wishing I had the gOpenVol used byt OPEN as I would feel
better about using an alias resolution to open the file if I had used the PG
FileExists(name$,fVol) before trying to open a file that may exist in another
zone. I could also then use Andy's SetVol routine for _SFSaveDisk and
_CurDirStore.

Here is my code. I am missing something here, because it does not work.

CLEAR LOCAL
DIM osErr
DIM useAlias
DIM RECORD fsSpec
DIM fsVrefNum%
DIM fsParID&
DIM 63 fsName$
DIM END RECORD .fsSpec
DIM myFSSpec.fsSpec

LOCAL FN SeeAboutAQuickOpen

osErr=FN useAlias(1003,myFSSpec)
LONG IF osErr=0
PARENTID=myFSSpec.fsParID&
CLS' something I need to do in my program
gOpenVol=myFSSpec.fsVrefNum%
gSaveName$=myFSSpec.fsName$
FN MyOpen
'(in MyOpen I am using:
'OPEN "I", #1, gSaveName$, recLen, gOpenVol%
'and the files opens. That is a good thing)
' I have tried ParentID=0 several places and can't see that it changes
anything
'now comes the tricky part: Setting the next GetFile

% _SFSaveDisk,-myFSSpec.fsVrefNum%
& _CurDirStore, myFSSpec.fsParID&

'now I test the theory- this line won't actually be in the final code

FN pGopenFile

'At this point I am not where my alias file resides but rather where ever the
last 'GetFile dialog put me.
'======== cut the rest of the function out to save space

I have learned a great deal.
1) If you read Inside Macintosh Files enough, you know what they are talking
about about 80% of the time.
2) When working on this problem, don't be fooled by system 7.5's ability to
"Use the last folder used by the application". You will think you have
succeeded. You must use an open, and go to another folder...in my case
another drive. Then try the alias resolution again.

I Tried FB's FN GETVOL and was not able to get it to work for me.
I have greedily read IM Files about tool box FN GetVInfo. I just don't have
the assembly smarts to create a new Toolbox.
Inside Mac says if I pass FN GetVInfo the drive number I could get the
VolRefNum. Is that true? and is this volRefNum the one I want? Is the
negative fRefNum resolved by the alias anything like this? The shared vol I
am attempting to use is currently coming up fRefNum of -4. I figure I have 2
HDs, 1 CD, 1 Floppy and starting at zero that makes the network vol #4.

Thanks in advance,

GB