home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!sunic!kth.se!byse.nada.kth.se!d88-jwa
- From: d88-jwa@byse.nada.kth.se (Jon W{tte)
- Subject: Re: Beginner's question on StandardPutFile
- In-Reply-To: ewu1@husc8.harvard.edu's message of 1 Sep 92 12:01:59 GMT
- Message-ID: <D88-JWA.92Sep2001056@byse.nada.kth.se>
- Originator: d88-jwa@byse.nada.kth.se
- Sender: usenet@kth.se (Usenet)
- Nntp-Posting-Host: byse.nada.kth.se
- Organization: Royal Institute of Technology, Stockholm, Sweden
- References: <ewu1.715348919@husc8>
- Date: Tue, 1 Sep 1992 23:10:56 GMT
- Lines: 29
-
- @husc8.harvard.edu (Elwin Wu) writes:
-
- I'm having trouble getting the volume reference number returned by the
- StandardPutFile routine. I want to use SetVol and my code typically
- looks something like this (I'm using Think C 5.0):
-
- StandardPutFile(prompt,defaultName,&theReply);
- SetVol(theReply.sfFile.vRefNum);
-
- Should I use something other that SetVol??? Any help would be
- appreciated. Thanks
-
-
- Why on EARTH would you do this?
-
- You're on System 7, since you use StandardPutFile, and there is
- not a single thing under System 7 that requires a volume or wdRefNum.
-
- Use the FSpCalls; they're there for you and the FSSpec returned
- in theReply is all you need. (If you want to do a SetVol to open
- a file using fopen:
- 1) Don't use fopen since it stinks on the mac... or
- 2) Do a HGetVol, HSetVol, fopen, and HSetVol back to what you
- got from HGetVol)
-
- --
- Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069
- White, Literate, Employed, Higher-Educated, Male, Straight and Not Poor.
- I must be a bad guy.
-