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 

How to export data from a DLL

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
seagods



Joined: 21 Jan 2019
Posts: 2

PostPosted: Thu Jan 24, 2019 8:36 pm    Post subject: How to export data from a DLL Reply with quote

I have a Unix background and DLLs are new to me.

I have a function, say fun1, and

dll
load fun1.obj
exportall
fle mydll

does fine, as does

dll
load fun1.obj
export FUN1=FUN1
fle mydll

but, say MAIN and FUN1 have a common block

real alpha,beta
common /mydata/alpha,beta

(The block mydata appears as _MYDATA_ in FUN1.obj but MYDATA, MYDATA, nor _MYDATA_ appear to be recognised by slink)

how do I export the data?

Surely this must be a very common thing to do. The thing is I have a lot of legacy code which I don't wish to hack.)



So far, I haven't understood the manual
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Jan 25, 2019 9:03 am    Post subject: Reply with quote

You can't export data in that way.

You might be able to pass the address of the first item in the common block. You would write a subroutine for this and export the subroutine.
Back to top
View user's profile Send private message AIM Address
seagods



Joined: 21 Jan 2019
Posts: 2

PostPosted: Fri Jan 25, 2019 1:31 pm    Post subject: export data from dll Reply with quote

I had seen a couple of things on intel compiler sites where all the export and import was done via !DEC$ compiler directives and these included exporting
common blocks via "/BlockName/.

It looked as though slink is doing some clever stuff which means you don't have to touch the source code going into the DLL.

Anyway, thanks for the suggestion, I shall give it a go, but it looks like static
libraries for my legacy stuff. (Not the end of the world...)
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 -> General All times are GMT + 1 Hour
Page 1 of 1

 
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