Call a function in a shared library: Difference between revisions

Content added Content deleted
(added c#)
Line 63: Line 63:
<pre>internal openimage opens fake.img...
<pre>internal openimage opens fake.img...
opened with handle 0</pre>
opened with handle 0</pre>

=={{header|C sharp|C#}}==

In Windows.

<lang csharp>using System.Runtime.InteropServices;

class Program {
[DllImport("fakelib.dll")]
public static extern int fakefunction(int args);

static void Main(string[] args) {
int r = fakefunction(10);
}
}</lang>


=={{header|Python}}==
=={{header|Python}}==