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.
Data Copy for IPC
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.
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.
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.
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.
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.
OK. Thanks.