forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Memory mapped files
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Abhishek



Joined: 22 Dec 2010
Posts: 28

PostPosted: Sat Jan 08, 2011 6:51 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group