Answers for "import User32.dll into Visual Studio code"

0

import User32.dll into Visual Studio code

using System;
using System.Runtime.InteropServices;

class Example
{
    // Use DllImport to import the Win32 MessageBox function.
    [DllImport("user32.dll", CharSet = CharSet.Unicode)]
    public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type);
    
    static void Main()
    {
        // Call the MessageBox function using platform invoke.
        MessageBox(new IntPtr(0), "Hello World!", "Hello Dialog", 0);
    }
}
Posted by: Guest on August-02-2020

Code answers related to "import User32.dll into Visual Studio code"

Browse Popular Code Answers by Language