5 ms·
Can someone please explain what's the purpose of this JS code?
by scg 14y ago
Can someone please explain what's the purpose of this JS code?
- deleted 14y ago[deleted]
- homedog 14y agoIt's particularly useless for anything else, really. Not to mention it's in a completely un-portable format. One can only hope this was generated automatically.
- daeken 14y ago"Un-portable" in that it wraps the win32 API rather than implementing the API. But it's actually a pretty handy format if you wanted to generate wrappers for other languages -- replace a couple base types/functions and have it emit code to wrap the Win32 API for any other language. And yeah, it's pretty obviously automatically generated.
- deleted 14y ago[deleted]
- z92 14y agoI did the same years back. Ported the entire win32 API to lua. Automatically generated the code. But the work was hard never the less.
- deleted 14y ago[deleted]
- xdenser 14y agoNo you cant. It is NodeJS module referring node-ffi - module allows you to call dynamic libarary functions w/o making your own binary module. So it may be used with NodeJS under Windows. For example you may access COM ports directly from JS. Or you may send messages to other Windows to manipulate them.
- Androsynth 14y agoThe author of this gist is also one of the developers of http://appjs.org/ http://appjs.org/. It looks like they may be related.
- deleted 14y ago[deleted]