Created
March 19, 2023 04:01
-
-
Save un4ckn0wl3z/f6b36a451eb791f88262b288f091fb87 to your computer and use it in GitHub Desktop.
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.Runtime.InteropServices; | |
namespace PInvoke | |
{ | |
internal class Program | |
{ | |
[DllImport("user32.dll", CharSet = CharSet.Unicode)] | |
static extern int MessageBoxW(IntPtr hWnd, string lpText, string lpCaption, uint uType); | |
static void Main(string[] args) | |
{ | |
MessageBoxW(IntPtr.Zero, "My first P/Invoke", "Hello World", 0); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment