diff --git a/DllImportGenerator/Demo/Program.cs b/DllImportGenerator/Demo/Program.cs index 7b6e0892cc83..335cef053259 100644 --- a/DllImportGenerator/Demo/Program.cs +++ b/DllImportGenerator/Demo/Program.cs @@ -5,10 +5,19 @@ namespace Demo { + partial class Kernel32 + { + [GeneratedDllImport(nameof(Kernel32), EntryPoint = "QueryPerformanceCounter")] + public static partial int Method(ref long t); + } + unsafe class Program { static void Main(string[] args) { + var ts = (long)0; + int suc = Kernel32.Method(ref ts); + Console.WriteLine($"{suc}: 0x{ts:x}"); } } }