Re: Rob: Q: Constant Scope

new topic     » goto parent     » topic index » view thread      » older message » newer message

Brian Broker wrote:

> Robert Craig wrote:
>>
>> I don't know how well that works in the Windows world.
>> I think in Windows, it might only be routines that can be
>> exported from a .dll, not variables. Maybe someone else here has tried it.
>
> define_c_var() works just fine with DLLs (assuming the lib actually
> exports variables).


I translated the most simple sample DLL that I could think of, using
the official Eu 2.5 translator (compiled with Borland and Watcom) on
Windows 98:

------------[ file mydll.ew ]------------
global integer foo
foo = 123

-----------------------------------------


... and tested with the following code
include dll.e

constant
   lpLib = open_dll("mydll.dll"),
   lpFoo = define_c_var(lpLib, "foo")

? lpLib
? lpFoo



Output is
   6291456
   -1

What goes wrong here?

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu