Electron通过ffi调用DLL

第一步建立一个DLL

int WINAPI CAM_Open(char *pIn, char* pOut);

第二步安装ffi

npm install --save ffi


针对electron版本重新编译

cd node_modules\ffi

node-gyp rebuild -target=1.6.11 -arch=x64 -dist-url=https://atom.io/download/atom-shell

cd node_modules\ref

node-gyp rebuild -target=1.6.11 -arch=x64 -dist-url=https://atom.io/download/atom-shell

第三步修改electron应用的index.html




    
    人脸识别测试程序








Electron通过ffi调用DLL_第1张图片

你可能感兴趣的:(----Electron)