ad

加载宏的改进-英雄云拓展知识分享

匿名投稿 250 2024-01-30

Managed Add-In Improvements
加载宏的改进
(译者:原文中有多处出现Managed,笔者认为直译出来反而会很绕口,疏忽它也不会作用理解。)

Today we have the second of two guest posts from Patrick Smith, a program manager on the Office Programmability team.
今天,我们发表两篇客串帖子中的第2篇,来自Patrick Smith,Office 程序开发小组的程序经理。

Overview and Background
概述和背景

Managed code is becoming more and more prevalent in add-ins written for Microsoft Office products. Also shipping around the same time frame as the 2007 Microsoft Office System is the next version of Visual Studio Tools for Office (VSTO). The next version of VSTO has added support for creating application level add-ins. The demand for better support of managed add-ins is clear since with Office 2003, there are a few challenges when running managed code. Among these challenges are security, resiliency, administration, and isolation. Most of these challenges are the result of add-ins based on mscoree.dll which is the loader used by the default VS.NET add-in template.
代码在为Office成品编写的加载宏里变得愈来愈流行了。Visual Studio Tools for Office (VSTO)下个版本和Office 2007大概在同一时间段上市。VSTO的下个版本增加了对在利用软件级创建加载宏的支持。自从Office 2003开始,代码的更好支持的需求就已清楚了,但是,运行代码时会有一些挑战。在这些挑战中有安全,恢复,管理和隔离。这些挑战中的大多数都是由于加载宏基于mscoree.dll而致使,mscoree.dll是缺省的VS.Net加载宏模板使用的加载器。

While there are workarounds to these barriers such as creating a separate unmanaged “shim” to use in place of mscoree.dll, we wanted to make this process better for the products in the 2007 Microsoft Office System. We’ve done exactly that!
有些工作区域是针对这些障碍的,例如创建一个单独的“shim”来代替mscoree.dll,我们想要让Office 2007系统中的这个进程变得更好一些。我们正是那样做的!

The Improvements
As a developer, you can now design your add-in to use a new AddinLoader supplied in a new version of VSTO. This new AddinLoader helps overcome these historical challenges when running managed code in Office:
改进
作为一位开发者,你现在可使用VSTO新版本提供的AddinLoader来设计你的加载宏了。在Office里运行代码时,新的AddinLoader帮助克服那些历史挑战。

加载宏的改进-英雄云拓展知识分享

• The security model – Microsoft Office System 2003 products bases all add-in security decisions based on mscoree.dll which cannot be signed. Because of this security model, the add-in itself can be signed but the Office product would not know it because it is only looking at mscoree.dll. and since it’s only looking at mscoree.dll, no add-in can run when the Office application is set to High security. Now, if an add-in is based on the AddinLoader, the 2007 Microsoft Office System will be able to defer to the .NET security model to make the security decisions for the add-in. This is only possible by using AddinLoader.
• 安全模式——Office系统2003产品架构里的所有加载宏的安全决定都是基于mscoree.dll,它是不可签名的。正由于该安全模式,加载宏本身不可签名,而Office产品也不会知道,由于它只看mscoree.dll,并且,由于只看mscoree.dll,所以当Office利用软件设置安全性为高时,没有加载宏可以运行。现在,如果加载宏是基于AddinLoader的话,那末Office 2007系统就可以够区分.NET安全模式,为加载宏决定安全性。只有使用AddinLoader,这才是可能的。

• The resiliency model – Microsoft Office System 2003 products will automatically disable add-ins that fail to load so that future problems with the add-in can be prevented, however, since the add-in is actually seen as mscoree.dll, mscoree.dll is the add-in that is disabled rather than the actual managed COM add-in that is causing a problem. This prevents any other mscoree.dll based add-ins from loading as well because the loader itself is disabled. Now the add-in is seen rather than the loader and ill-behaving add-ins can be disabled individually rather than the loader.
• 恢复模式——Office 2003系统的产品会自动禁用加载失败的加载宏,因此,这种情况下,就能够避免该加载宏以后的问题,但是,由于该加载宏实际上是被看做mscoree.dll的,mscoree.dll是被禁用的加载宏,而不是实际上致使该问题的COM加载宏。这就会避免任何基于mscoree.dll的加载宏加载,由于加载器本身被禁用了。现在,看的是加载宏而不是加载器,具体有毛病行动的加载宏被禁用,而不是加载器被禁用。

• Administration – When viewing the Add-Ins dialog box, mscoree.dll is seen as the add-in name rather than the actual managed COM add-in that is running within mscoree.dll. Once you are running more than one add-in, it becomes difficult to discern which one is which. Now the name of the actual add-in is displayed.
• 管理——当查看加载宏对话框时,mscoree.dll就会被看做是加载宏名称,而不是实际在mscoree.dll里运行的COM加载宏。一旦你在运行多个加载宏,就很难辨别哪一个是哪一个了。现在,显示的是实际的加载宏的名称了。

