Closed metaworm closed 1 year ago
luajit does not implement this behavior either, fwiw
I don't really like the idea of having a large static table, and allocating it dynamically does not really cut it either, IMO relying on this on windows with the way dll's work sounds wrong
the ffi is a relatively thin layer on top of the native API for this; if windows does not offer a native way to export symbols into global namespace then it should remain a no-op - POSIX dlopen does support this, so it's there
All right. Another way is SymFromName, but rely on the dbghelp.dll.
There really isn't a way like dlopen on Windows
It seems that it hasn't been implement yet. https://github.com/q66/cffi-lua/blob/master/src/lib.cc#L258
Maybe it can be implemented in the following ways
ffi_dl_handle
more large, such asstatic void *ffi_dl_handle[1000];
, or usestd::vector
LoadLibraryExA
inlib::load(...)
intoffi_dl_handle
If there's no problem, i will try do it