Take a look at: winapi_demo.lua

This should get you started. You need to "import" the stuff with REQUIRE.