define_c_var
Definition: | atom addr = define_c_var(atom lib, sequence vname) |
Description: | lib: the address of a Linux shared library or Windows .dll, as returned by open_dll(). vname: the name of a global C variable defined within the library. addr will be the memory address of variable vname, somewhere within the dll/so file. |
pwa/p2js: | Not supported. |
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. |
Implementation: | See builtins\VM\pcfunc.e (an autoinclude) for details of the actual implementation. |
See Also: | c_proc, define_c_func, c_func, open_dll, Calling C Functions |