Created
June 12, 2015 14:16
-
-
Save sunnyone/1d9e081df7eada21911d to your computer and use it in GitHub Desktop.
Rust DLL Unicode conversion test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace RustLibSample { | |
static class NativeMethods { | |
[DllImport("foo.dll", EntryPoint = "hello2", CharSet=CharSet.Unicode)] | |
public static extern void Hello2(string a); | |
} | |
class Program { | |
static void Main(string[] args) { | |
NativeMethods.Hello2("日本ABC"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment