Skip to content

Instantly share code, notes, and snippets.

@dander
Created February 17, 2017 09:10
Show Gist options
  • Save dander/a02c8837e12e70ec24396da3a18b1168 to your computer and use it in GitHub Desktop.
Save dander/a02c8837e12e70ec24396da3a18b1168 to your computer and use it in GitHub Desktop.
LINQPad "hello libRed" script
<Query Kind="Program">
<Reference>&lt;RuntimeDirectory&gt;\System.Runtime.InteropServices.dll</Reference>
<Namespace>System.Runtime.InteropServices</Namespace>
</Query>
void Main()
{
redOpen();
redDo("view [text {hello, libRed!}]");
}
[DllImport(@"C:\red\libRed.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void redOpen();
[DllImport(@"C:\red\libRed.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void redDo(string redcode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment