yulei's blog

有梦想更有要有行动,每天前进一小步,那么每年可以迈出一大步 QQ:65072096 MSN:coolsoft2001@sina.com

导航

2007年6月13日 #

关于C#调用winAPI参数类型对应关系的不完全总结

摘要: 接连做了几个c# winform的程序,,都用到了调用API或着C++开发的dll,,对于调用其中方法时,相对应到c#中时,参数类型的变化做了个如下总结,以备自己日后查用,也贴出来大家共享。 引用Dll: using System.Runtime.InteropServices; [DllImport("xxx.dll")] public static extern 返回类型 方法名(参数1,... 阅读全文

posted @ 2007-06-13 16:16 yulei 阅读(883) 评论(0) 推荐(0) 编辑

c#实现程序开机自动运行

摘要: 代码如下: RegistryKey KeyCon=Registry.LocalMachine.OpenSubKey( "Software\\Microsoft\\Windows\\CurrentVersion\\Run",true); string MyKey= "Terminal"; if((string)KeyCon.GetValue(MyKey,"no") == "no")//指定的键... 阅读全文

posted @ 2007-06-13 14:55 yulei 阅读(1390) 评论(0) 推荐(0) 编辑