summaryrefslogtreecommitdiffstats
path: root/baz
diff options
context:
space:
mode:
authorBernhard Guillon <Bernhard.Guillon@begu.org>2026-06-30 21:02:59 +0200
committerBernhard Guillon <Bernhard.Guillon@begu.org>2026-06-30 21:02:59 +0200
commit17a7b6d602ec4e0bf39078a3a9a03ef71d65cf10 (patch)
treeec4cd3a180133e2f691f154bd05dcdbe69f0b4ca /baz
parent9bb17da786318cf6c056bdc8a5bfb100ae7ae81c (diff)
downloadcsharp-cmake-17a7b6d602ec4e0bf39078a3a9a03ef71d65cf10.tar.gz
csharp-cmake-17a7b6d602ec4e0bf39078a3a9a03ef71d65cf10.zip
Add C hello library with P/Invoke from Baz
Diffstat (limited to 'baz')
-rw-r--r--baz/Baz.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/baz/Baz.cs b/baz/Baz.cs
index f3b017f..df4dd96 100644
--- a/baz/Baz.cs
+++ b/baz/Baz.cs
@@ -1,9 +1,14 @@
using System;
+using System.Runtime.InteropServices;
public class Baz
{
+ [DllImport("hello_c")]
+ private static extern void hello_c();
+
public static void Print()
{
Console.WriteLine("Baz");
+ hello_c();
}
}