stand on the shoulders of giants

08 2010 档案

摘要:Error: Constant value '2147483648' cannot be converted to a 'int' (use 'unchecked' syntax to override) Reason: 计算机在内部用的是补码, 所以: byte类型的范围:(负数最小值,1既是符号位又是值位) Dec:      &... 阅读全文
posted @ 2010-08-19 15:32 DylanWind 阅读(1572) 评论(0) 推荐(0)
摘要:如下代码示例如何在C#中取得Win32的GetLastError. // this function is just for fun [DllImport("winusb.dll", SetLastError = true)] public static extern bool WinUsb_SetPowerPolicy(IntPtr InterfaceHandle, UInt32 Policy... 阅读全文
posted @ 2010-08-04 18:40 DylanWind 阅读(882) 评论(0) 推荐(0)
摘要:The WMI technique is very powerful for system related activities. They provide operating system interface. The following code can be used to close instance of visual studio on remote machine provided ... 阅读全文
posted @ 2010-08-04 18:37 DylanWind 阅读(379) 评论(0) 推荐(0)