Hi everyone, I have generated .dll using kotlin native for windows. I am able to access the functions from windows c++ console app as well(voila!) but I am not able to do the same for a c# windows app.
[DllImport("libnative.dll", SetLastError = true)]
public static extern void libnative_symbols()->kotlin.root.packagename.main();
I was able to call libnative_symbols()->kotlin.root.packagename.main(); from c++ windows console app but I am not able to call if from a c# app. could anyone redirect me to any example or resource?
r
r4zzz4k
06/23/2020, 5:14 PM
IIRC, you basically have nested structures called kotlin, root, packagename, and last one would have function pointer called main. Try to map this hierarchy to C# and get your main out of the inner structure.
(I may be mistaken, didn't touch reverse C interop for a while)