I am writing a task to run under Risc OS 3.1 (or later) which uses Wimp_TransferBlock to send data to another task.

So good, so far. However, a problem I have is that the sending task does not know (at the time of the transfer) that the receiving task is actually still running and if it is not an error is generated.

Is there any way in which the sending task can ascertain that the receiving task handle is still valid? (I can not see anything in my PRMs)

I think that you need to set up a flag from the receiving task - that can be checked from the transmiting task.

A simple way I have done it in the past (assuming both tasks are proper WIMP apps). Once the receiving task starts up (in it's init routine) I set a variable, for example:

*SET Task$Running TRUE

When this task quits (either through user selection or via an error) the variable is UNSET

Your transmitting task can check this variable to see if the receiver is running.

That's a fairly simple way of doing it...

A much more elegant approach would be for the trasnmitting task to check through the current list of running tasks to ensure that the receiving task is running. Or you could just error trap the transmission routines