[Mono-list] PInvoke Test

Daniel Morgan danmorg@sc.rr.com
Thu, 7 Feb 2002 14:00:25 -0500

Cool!  I found a test that demonstrates Platform Invoke.  The file is

using System;
using System.Runtime.InteropServices;

public class Blah {

 [DllImport ("user32", CallingConvention = CallingConvention.StdCall,
CharSet = CharSet.Auto)]
 public static extern int MessageBox (int hWnd, string pText, string
pCaption, int uType);

 public static int Main ()
  MessageBox (0, "Hello from Mono !", "PInvoke Test", 0);

  return 0;

Now, if I can only get libgda to compile...