111,120
社区成员
发帖
与我相关
我的任务
分享
[Quote=引用 4 楼 wuyq11 的回复:]
using System;
using System.Runtime.InteropServices ;
namespace ChangeIPAddress
{
class Program
{
[DllImport("user32.dll", EntryPoint = "MessageBox")]
public static extern int MessageBox(int hWnd, String strMessage, String strCaption, uint uiType);
static void Main()
{
MessageBox(0, "测试", "表头", 0);
}
}
}
.module extern user32.dll
.method public hidebysig static pinvokeimpl("user32.dll" winapi)
int32 MessageBox(int32 hWnd,
string strMessage,
string strCaption,
unsigned int32 uiType) cil managed preservesig
{
}
.method private hidebysig static void Main() cil managed
{
.entrypoint
// 代码大小 20 (0x14)
.maxstack 8
IL_0000: nop
IL_0001: ldc.i4.0
IL_0002: ldstr bytearray (4B 6D D5 8B ) // Km..
IL_0007: ldstr bytearray (68 88 34 59 ) // h.4Y
IL_000c: ldc.i4.0
IL_000d: call int32 ChangeIPAddress.Program::MessageBox(int32,
string,
string,
unsigned int32) //<--这里
IL_0012: pop
IL_0013: ret
} // end of method Program::Main