From: | Nick Lamburn |
Date: | 12 Jul 2000 at 16:48:40 |
Subject: | ExamineFH() Problems |
Hello
I am currently writing a routine to read a file (currently fixed to
s:shell-startup just for testing purposes) and get its size so that I can
allocate a buffer to hold this text in.
Now, I understand you have to use ExamineFH() from the dos.library; and
indeed it works - except that when i click on to my program's window or
anywhere else for that matter - the computer completely freezes up requiring
a reboot.
I understand that the FileInfoBlock structure has to be longword aligned and
I think this is where my problem lies; however - i don't know how to do
this, as using say: file_info=1L<<file_info does not work in SAS/C 6.57 :)
It probably wouldn't work anyway since i'm not totally 'au fait' with bit
shifting and such like.
I have *attached* the code segment.
It is becoming very aggrevating because I have to know the file's size so
that the correct amount of memory is allocated.
Thanks in advance.
All the best,
Nick.