小编Par*_*y B的帖子

node-ffi - EnumWindows 的回调提取

要求是在当前桌面上打开所有窗口。我试图从 node-ffi 调用 EnumWindows,它给出的处理程序长度为 0。

节点参考链接:node-ffi模块

我的代码片段:

/**
@Name :Parthasarathy Balakrishnan
@Version : V0.1
@Date : 18/03/2013 */

var ffi = require('ffi'),
ref = require('ref'),
int = ref.types.int,
assert = require('assert'),
bindings = require('bindings'),
buffer = require('buffer')

var user32,Kernel32;
var lpEnumFunc;
var invokeCount=0;

/**EnumWindows API CALL
    BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc,_In_ LPARAM lParam);
    Parameters
    lpEnumFunc [in]
        Type: WNDENUMPROC
        A pointer to an application-defined callback function. For more information, see EnumWindowsProc.
    lParam [in]
        Type: LPARAM
        An application-defined value to be …
Run Code Online (Sandbox Code Playgroud)

node.js

6
推荐指数
1
解决办法
3311
查看次数

标签 统计

node.js ×1