1. RE: define_c_var for Win32??? - Rob
- Posted by Ray Smith <smithr at ix.net.au> Feb 12, 2001
- 405 views
Robert Craig wrote: > Ray Smith writes: > > Will "define_c_var" be supported in Windows one day? > > If someone can tell me how to get the address of a > variable in a Windows .dll, i.e. a .dll that I've loaded > dynamically using LoadLibrary(), I can probably add this > feature very easily. > > Currently you can run define_c_var() with Euphoria > for Windows, but it just tries to find the symbol as > if it were an exported function - I thought there was a chance > this would work, but I didn't know whether you were > supposed to look up "x", "_x" or something else. Thanks Rob, It works perfectly. Using the Allegro DLL I was able to grab a few exported variables which is great news. It also means if you have the source code of any DLL's you want to use you can use extern's in your variable declarations to open them up for Euphoria. Now ... should I re-write euAllegro????? hmmmm Ray Smith http;//www.geocities.com/ray_223
2. RE: define_c_var for Win32??? - Rob
- Posted by Ray Smith <smithr at ix.net.au> Feb 12, 2001
- 381 views
mabrown at SENET.COM.AU wrote: > "define_c_var"? Is there a "define_c_var" that I missed? > > Is your need for this to avoid all the peeking / poking, type conversion > stuff when calling dll functions? If it is then I would also like this. No sorry Mark, This is used to get the address of an exported variable in a DLL. For instance Allegro has dozens of exported variables for things like screen / font structure address. What I did was write my own DLL and created simple functions which returned these static variables. I could have (if I had known) just used define_c_var! The Euphoria doco says define_c_var ss Linux only so I never looked further. Ray Smith http;//www.geocities.com/ray_223