Export function:
exports procname
How to export variable in DLL?
thanks!
exports procname
How to export variable in DLL?
thanks!
Hi northhh,
Welcome on board.
You cannot export variables from DLLs but you can share them with your main application.
Welcome on board.
You cannot export variables from DLLs but you can share them with your main application.
You can always create a function to return the address of the variable or the value of the variable. ;)
variable in MyDLL.DLL
def file:
proto code in main program:
variable is defined like a func with no params
.data
public c MyVar
MyVar db "Message From DLL",0
def file:
LIBRARY MyDLL
EXPORTS MyVar @1 NONAME; ordinal is optional
proto code in main program:
EXTERNDEF C _imp__MyVar:PTR BYTE
MyVar equ <_imp__MyVar>
includelib MyDLL.lib
.code
start:
invoke MessageBox,0,MyVar,MyVar,0
variable is defined like a func with no params