lua-users home
lua-l archive

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


On Mon, Jan 15, 2018 at 8:12 AM, Russell Haley <russ.haley@gmail.com> wrote:

https://ttuxen.wordpress.com/2009/11/03/embedding-lua-in-dotnet/

I do not think the information on the impossibility of calling __cdecl imports from managed code is accurate. Per https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute(v=vs.110).aspx , the [DllImport] attribute can have a CallingConvention field, one of whose possible values being Cdecl. See https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.callingconvention(v=vs.110).aspx for examples.

That means a stock Lua DLL should be usable from a .net application, if the imports are correctly decorated. I have not tried that, though.

Cheers,
V.