Beispiel #1
0
        static void Main(string[] args)
        {
            MyLibraryDLL.hello(999);
            MyClass c = new MyClass();

            c.hello(141);
            Console.WriteLine("c.name = {0}", c.getName());
            c.Dispose();
        }
Beispiel #2
0
 public string getName()
 {
     return(Marshal.PtrToStringAnsi(MyLibraryDLL.MyClass_getName(obj)));
 }
Beispiel #3
0
 public void Dispose()
 {
     MyLibraryDLL.MyClass_destroy(obj);
     obj = IntPtr.Zero;
 }
Beispiel #4
0
 public int hello(int x)
 {
     return(MyLibraryDLL.MyClass_hello(obj, x));
 }
Beispiel #5
0
 public MyClass()
 {
     obj = MyLibraryDLL.MyClass_create();
 }