Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>randbwr() random block write</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 randbwr()               Random Block Write

 #include   <dos.h>

 int         randbwr(fcbptr,reccnt);
 struct fcb  *fcbptr;                    Pointer to structure
 int         reccnt;                     Number of records to be written

    randbwr() uses DOS system call 0x28 to write 'reccnt' number of
    records using the open FCB pointed to by 'fcbptr'.  The records are
    written into memory at the current disk transfer address and are
    written from the disk record indicated in the 'random record' field
    of the FCB. If 'reccnt' is 0, the file is truncated to the value in
    the 'random record' field. Because the 'random record' field is
    advanced by the number of records written, it gives the total number
    of records actually written.

       Returns:     The following values, depending on the result of the
                    read operation:

                    0    All records written
                    1    Not enough disk space to write the records.  No
                         records are written.
                    2    Writing all records would wrap around
                         address 0xFFFF (as many records as possible
                         were written)

   Portability:     MS-DOS only.


See Also: randbrd()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson