[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: dynamic loading of windows dll's in lua as plugins?
- From: "Samson, Lyndon (GEIS)" <Lyndon.Samson@...>
- Date: Tue, 18 May 1999 14:05:27 +0100
This is a good clean solution, you may end up having to recompile all your
extensions if you change your lua.dll though. I think implicit links are
done through ordinal numbers.
> -----Original Message-----
> From: Ashley Fryer [SMTP:firstname.lastname@example.org]
> Sent: Tuesday, May 18, 1999 12:38 PM
> To: Multiple recipients of list
> Subject: RE: dynamic loading of windows dll's in lua as plugins?
> > Thus in short extension DLLs will make C/C++ functions available to LUA
> > from their DllMain function and because the extension DLLs get linked
> > the import LIB from LUA.DLL they have access to the LUA functions
> > needing to have a control structure with all available LUA functions,etc
> > (and not having to call a "register" function yourself)
> > I haven't got a chance to try this explicitly because I'm currently busy
> > with some other things (altough I have got a LUA.DLL at the moment and I
> > did some test regarding DLLs and LoadLibrary), but I think it should
> > work... any suggestions or remarks if this idea would (not) work?
> I think your plan will work.
> Don't forget to un-register your lua functions from your dll's clean-up
> code. Otherwise Lua will end up with invalid function pointers.
> There isn't a lua_unregister macro, but this should do the trick:
> #define lua_unregister(n) (lua_pushnil(), lua_setglobal(n))