Hi furesoft,
You can expose a .NET type with a P/Invoke method and invoke it from script. For example:
and then
Good luck!
You can expose a .NET type with a P/Invoke method and invoke it from script. For example:
publicstaticclass Native { [DllImport("user32.dll", CharSet = CharSet.Auto)] publicstaticexternint MessageBox(IntPtr hWnd, string text, string caption, int options); }
engine.AddHostType("Native", typeof(Native)); engine.AddHostType("IntPtr", typeof(IntPtr)); engine.Execute("Native.MessageBox(IntPtr.Zero, 'Hello!', 'Greetings', 0)");