MS Windows API bindings

500 views
Skip to first unread message

AaronNGray

unread,
Jul 9, 2012, 1:23:50 PM7/9/12
to nodejs
I am interested whether anyone has created bindings for any of the MS
Windows API ?

Many thanks in advance,

Aaron

mscdex

unread,
Jul 9, 2012, 6:45:54 PM7/9/12
to nodejs
On Jul 9, 1:23 pm, AaronNGray <aaronngray.li...@gmail.com> wrote:
> I am interested whether anyone has created bindings for any of the MS
> Windows API ?

This would be quite an undertaking for a generic binding. There is
node-ffi, but AFAIK that's not recommended for production use because
of the performance penalties.

Your best bet is to incorporate just the Windows API functions you
need for your binding/project.

Aaron Gray

unread,
Jul 9, 2012, 7:08:36 PM7/9/12
to nod...@googlegroups.com
Okay my fall back is to generate C binding code using jison and a bit
of templated C generation if it is at all possible.

AFAICS it would be relatively easy to put together, and would be
useful for creating other C interfaces.

Types such as Windows HANDLES - HWND, etc and other types are the only
area I have not sussed how to deal with.
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

Dick Hardt

unread,
Jul 9, 2012, 7:25:33 PM7/9/12
to nod...@googlegroups.com
Depends on which APIs you want to interact with.

Many COM and .NET APIs can be dynamically bound to.

Brandon Benvie

unread,
Jul 9, 2012, 7:36:32 PM7/9/12
to nod...@googlegroups.com
Not quite functionl but pretty close; https://gist.github.com/2879370

Brandon Benvie

unread,
Jul 9, 2012, 7:38:36 PM7/9/12
to nod...@googlegroups.com
And example smaller scale implementation of the functions can be seen here, for bindings to the registry API: https://github.com/Benvie/node-Windows/blob/ffi-registry/lib/bindings-registry.js

Aaron Gray

unread,
Jul 9, 2012, 8:06:42 PM7/9/12
to nod...@googlegroups.com
On 10 July 2012 00:36, Brandon Benvie <brandon...@gmail.com> wrote:
> Not quite functionl but pretty close; https://gist.github.com/2879370

Brandon,

Ah great.

What is its status ?

Aaron

Aaron Gray

unread,
Jul 9, 2012, 8:08:37 PM7/9/12
to nod...@googlegroups.com
Wow, nice !

Thanks,

Aaron

Dick Hardt

unread,
Jul 9, 2012, 8:14:07 PM7/9/12
to nod...@googlegroups.com
Agreed!
Reply all
Reply to author
Forward
0 new messages