lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi David,

> Solutions a) if you know the name of a loaded DLL (e.g. x.dll) you can get
> its handle with GetModuleHandle() b) if you have its handle you can get
> its fullpath with GetModulefileName()

Both could be made to work for Windows specific modules, but I'd
rather not have to depend on this, e.g. when developing generic
packages that are not Windows specific.  (For our own app development
I use specialised loaders to properly load our modules anyway, no need
for such specific Windows calls in that case.)

> The problem with storing load paths is that they need to be absolute.
> THis can be done on Windows and on *nix. 
> If you place your Lua  code in a directory relative to the DLL, knowing
> where your Lua source is present no problem (in w6).

Do you mean without the GetModuleXXX calls above?  How so?