现在的位置: 首页 > 综合 > 正文

在C#中能否直接调用WIN32API

2013年09月14日 ⁄ 综合 ⁄ 共 302字 ⁄ 字号 评论关闭

要引用阿,you see

[DllImport("KERNEL32.DLL", EntryPoint="MoveFileW",  SetLastError=true,
CharSet=CharSet.Unicode, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern bool MoveFile(String src, String dst);

public static void Main()
{
    bool bl=MoveFile("y","u");
MessageBox.Show(bl.ToString());
}

抱歉!评论已关闭.