I'm trying to use Async with a Buffer recieved, I get the correct answer but I can't access variables outside the callback function. In that case I'm trying to assing 'job' variable to 'res' variable value. It seems that I can't access to another scope with 'this'. I tried 'bind(this)' too. Electron dev-tools crash and everything stops (DevTools was disconnected from the page...). The C++ function returns 'char*'
getJobsTopaz () { for (let i = 0; i < this.getTotalJobs(); i++) {
this.dllFunctions.GetJobIDVB6.async(i, function (err, res) {
if (err) throw err
this.jobs = res }) } }
The problem was that my 'dll' dependencies requires an specific Net Framework version to work. Devtools doesn't tell me nothing about that because it's an error that occurs inside that dependencie.