View previous topic :: View next topic |
Author |
Message |
Clay
Joined: 20 Mar 2014 Posts: 23
|
Posted: Wed Nov 09, 2016 6:25 pm Post subject: Data Copy for IPC |
|
|
Is it possible to make use of Data Copy (WM_COPYDATA) as an interprocess communication tool? I'd like to use a 3rd party graphics application to create an on-the-fly dashboard so that I can see real-time information about calculations happening in my main program. If this is possible, then I'd appreciate any hints about how to set up and use this feature.
Thanks in advance. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Wed Nov 09, 2016 7:18 pm Post subject: |
|
|
You may be able use ClearWin+, the function winio@ and the format code %mg. Details can be found online and in the help file ftn95.chm. |
|
Back to top |
|
|
Clay
Joined: 20 Mar 2014 Posts: 23
|
Posted: Fri Nov 18, 2016 8:59 pm Post subject: Data Copy for IPC |
|
|
Thanks Paul. How would I send an array of real values to a different process? Looks like winio@ with %mg is only able to communicate a couple of integer values. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2390 Location: Yateley, Hants, UK
|
Posted: Fri Nov 18, 2016 11:58 pm Post subject: |
|
|
You can put them in a file, send the name across, and read the file in the other program. If the write and read-back are close, then the file may still be in the disk cache to run at RAM speeds - you could be more certain of that if you used a RAM disk. There's also shared memory, but I've never used it. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Sat Nov 19, 2016 10:11 am Post subject: |
|
|
For a description of how to extend ALLOCATE for shared memory under 32 bit Win32, see the help file ftn95.chm (or the online help) under FTN95 Fortran language extensions->Extended ALLOCATE statement. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Sat Nov 19, 2016 12:07 pm Post subject: |
|
|
Paul,
Would be great to add this example to the Examples folder. And extend it. It was not extened for 20 years. Things are that the FTN95 Help is now HUGE, and not all people RTFM. Me for example. I never read any instructions or manuals. Including my professional ones. I studied physics solving the tasks and exercises and also only after i failed to solve the problem myself i looked at these textbooks.
The only manual/instructions/helpfile i had ever read was now defunct and combined with HelpFile Clearwin+ manual. This happened only after i have ran all the Clearwin+ examples supplied with the compiler i tried to extend my GUI beyond the examples. Same was with OpenGL and FTN95 itself. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Sat Nov 19, 2016 1:39 pm Post subject: |
|
|
OK. Thanks. |
|
Back to top |
|
|
|