
C#
文章平均质量分 73
herman_chow
这个作者很懒,什么都没留下…
展开
-
保证C#应用程序只有一个实例在运行
[STAThread] static void Main() { Process instance = RunningInstance(); if (instance == null) { Application.Run(new mainFrm()); } else { //MessageBox.Show("此程序已经启动!"); HandleR原创 2004-07-07 15:30:00 · 1441 阅读 · 0 评论 -
C#里将其他共享目录映射为本地盘符的方法
1.通过执行命令,会有cmd窗口一闪而过: public void Get_Share(string remotepath, string localpath, string username, string password) { Process.Start("net"," use "+localpath+" "+remotepath+" "+password+" /user:"+us原创 2004-07-07 14:11:00 · 4022 阅读 · 0 评论 -
获取指定IP的终端的MAC地址
因为业务需要,需要给公司部分终端进行登记,以保证授权终端能够登录业务系统,最好的方法就是记录下每台终端的MAC地址来进行验证是否有授权。 下面是采用调用API的方式获取指定IP的终端的MAC地址: [DllImport("Iphlpapi.dll")] public static extern int SendARP(Int32 dest, Int32 host, ref Int原创 2005-04-11 15:49:00 · 2313 阅读 · 0 评论