1

I'm trying to access some functions inside my C# .dll library and I'm doing it in node.js. I managed to load the library but having some troubles accessing the functions because they are inside a namespace "CCTalkReader" which contains a class "CREDIT_MANAGER" and inside this class I have my method INIT. How do I call it correctly?

I tried like this:

const CCTalk = new ffi.Library("./CCTalkNoteBill.dll", {
  'CCTalkReader':{
    'CREDIT_MANAGER':{
      'INIT': ["void", []]
    }
  }
});

CCTalk.INIT();

and this

const CCTalk = new ffi.Library("./CCTalkNoteBill.dll", {
 
      'INIT': ["void", []]
});

CCTalk.INIT();

But I always get

Dynamic Symbol Retrieval Error: Win32 error 127

which I found out means that I don't write the second parameter (function name) correctly. Any Ideas?

  • https://stackoverflow.com/questions/31643545/how-to-call-functions-in-a-c-sharp-dll-file-from-a-node-js-file – Hans Passant Mar 03 '21 at 11:43
  • I already seen that solution but it doesn't solve my problem and I'm working with Electron which had some issues with edge so I would prefer continuing with ffi. What I need is to call a function which is INSIDE a namespace and then INSIDE a class. – TheUkrainianMan Mar 03 '21 at 11:51

0 Answers0