InitiateSystemShutdown InitiateSystemShutdown怎么用呀谁能帮帮我呀 急呀 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在.net里面调用?需要通过P/Invoke,下面是个封装的例子,你可以直接调用InitiateSystemShutdownApublic partial class NativeMethods { /// Return Type: BOOL->int ///lpMachineName: LPSTR->CHAR* ///lpMessage: LPSTR->CHAR* ///dwTimeout: DWORD->unsigned int ///bForceAppsClosed: BOOL->int ///bRebootAfterShutdown: BOOL->int [System.Runtime.InteropServices.DllImportAttribute("advapi32.dll", EntryPoint="InitiateSystemShutdownA")] [return: System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]public static extern bool InitiateSystemShutdownA([System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lpMachineName, [System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lpMessage, uint dwTimeout, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)] bool bForceAppsClosed, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)] bool bRebootAfterShutdown) ;} 求一正则表达式 实习任务 自定义事件是飞方法组,无法赋值 我是超级新手,请问c#如何连接oracle数据库,using System.Data.oralceClient为什么编译通不过 紧急求助 各位老师快帮忙! 关于 sql server 2005的简单问题 郁闷郁闷。。。。。。。 C#对Word文本的操作 写过GPS GT06协议的进来帮个忙。 新手请看,为什么我们会问那么多被人称作“垃圾”的贴子 工具栏中的鼠标状态不对 在C#中使用反射执行另一个C#的exe文件问题
/// Return Type: BOOL->int
///lpMachineName: LPSTR->CHAR*
///lpMessage: LPSTR->CHAR*
///dwTimeout: DWORD->unsigned int
///bForceAppsClosed: BOOL->int
///bRebootAfterShutdown: BOOL->int
[System.Runtime.InteropServices.DllImportAttribute("advapi32.dll", EntryPoint="InitiateSystemShutdownA")]
[return: System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
public static extern bool InitiateSystemShutdownA([System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lpMachineName, [System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lpMessage, uint dwTimeout, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)] bool bForceAppsClosed, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)] bool bRebootAfterShutdown) ;}