Hi everyone,
What I try to do is:
Five applications (seperate EXE's) running simultaneously and each one
sharing (arrays) of INTEGER/REAL/CHARACTER (read/write) with each
other. All programs are written/compiled with Laheys Lf95 /
Winteracter. After muddling through MS Win-API documentations I
understand that file mapping would do it quite well. But Laheys (poor)
documentation concerning calls of API subroutines and functions hardly
helps me understanding how to do this.
The principal procedure is rather clear:
[ call CreateFile(...) ]
CreateFileMapping(...) or OpenFileMapping(...)
MapViewOfFile(...)
...
read/write from/to shared memory
...
UnmapViewOfFile(...)
CloseHandle(...)
My problem is, that I've never done anything in C and hardly understand
how to pass arguments of different types from FORTRAN calls to (C-)API
routines. Shame on me: I also try using Fortran pointers for the first
time.
I've done CreateFile and CreateFileMapping with some success but "hang"
at the MapViewOfFile. APIs MapViewOfFile returns a pointer as an
integer VALUE. But how is this VALUE (=memory address) assigned to
a FORTRAN pointer ...?
I also don't know how to read/write different
types to specific locations in the shared memory.
Is there anybody who could help me in understanding the procedure or
(what would be even better) can provide me with samples of routines
doing this job ??
Thanks!!
Klaus Bigalke
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|