摘要:
在pc领域,intel和windows依然强势。但是,在移动设备领域,主要是手机和刚刚兴起的平板电脑,intel发力不足,让ARM占尽了先机,几乎处于垄断地位;intel没饭吃,windows自然也不好过。鉴于ARM在移动领域的强势,ms也不得不在windows8中标榜支持ARM处理器了。1. ARM不单卖处理器,还卖license。大名鼎鼎的apple A4就是licensee。ARM processors are developed by ARM and by ARM licensees. Prominent ARM processor families developed by ARM 阅读全文
摘要:
在某些情况下我们需要进行远程调试(比如该程序运行需要时候全屏,或者程序在客户的机器上crash崩溃), 这时候可以使用WinDBG的远程调试功能。 WinDBG的远程调试由服务端和客户端组成,和visual studio类似。 被调试的机器是服务端(server), 我们做调试的机器是客户端(client)。 两台机器都需要安装WinDBG。 第一步, 建立WinDBG server 端。 使用 -server 参数可以使WinDBG 以服务器方式启动。 WinDBG可以用多种连接协议让客户端连接,比如命名管道(named pipe), 安全管道(secure pipe), TCP 协 阅读全文
摘要:
Function object, also called functor, functional, or functionoid,is a computer programming construct allowing an object to be invoked or called as though it were an ordinary function, usually with the same syntax.Several notes for it:1. In C, there is only function pointer; in C#, there is only dele 阅读全文
摘要:
线程间、进程间的同步是通过称为“信号量”signal的一类对象来实现的。下面是一个来自msdn的natice code world的列表:Name Relative speed Cross process Resource counting Supported platforms Critical Section Fast No No (exclusive access) 9x/NT/CE Mutex Slow Yes No (exclusive access) 9x/NT/CE Semaphore Slow Yes Automatic 9x/NT Event Slow Yes Yes 9x/ 阅读全文
摘要:
As known,dotnet assembly可以JIT或者用NGEN直接生成汇编级assembly来一劳永逸。对于进一步加深理解,需要记住:1. 对于JIT来说:一,它是方法级的compile;二是,只有一个assembly的所有代码都被调用过了,这个assembly才被彻底编译了一遍;第三,JIT对一个assembly的一个调用方法,在app未重新启动的情况下只做一次(点了两点:JIT的编译结果是一个存放在内存里的映射表方法名,实际函数地址;因此,app每启动一次,都要重新建)2. 对于NGEN来说,他的结果是放到GAC里的(?)。 参考:.net你怎么这么慢 阅读全文
摘要:
System.Text.EncodingSystem.Text.ASCIIEncodingSystem.Text.UnicodeEncodingSystem.Text.UTF32EncodingSystem.Text.UTF7EncodingSystem.Text.UTF8Encoding参见:Character Encoding in the .NET Framework 阅读全文
摘要:
GAC解决的问题是dotnet assembly如何共享assembly的问题,比如dotnet framework,肯定要部署到GAC中。注:dotnet assembly locate rule是先找GAC,再找当前app所在的目录树(CLR will firstly search in GAC for assembly loading and then get into app specific directory / path tree)。所以,对于公用的assembly,只有一条路:就是放在GAC中。sidebyside assembly解决的是dotnet assembly 版本冲 阅读全文
摘要:
项目中碰到这样一个需求:本来,一个app的plugin (pluginA.dll + pluginARes.dll)是自然的deploy到app dir里面的;但是呢,现在要把这个plugin在这个app以及基于这个app开发的一些衍生产品上共享,就必须要把它放在一个common的目录里。但是呢,这个plugin有点特殊:pluginA.dll是mixedmode C++/CLI的module,然后呢,pluginARes.dll是用C#写的纯资源的dll;由于CLR locate assembly的机制,它一般只会在app目录树和GAC里寻找,那么如果,像这里的情况一样,把pluginA + 阅读全文
摘要:
总结:1. 对于native c++ world来说,Dynamic-Link Library Search Order 说的很清楚了。就是还有一个疑问:如果在任意目录建立一新folder,把一个application需要的plugin之类的dll及dependency dlls都放在里面,在load这个plugin需要的dependency dlls时 (If a DLL with dependencies is loaded by specifying a full path, the system searches for the DLL's dependent DLLs as if t 阅读全文
摘要:
一般情况下,需要透明背景图片时,会首先想到icon文件。但是,有些场合下,必须用其他格式比如bmp。透明背景的bmp叫做loose image,做法很简单:1. 如果是从icon文件转换为bmp,可以用photoshop + icon plugin的组合。注:ps不能直接打开icon文件。2. 打开icon文件或新建一文件,只包含你想要透明显示的东西。3. 创建一新层,作为背景层,用油漆桶把(192,192,192)的rgb设在那一层上。4. 保存为bmp。搞定。 阅读全文