Heather- I thought of a question regarding this procedure. Rather than to replace the TBAlias of SetEOF in the toolbox standard.incl file, could I not leave the existing SetEOF alias where it is, and then make a new alias called "HighLevelSetEOF" or something and thereby eliminate the errors from all the times where the runtime calls SetEOF? Thanks, Paul Heather Donahue wrote: > > At 3:38 PM -0500 on 12/28/00, Paul Bruneau wrote: > > > FUNCTION SetEOF (refNum: Integer; logEOF: LongInt): OSErr; > > >But the FB help system says this: > > > >osErr% = FN SETEOF (pbPtr&) > > > >I would greatly prefer to do it like Inside Mac says, just by passing > >the file reference number and a long integer to specify the EOF, rather > >than dealing with a nasty parameter block as FB appears to want me to > >do. Does anyone know how to do this correctly? > > The FB SetEOF is a TBAlias for PBSetEOFSync which is a low-level > function. The one you want is a high-level function. > > If you really want to use the high-level one, you'll have to do what I do. > > Create a copy of the ToolBox Standard.Incl file and place it with > your project file. FB will then use it before the other copy. Then > find and comment out the TBAlias SetEOF in the ToolBox file. Then > add the Toolbox function for SetEOF to the Standard.Incl file. > > Now the runtime will give you plenty of errors for runtime functions > that use SetEOF where they should use PBSetEOFSync. You'll have to > replace all the SetEOF references in the runtime files to > PBSetEOFSync. You'll probably want to make copies of all these files > as well. > > Now you see why I don't like TBAlias. I find it's always getting in > my way and very hard to work around. Then I have to include my > header files with anything I distribute. > > A few problems though should be mentioned. The high-level Toolbox > functions don't have any inline 68k so they aren't backward > compatible. They may also not be available to earlier versions of > MacOS. They can't be called at interrupt time or in a deferred task. > You'll want PBSetEOFAsync for that. ( That last one was discussed on > comp.sys.mac.programmer.help just recently ) > > Heather > > -- > To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>