Justdie
Justdie
CC#
Created by Justdie on 1/5/2024 in #help
import every function from a C module
Recently found out about DllImport, thought about using it to bind stuff, but im rather unsure how to go about things, following this example, it looks to me like you can only add one function per DllImport, do i have to call it multiple time?
public class Tester
{
[DllImport("libtest.so", EntryPoint="print")]

static extern void print(string message);

public static void Main(string[] args)
{

print("Hello World C# => C++");
}
}
public class Tester
{
[DllImport("libtest.so", EntryPoint="print")]

static extern void print(string message);

public static void Main(string[] args)
{

print("Hello World C# => C++");
}
}
this is the example i found found an answer to my question but its ten years old so i'd assume it would be good by now https://stackoverflow.com/questions/15781627/c-one-attribute-for-multiple-declarations-dllimport
6 replies
CC#
Created by Justdie on 1/2/2024 in #help
Properly start threads with function arguments
I need a thread which has for job to talk to the main program to update a label, so i thought i could just pass the label as an argument to the function, but i wish to know how to properly do it since the stuff i found online either don't show how or are 13 years old.
3 replies
CC#
Created by Justdie on 11/4/2023 in #help
❔ AvaloniaUI detect when TextBox's content is changed
yeah so how do i do that, apparently there is something for it but i can't seem to quite find how to use it
47 replies