比如关机等系统操作~~~~

解决方案 »

  1.   

    导入相关的系统动态链接库即可,比如[DllImport("kernel32")]
    private static extern long WritePrivateProfileString(string section,
    string key,string val,string filePath);
    [DllImport("kernel32")]
    private static extern int GetPrivateProfileString(string section,
    string key,string def, StringBuilder retVal,
    int size,string filePath);
      

  2.   

    http://msdn2.microsoft.com/zh-cn/default.aspx
    msdn中文版http://www.microsoft.com/china/msdn/library/langtool/vcsharp/ousNET.mspx?mfr=truehttp://search.microsoft.com/results.aspx?mkt=zh-CN&setlang=zh-CN&q=p%2finvoke
      

  3.   

    [DllImport("coredll.dll", EntryPoint="EventModify", SetLastError = true)]
    private static extern int CEEventModify(IntPtr hEvent, uint function); 类似此方法