Loading a DLL in lua

BlitzMax Forums/BlitzMax Beginners Area/Loading a DLL in lua

macklebee(Posted 2012) [#1]
Looking at using a dll in lua that is created by using blitzmax. I can create a dll in bmax and of course use it in bmax - but I am lost on how I register a function for use in a lua dll.

just example code...
Function AreaOfCircle2:Int(L:Byte Ptr) "win32"
	GCEnter()
	Local radius:Int = 0
	Local area:Int = 0
  	If 1 <= lua_gettop(L) Then
 		radius = luaL_checknumber (L, 1)
  		area = 3 * radius * radius
	EndIf
	lua_pushnumber (L, area)
	Return 1
End Function


Any help is appreciated. Thanks.