AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
R0 = 0 : Load into heap block
R1 = pointer to DataSave or DataLoad message block
R2 = block pointer of block to receive file, or 0 to create new block
R3 = offset in block to place file
R0 = 1 : Load into fixed block
R1 = pointer to DataSave or DataLoad message block
R2 = pointer to block to receive file
R3 = length of block

Use this SWI to load files from the filer or other applications. If R0=0 then
the file is loaded into a WimpExt_Heap block, and can be any length, memory
permitting. If R0=1 then the file is loaded into a fixed area of memory, and
will not be loaded if it exceeds the length of the area. When you receive the
DataSave or DataLoad message, pass the block onto WimpExt_DataLoad, and the
transfer will be handled automatically. As long as this SWI doesn't return an
error, when the transfer has finished, WimpExtension will send you a message,
number &45784, with the word at R1+20 having the following meaning:
0 = file not loaded. Error block at R1+28
1 = file transferred successfully from another task
2 = file loaded successfully from disc
A pointer to the block's anchor is at R1+24, if it was loaded into a heap
block. Otherwise a pointer to the area is at R1+24. If R1+20<>0 then the rest
of the block contains:
R1+28 = length of file
R1+32 = load address of file
R1+36 = exec address of file
R1+40 = filename (leafname if transferred from task)
Obviously you need to have initialised a heap to use this SWI. Note that
WimpExtension won't free the block if there's an error; your error handler
must do this if appropriate. The load and exec addresses don't indicate the
date if the file was transferred from another task (the relevant bits will
all be zero).

[sh-index] Back to list of manuals