開発環境 |
Microsoft Visual Studio Community 2019 |
実行環境 |
Microsoft Windows 10 Home (64bit) |
プロジェクト テンプレート |
C# コンソール アプリ(.NET Framework) |
プロジェクト名 |
winapi |
Program.cs
using System;
using System.Runtime.InteropServices;
namespace winapi
{
class Program
{
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
internal static extern int MessageBoxW(
IntPtr hWnd, string lpText, string lpCaption, uint uType);
static void Main(string[] args)
{
MessageBoxW(new IntPtr(0), "hello, world", "winapi", 0);
}
}
}
最終更新:2020年07月27日 17:59