Using WinAPI in Script Measure.
Posted: July 31st, 2013, 9:49 am
How to use WinAPI in script?
But, what you say about this:jsmorley wrote:You can't.
Code: Select all
require "alien"
f = alien.Kernel32.Beep
f:types{ret = 'long', abi = 'stdcall', 'long', 'long' }
print(f(500, 100))
print(f(550, 100))
print(f(600, 300))
f = alien.Kernel32.ExpandEnvironmentStringsA
f:types{ret = "long", abi = 'stdcall', "string", "pointer", "long" }
local buffer = alien.buffer(512)
f("%USERPROFILE%", buffer, 512)
print("%USERPROFILE% - " .. tostring(buffer))
f = alien.User32.MessageBoxA
f:types{ret = 'long', abi = 'stdcall', 'long', 'string', 'string', 'long' }
print(f(0, "Привет, MessageBoxA (stdcall)!", "Заголовок", 64))
Okay! Than, another question: can i working with Windows Registry?