Path: utzoo!attcan!uunet!maverick.ksu.ksu.edu!kuhub.cc.ukans.edu!markv From: markv@kuhub.cc.ukans.edu Newsgroups: comp.sys.amiga.tech Subject: Re: FileInfoBlock Message-ID: <26622.27392887@kuhub.cc.ukans.edu> Date: 8 Nov 90 14:42:30 GMT References: <15413@cbmvax.commodore.com> Distribution: comp Organization: University of Kansas Academic Computing Services Lines: 27 In article <15413@cbmvax.commodore.com>, ken@cbmvax.commodore.com (Ken Farinsky - CATS) writes: >> struct FileInfoBlock *fib; >> >> lock = Lock("fred", ACCESS_READ); >> Examine(lock, fib); > AACK!! You have to allocate the memory for the file info block. > something like: > if (NULL != (fib = (struct FileInfoBlock *) > AllocMem(sizeof(*fib),MEMF_CLEAR | MEMF_PUBLIC))) >... Or if you have SAS C 5.1 you can say: struct FileInfoBlock _aligned fib; and use &fib. The _aligned is nice because it eliminates the need for lots of otherwise uneeded Alloc/Free code just so you can get longword alignment. Obviously such a variable can't be auto storage class. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark Gooderum Only... \ Good Cheer !!! Academic Computing Services /// \___________________________ University of Kansas /// /| __ _ Bix: markgood \\\ /// /__| |\/| | | _ /_\ makes it Bitnet: MARKV@UKANVAX \/\/ / | | | | |__| / \ possible... Internet: markv@kuhub.cc.ukans.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~