2012年5月28日
摘要: LoadLibrarybaseclassfordynamiclyinvokingnativedllsI wrote this class to making things easier while invoking native dlls dynamicly. Read comments in the class to understand what it doing. There is a sample at the end of this article showing how to use this abstrract class. /// <summary> /// Enc 阅读全文
posted @ 2012-05-28 18:05 武胜-阿伟 阅读(370) 评论(0) 推荐(0)
摘要: C#嵌入x86汇编——一个GPIO接口的实现 Posted on 2012-05-10 09:36 大石头 阅读(4362) 评论(58) 编辑 收藏开始进入工业自动化,买的工控机带有GPIO接口,可用于直接控制继电器。从厂家拿到接口手册一看,居然是汇编直接操作端口,基本上是IN/OUT指令了。接口很简单,计算位移,读取;计算位移,写入。这种接口,常见有四种办法,分别是四种语言实现,一是直接写ASM,不过要公开给C#做的应用程序调用,很不容易,另外三种是C/C++/Delphi嵌入汇编,倒是问题不大。接口实在是小,不想大动干戈,所以想了别的办法。第五种,用C++/CLI,这也是一个不错的主意。 阅读全文
posted @ 2012-05-28 17:15 武胜-阿伟 阅读(698) 评论(0) 推荐(0)