diff lua/luadc/test.lua @ 0:0cfcc391201f

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:26:28 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/luadc/test.lua	Thu Mar 19 22:26:28 2015 +0100
@@ -0,0 +1,22 @@
+require "package"
+pf = package.loadlib("luadc","luadc_open")
+pf()
+
+print(dc.C_DEFAULT)
+print(dc.C_X86_WIN32_STD)
+
+dc.mode(dc.C_DEFAULT)
+
+clib = dc.load("msvcrt")
+f = dc.find(clib,"sqrt")
+x = dc.call(f,"d)d",144)
+print(x)
+
+
+dc.mode(dc.C_X86_WIN32_STD)
+
+user32 = dc.load("user32")
+f = dc.find(user32,"MessageBoxA")
+x = dc.call(f,"iSSi)v", 0, "Hello", "World", 0)
+
+