[Mono-dev] Mono embedded
Robert Jordan
robertj at gmx.net
Thu Mar 27 05:39:18 EDT 2008
Stefan Fink wrote:
> hallo,
> i have make a small embedded example but i have a few problems. i want
> to call a embedded c-function like ...list_box(...)
> (show below cad.h cad.c). when i compile my test.cs the ListBox function
> is unknown. who can i to make known about this function???
You have to declare it as an internal call:
> using System;
> using System.Runtime.CompilerServices;
>
> class MonoEmbed {
>
> static void Main() {
> string[] arr = {"1","2","3"};
> string ret = ListBox("Hallo",arr);
> }
[MethodImpl (MethodImplOptions.InternalCall)]
static extern string ListBox(string str, string[] arr);
> }
Robert
More information about the Mono-devel-list
mailing list