Abhishek
Joined: 22 Dec 2010 Posts: 28
|
Posted: Sat Jan 08, 2011 6:51 pm Post subject: |
|
|
Well I guess I have found an alternative way to the problem.
In effect, what I was trying to do was the following:
1) VB creates memory mapped file (lets say named 'MYMAP')
2) VB calls FORTRAN dll
3) FORTRAN dll 'OPENS' that memory mapped file and somehow assigns it an I/O unit --> In Intel Visual Fortran, you would do that by using OPEN and USEROPEN functions. i dont know how it would be done in FTN95
4) You then use this I/O unit to execute READ statements as usual.
However, as it turns out, handle returned by OPENFILEMAPPING or CREATEFILEMAPPING is not the same kind of handle that can be used by OPEN method for subsequent READS
So I have instead passed file contents as string and I use a pointer to the current location in the string to emulate records. this pointer is increased after every subsequent READ and allows internal READ to read sequentially.
This Problem solved. for now.
Thanks |
|