updating oE define_c_var


include dll.e 
namespace dll 
public function define_c_var(atom lib, sequence variable_name) 

gets the address of a symbol in a shared library or in RAM.

  1. lib : an atom, the address of a Unix .so or Windows .dll, as returned by open_dll.
  2. variable_name : a sequence, the name of a public C variable defined within the library.

An atom, the memory address of variable_name.


Once you have the address of a C variable, and you know its type, you can use peek and poke to read or write the value of the variable. You can in the same way obtain the address of a C function and pass it to any external routine that requires a callback address.

Example 1:

see .../euphoria/demo/linux/mylib.ex

See Also:

c_proc, define_c_func, c_func, open_dll

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu