CodeFx: 微软一站式开发技术框架解决方案 2009-7-8 新增sample code简介

微软一站式开发技术框架解决方案 2009年7月8号更新:

http://cfx.codeplex.com/Wiki/View.aspx?title=All-In-One%20Code%20Framework%20Examples

下载地址:

http://cfx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29921

如果您是第一次听说All-In-One Code Framework这个项目,请参阅主页上的相关介绍http://cfx.codeplex.com/,以及这两篇blog

CodeFx:一站式微软开发技术框架解决方案

微软一站式开发技术框架解决方案 中文说明

让我们一起来看看这次更新中新增了哪些sample code。

CppSparseFile, CSSparseFile, VBSparseFile
这三个example演示了如何使用不同编程语言(C++, C#, VB.NET)操作NTFS 稀疏文件(sparse file)。所谓稀疏文件指的是文件中出现大量的0数据。这些数据对我们用处不大,但却占用了我们好几GB甚至TB的空间。NTFS文件系统对此进行了优化,那些无用的0字节可以被标志为稀疏区域,使得这些0字节几乎不占用任何空间。所以你会发现,一个稀疏文件可能表面上有100GB,实际占用的磁盘空间却只有几KB。CppSparseFile, CSSparseFile, VBSparseFile 包含了稀疏文件的所有常见操作,如创建,查询稀疏区域,获得稀疏文件实际大小,检查一个文件是否是稀疏文件等等。

CppFileHandle
这是一个和文件句柄相关的例子。我们在MSDN论坛作技术支持过程中,经常遇到客户询问如何用编程方法枚举某一个进程打开的所有文件,或者给定一个文件,如何知道哪些进程正打开着它。虽然Process Explorer可以很轻松地回答上述两个问题,仍有不少客户追问如何自行编程实现这样的功能。这就需要用到WMI class Win23_Process,或者用到undocumented API,NtQuerySystemInformation。CppFileHandle演示的就是后者。WMI的解决方案我们会在近期加入到CppFileHandle中。

CSListFilesInDirectory
这个sample code同样源于一个在论坛里经常被问到的问题:.NET BCL中的Directory.GetFiles 方法可以枚举某个文件夹下的文件,但它有个很致命的缺点。Directory.GetFiles是等枚举到所有文件以后才会返回。如果该文件夹下的文件很多,或者这是一个网络文件夹,即访问速度比较慢,Directory.GetFiles就会hang在那里。你可能就需要同步地等待它的返回。一个理想的解决方案是,每枚举到一个文件,就立刻返回这个文件,而不是等待枚举到所有文件。CSListFilesInDirectory就演示了如何做到这一点。

CSImpersonateUser, VBImpersonateUser
这两个是在.NET中做impersonation的例子。其中封装了一个简单安全的impersonation的类,让你轻松模拟某个用户帐号进行操作。

VBUac
这是Vista UAC相关的一个VB.NET的例子。和CSUac、CppUac例子对应,演示了如何判断当前进程的Integrity level,以及如何通过ShellExecute(Ex)或者manifest文件来elevate一个进程。

CSSMTPSendEmail, VBSMTPSendEmail
顾名思义,CSSMTPSendEmail 和 VBSMTPSendEmail 演示了如何使用SMTP发送电子邮件。示例中还演示了两个经常问到的场景:添加附件和在邮件中嵌入图片。

ATLCOMClient
这是一个ATL编写的COM客户端。其中重点演示了如何在ATL中处理COM的event。

 

最后,如果您对新版的CodeFx有任何建议和反馈,请在此提出。谢谢!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Resolution A.1023(26) Adopted on 2 December 2009 (Agenda item 10) CODE FOR THE CONSTRUCTION AND EQUIPMENT OF MOBILE OFFSHORE DRILLING UNITS, 2009 (2009 MODU CODE) THE ASSEMBLY, RECALLING Article 15(j) of the Convention on the International Maritime Organization concerning the functions of the Assembly in relation to regulations and guidelines concerning maritime safety, NOTING that mobile offshore drilling units continue to be moved and operated internationally, RECOGNIZING that the design criteria for such units are often quite different from those of conventional ships and that, by virtue of this, international conventions (such as the International Convention for the Safety of Life at Sea, 1974, as amended, and the International Convention on Load Lines, 1966, as amended) cannot apply in respect of mobile offshore drilling units, RECALLING FURTHER that, when the Code for the Construction and Equipment of Mobile Offshore Drilling Units (MODU Code) was adopted in 1979 by resolution A.414(XI), it was recognized that the design technology of mobile offshore drilling units was rapidly evolving and that new features of mobile offshore drilling units were being introduced to improve technical and safety standards, RECALLING ALSO the adoption of the Code for the Construction and Equipment of Mobile Offshore Drilling Units (MODU Code), 1989, which superseded the 1979 MODU Code, by resolution A.649(16), following a number of tragic MODU casualties which emphasized the need for a review of the international safety standards developed by the Organization, NOTING that, since the adoption of the 1989 MODU Code, ICAO has adopted amendments to the Convention on International Civil Aviation, which impact on the 1989 Code provisions for helicopter facilities; and that the Organization has, since, adopted a number of amendments to SOLAS regulations, which are referenced in the 1989 MODU Code,

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值