Transact
Transact_ReleaseFile
(SWI &4FC0B)
Usually after a RISC OS data file has been opened by the Transact engine, it stays open until the module is killed someway. That means that if you double click on the file icon in the Filer window, all you get is a message saying " is currently open". However, on some occasions, it might be useful to let other applications (espacially those not designed to interface with the Transact module) to apply their own changes to the data file. That is the "raison d'être" of this SWI.
There are some prerequisites and side effects of using this SWI that the programmer should be aware of:
- Apart from the session initiating this SWI, no other session shoud have an active transaction on the data object to release; otherwise, an error "Conflict with another session" is returned.
- This SWI implicitly rollbacks an active transaction in name of the initiating session so the client application programmer should ensure that pending writes are either validated or rollbacked before issuing this SWI.
On entry
- R0 = External session ID as returned by
Transact_CreateSession
;
- R1 = Data file's external ID (
NULL
or pointer to the pathname of the file);
- R2 = Pointer to internal ID for the file to be accessed.
On exit
Possible errors
- &812B00 Busy (not yet implemented in this release)
- &812B01 Unknown session
- &812B07 Conflict with another session which already has an active transaction on the file to release