flat assembler
Message board for the users of flat assembler.

Index > Windows > memory between exe and dll

Author
Thread Post new topic Reply to topic
Ali.Z



Joined: 08 Jan 2018
Posts: 772
Ali.Z 26 Jun 2018, 22:12
some.exe have data say:
IniFileName db "..\file.ini",0

and in my.dll have a function that needs the access to IniFileName

whenever i try to compile my.dll i get an errors saying:
undefined symbol "IniFileName"

so the solution is to define it in my.dll and if i defined it here then some.exe cant be compiled.

so how could i share important data between these two modules?

not sure if its possible using .inc file, and if so then i still dont know how

_________________
Asm For Wise Humans
Post 26 Jun 2018, 22:12
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 27 Jun 2018, 03:33
The DLL contains procedures (functions) that the exe calls during run-time. If some of these functions needs memory pointers from the exe, they must be passed as an argument when the exe calls the DLL function.
Post 27 Jun 2018, 03:33
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 772
Ali.Z 27 Jun 2018, 08:01
i got two ways, either by pushing it on the stack or lea (load effective address)
so thanks jf.

_________________
Asm For Wise Humans
Post 27 Jun 2018, 08:01
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.