Null2

Publish: November 25, 2011 Category: .Net

"对于开发技术的应用,只有垃圾的选择和垃圾的应用,没有垃圾的技术。不加前提的对一个技术片面评价,是浮躁的;不深入了解就人云亦云那是愚蠢的."

New.NET Async Control Flow Explained

Publish: September 26, 2011 Category: .Net

Alan Berman recently detailed the new .NET Async feature’s control flow. On the Visual Basic Team site he explained that the Async feature allows the calling code and the response code to be in the same place. This is possible due to the Async and Await keywords. Async marks a function as returning an asynchronous task and Await transfers control flow back to the calling function until a task has completed.

Read the rest of this entry »

.NET下的CS编程,真的很无聊

Publish: September 8, 2011 Category: .Net

虽不说其它的如何了,也不说设计模式,但从这次的开发过程中可以看出来,.Net下的编程真的很无聊,很没挑战性,尤其是CS结构的。今天以为可以重写ListView Control了,还想实现,双击编辑并自动入库。结果写完了。运行了,OK了,不经意看了下属性。日,火大了。原来属性里面都有了。还写个毛。

Read the rest of this entry »

基于Modbus协议的通信

Publish: September 8, 2011 Category: .Net

目前只是实现了RTU、ASCII两种协议,对于TCP的还没开始开发。整个软件的开发过程中,最核心部分的就是Modbus的协议的解析了。系统中提供了注册码,很简单,网络上的算法而已。
加密的思路:在注册表保存某一密钥,程序启动时检测是否存在该项与键值。若存在,则一边提取值并解密,程序一边读取机器码,二者互比。

Read the rest of this entry »

vb调用vc的dll

Publish: June 27, 2011 Category: .Net

额,说啥好呢,还是不说了,直接上code...
在vc的工程中创建dll.加入:

extern "C" __declspec(dllexport) char * __stdcall Test(int p, char *str);
int __stdcall MyTest(int a,int b)
{
	return a + b;
}

Read the rest of this entry »

.Net Runtime 2.0 error

Publish: April 1, 2011 Category: .Net

前一天开发的Windows Services,功能都成功实现,编译也没有出现过error和warning,运行的时候为什么会连启动都启动不了?后来查了一个晚上,调试到了凌晨5点,才成功。哎~

Read the rest of this entry »

Bad IL format

Publish: March 25, 2011 Category: .Net

好端端的一个系统,一年前的东西。当时运行的好好的,今个客户刚好要用,再试运行一下,完了,坏了。而且坏的莫然其妙:Bad IL format。头一次遇到这样子的问题,搞不懂。搜了一下谷大歌,哈哈,不少人和我一样的啊。

Read the rest of this entry »

RadioButtonList动态绑定问题

Publish: March 25, 2011 Category: .Net

就在前几天,前几天,,新来同事小黄同学原本是搞vc的,不知道为何单位让其做bs的事。无聊~当时小黄同学遇到了RadioButtonList的问题,差点也把我给弄蒙了。
小黄同学提的要求很简单:RadioButtonList的数据是从数据库动态绑定的,怎么设置第一项为默认选中?还有就是怎么用户判定选中了那个?

Read the rest of this entry »