title: Got Error "Dynamic Symbol Retrieval Error: Win32 error 127" when load DlL from nodejs
body: <p>I want to load a dll file from node js. Here is the header file: </p>
  
  <pre><code>#pragma once
  #ifdef __cplusplus
  #define EXAMPLE __declspec(dllexport) 
  
  extern "C" {
      EXAMPLE int Add(int, int);
  }
  #endif
  </code></pre>
  
  <p>In compile as, i choose "compile as C code"</p>
  
  <p>In active solution platform, I choose x64</p>
  
  <p>And then, I use ffi module to load it:</p>
  
  <pre><code>var ffi = require('ffi');
  
  var Lib = ffi.Library('test', {'Add' : ['int',['int','int']]});
  </code></pre>
  
  <p>But I got an Error:</p>
  
  <pre><code>C:\Users\TheHai\node_modules\ffi\lib\dynamic_library.js:112
      throw new Error('Dynamic Symbol Retrieval Error: ' + this.error())
      ^
  
  Error: Dynamic Symbol Retrieval Error: Win32 error 127
      at DynamicLibrary.get (C:\Users\TheHai\node_modules\ffi\lib\dynamic_library.js:112:11)
      at C:\Users\TheHai\node_modules\ffi\lib\library.js:50:19
      at Array.forEach (native)
      at Object.Library (C:\Users\TheHai\node_modules\ffi\lib\library.js:47:28)
      at Object.&lt;anonymous&gt; (C:\Users\TheHai\Downloads\Compressed\nodejs-websocket-master\samples\chat\server.js:8:15)
      at Module._compile (module.js:409:26)
      at Object.Module._extensions..js (module.js:416:10)
      at Module.load (module.js:343:32)
      at Function.Module._load (module.js:300:12)
      at Function.Module.runMain (module.js:441:10)
  </code></pre>