mercredi 19 décembre 2012

Call unmanaged c# code

MsgBoxA API Import c#

// Sample program to call unmanaged code
using System;
using System.Runtime.InteropServices;

class PInvoke1App
{
    [DllImport("user32.dll")]
    static extern int MessageBoxA(int hWnd, string strMsg, string strCaption, int iType);

    public static void Main() 
    {
        MessageBoxA(0, "Hello, World!", "This is called from a C# app!", 0);
    }
}

Call ASM c#

Aucun commentaire:

Enregistrer un commentaire