lua-users home
lua-l archive

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


Hi all,

I'm interested in using LUA to talk to a USB HID device in Windows. I've written some C code and I'm now trying to figure out how to call it from LUA ... I'd like to eventually call a LUA function sort of like this :

hidEventFunc(handler)

which would install a lua function 'handler' , which would be called by my C code when a USB HID event such as "new device connected" occurs.

I've googled around on various keywords such as threads and C callbacks in LUA, but it's not clear to me what I need to take into consideration if I want to install a LUA function in my C library and call it from C when necessary.

Thanks in advance,
Bert



Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.