How best to implement a cross-app data buffer
Simon Ayers (1525) 15 posts |
Hi all, Quick question… I want to try and have some sort of producer-consumer arrangement between two separate apps and I don’t know if there is a best practice for this. The simplest solution I can see would be to write a module that allocates some buffer in the RMA and then uses SWIs to write to and read from that buffer (as a fifo), but I feel like this should be something quite common and there must be a better way of doing it. I’ve read through the PRMs regarding the Buffer Manager, but it looks like that deals exclusively with system buffers and not custom buffers. Presumably there is some way of creating custom data streams. Also, FYI I don’t want to use Wimp messages as the apps may be running in a task window. Any ideas? Many thanks, |
Andrew McCarthy (3688) 584 posts |
Producer, consumer between applications. This sort of thing? AFAIK TechWriter, latterly FireWorkz utilises this arrangement; as to where the actual spec used lives, I don’t know. |
Simon Ayers (1525) 15 posts |
Thanks Andrew. I’ve just had a look. Am I getting the wrong end of the stick, but is the OLE mechanism based around transferring files for editing? I am interested in trying to send a character stream from one app to another, but I’m not sure I can achieve that with OLE. |
Julie Stamp (8365) 463 posts |
You could try using pipes, do
in one task window, and
in the other. |
Steve Pampling (1551) 7961 posts |
Something like this? http://www.jaffasoft.co.uk/wwv2/activeapps/ Could really do with an update / release of code to the wild. |
Simon Ayers (1525) 15 posts |
Hi Julie, Thanks that sounds good. I’ll give that a try. :-) |
Simon Ayers (1525) 15 posts |
@Steve Pampling Thanks, that looks interesting. Would it work on an application that hasn’t registered as a Wimp task and is running in a task window? |
Steve Pampling (1551) 7961 posts |
Pass. You could ask the author about it. |