How to Instantiate a C# Class from Node.js Using FFI

preview_player
Показать описание
In this video, I'll be showing you how to use the Instance Creator Library.

✅ Project files

💬 Let’s connect:

Twitter – @VLabStudio
GitHub – VLabStudio

✅ Information about me:

Name: Vincent
Country: Denmark
Age: 21

Рекомендации по теме
Комментарии
Автор

I love this guy all series videos within 5 minutes ✌

bala-stcj
Автор

how do I deal with pointer inputs? such as function( int *)? where int * has 16 elements in the dll description (like an array?)

dannysilvestresuarez
Автор

Do you know if it would be possible to use UIAutomationClient.dll using ffi-napi?

AlreadyProYT
Автор

Thanks for your explanation. But how could I instantiate a c# object and call its functions where those functions are async and call back?

lakshmiprasannasabbella
Автор

Prob: Node.js throws runtime error as "Unhandled Exception: PInvoke restriction: cannot return variants."

//C# code ---> compiled as dll and placed in node-js pro folder.

using System;
namespace ExcelInteraction
{
public class Utils
{
[DllExport]
public static dynamic createAnComInstance()
{
return
}
}
}


//app.js code

const ffi = require("ffi-napi");

const xlLib = new ffi.Library("./ClassLibrary1", {
"createAnComInstance": [
"Object", []
]
});

var

Is it possible to return an System.Dynamic or System.Object [interop] from C# dll to node.js ! ?

It will be very much helpful if the issue got resolved

PremKumarrtech
join shbcf.ru