define_c_var

Definition: atom addr = define_c_var(atom lib, sequence vname)
Description: lib is the address of a Linux shared library or Windows .dll, as returned by open_dll(). vname is the name of a global C variable defined within the library. addr will be the memory address of variable vname.
Comments: 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.
Example Program: euphoria/demo/linux/mylib.exu
See Also: c_proc, define_c_func, c_func, open_dll, Calling C Functions