• Runtime Isolation – mscoree.dll loads all add-ins into the default AppDomain. Therefore, with no memory isolation, add-ins can step on each other and affect objects that are shared between add-ins. The new AddinLoader will use separate AppDomains for the add-in and therefore provide isolation to that add-in.
• 运行时间隔离——mscoree.dll将所有加载宏加载到默许的AppDomain。因此,这种情况下,没有内存隔离,加载宏可以相互步入,作用加载宏之间同享的对象。新的AddinLoader将给每一个加载宏使用独立的AppDomains,因此,这种情况下,实现了对该加载宏的隔离。

What’s needed
In order to take advantage of these new improvements, you will need to create your add-in using the new version of VSTO. (There is a technology preview of this version located here.
需要甚么
为了利用这些新的改进,你将需要使用VSTO新版本(这里有篇对该版本的技术概述)来创建你的加载宏。

In addition, you’ll need to ensure the following configuration is available on the machine where the add-in is to be loaded:
• Common Language Runtime 2.0 or greater
• VSTO Runtime (from the new version of VSTO)
• CAS policy giving the Add-in full trust
另外,你需要确保在加载宏加载的机器上有下述配置可用:
• Common Language Runtime 2.0或以上版本
• VSTO Runtime(来自VSTO的新版本)
• CAS政策给加载宏充分信任

All of these prerequisites can be configured through the setup project for the add-in you create in VSTO.
所有这些条件条件都可以从你在VSTO里创建的加载宏的安装工程里配置。

Published Wednesday, June 21, 2006 8:06 AM by David Gainer
Filed Under: Programmability


选择英雄云云表单=选择更智能的Excel

在现代企业管理中,数据的高效管理和处理至关重要。随着信息技术的不断发展,英雄云云表单已经成为了提高数据录入、管理和分析效率的不可或缺的工具。让我们来深入探讨英雄云-云表单的几大优势。

基础字段:多样性满足业务需求

英雄云云表单中包括了各种基础字段,如单行文本多行文本数字输入框单选框复选框下拉框下拉复选框日期时间分割线等。这些字段的多样性使用户可以根据具体的业务需求,轻松进行文本、数据和时间信息的录入或修改。例如,您可以使用单行文本字段录入员工姓名、产品型号等,或者使用下拉框进行多选,根据不同情况选择更加方便的字段类型。

高级字段:提升工作效率

英雄云云表单还提供了高级字段,如地址图片附件手写签名手机子表关联数据关联查询以及流水号。这些高级字段在基础字段的基础上升级,可帮助用户完成一些琐碎的工作。例如,使用地址字段可以避免逐字打字,而流水号字段可以自动生成规律性的编号,非常适用于合同编号生成等场景。

部门成员字段:精确管理与通讯录的关联

英雄云的部门成员字段允许企业对各个部门的成员进行精确管理。用户可以通过部门成员字段获取通讯录中的部门成员信息,应用于记录报销人、报销部门等场景。这些成员字段还细分为成员单选成员多选,可根据具体需求在通讯录中选择一个或多个成员。

聚合表:数据处理更智能

英雄云聚合表功能用于对已存在的表单数据进行聚合计算,从而得到一张聚合表,后续其他表单可调用聚合表进行数据联动、关联查询和关联数据等操作完成数据处理。这一功能可应用于多种场景,如进销存管理、财务管理和门店零售管理等,帮助企业完成数据处理,提高工作效率。

表单权限设置:灵活管理数据访问

英雄云的表单权限设置允许用户根据企业的具体需求管理表单的访问和操作权限。用户可以根据系统权限或自定义权限对不同成员或团队进行权限设置,以确保数据的安全和合规性。这一功能使企业能够根据变化的业务需求和团队结构,实时调整权限设置。

自定义打印模板:文档输出更便捷

英雄云云表单支持自定义打印模板,可将表单数据转换为可打印的Word文档。用户可以根据自己的需求进行排版和编辑,将产品规格说明书等文档轻松生成。这一功能提供了一种标准化的文档输出方式,简化了信息整理的过程。

综合来看,选择英雄云云表单意味着选择更智能、更灵活、更高效的数据管理工具。无论是提高工作效率,精确管理数据,还是实现数据处理,英雄云云表单都能满足您的多样化需求,助力您的业务发展。

如果您正在寻找一款强大的云表单工具,不妨考虑英雄云,它将为您带来更多的便捷和智能,助您事半功倍。


免责声明:

本网址(www.yingxiongyun.com)发布的材料主要源于独立创作和网友匿名投稿。此处提供的所有信息仅供参考之用。我们致力于提供准确且可信的信息,但不对材料的完整性或真实性作出任何保证。用户应自行验证相关信息的正确性,并对其决策承担全部责任。对于由于信息的错误、不准确或遗漏所造成的任何损失,本网址不承担任何法律责任。本网站所展示的所有内容,如文字、图像、标志、音频、视频、软件和程序等的版权均属于原创作者。如果任何组织或个人认为网站内容可能侵犯其知识产权,或包含不准确之处,请即刻联系我们进行相应处理。

上一篇:一组简单实用的函数公式套路-英雄云拓展知识分享
下一篇:用VBA按列信息拆分数据到多张工作表-英雄云拓展知识分享
相关文章

 发表评论

暂时没有评论,来抢沙发吧~

×