六安会计继续教育网:Excel2007新知-加载宏的改进
来源:
高顿网校
2014-06-27
高顿网校友情提示,*7六安会计继续教育网上总结信息Excel2007新知-加载宏的改进等内容公布如下:
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.
今天,我们发表两篇客串帖子中的第二篇,来自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里创建的加载宏的安装工程里配置。
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.
今天,我们发表两篇客串帖子中的第二篇,来自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里创建的加载宏的安装工程里配置。
扫一扫微信,学习实务技巧
版权声明:本条内容自发布之日起,有效期为一个月。凡本网站注明“来源高顿教育”或“来源高顿网校”或“来源高顿”的所有作品,均为本网站合法拥有版权的作品,未经本网站授权,任何媒体、网站、个人不得转载、链接、转帖或以其他方式使用。
经本网站合法授权的,应在授权范围内使用,且使用时必须注明“来源高顿教育”或“来源高顿网校”或“来源高顿”,并不得对作品中出现的“高顿”字样进行删减、替换等。违反上述声明者,本网站将依法追究其法律责任。
本网站的部分资料转载自互联网,均尽力标明作者和出处。本网站转载的目的在于传递更多信息,并不意味着赞同其观点或证实其描述,本网站不对其真实性负责。
如您认为本网站刊载作品涉及版权等问题,请与本网站联系(邮箱fawu@gaodun.com,电话:021-31587497),本网站核实确认后会尽快予以处理。
严选名师 全流程服务
其他人还搜了
热门推荐
-
学好会计电算化的4个小技巧 2022-01-04
-
会计新手必备:金蝶财会软件使用技巧 2018-07-06
-
会计实用工具:数字大写转换(数字大写) 2017-01-19
-
最实用的会计工具:数字大写转换 2016-08-18
-
会计人必须掌握的50个常用工具 2016-08-03
-
99%的会计需要用到的30个万能公式! 2016-08-03
-
财会工作必备EXCEL 技巧,一看就知道! 2016-08-03
-
国内会计科目的词汇:成本类科目 2016-06-27
-
不同用途财政资金安排,三种税务方案巧选择 2016-06-21
-
纳税人、增值税专用发票领购簿变更程序 2016-06-17
-
填写现金支票的有哪些具体的步骤与方法 2016-06-16
-
教你学会建账流程 2016-06-15
-
UFO报表的有哪几个状态 2016-06-15
-
用友U8出纳管理步骤 2016-06-15
-
运输方式常用表达 2016-06-07
-
运输方式常用表达 2016-06-07
-
工资、薪金所得税率表 2016-06-02
-
关税复合税率表 2016-06-02
-
企业所得税税率表 2016-06-01
-
契税的税率 2016-06-01
-
企业发票专用章事宜如何办理 2016-06-01
-
辅导期纳税人取得的发票何时抵扣 2016-06-01
-
土地使用费标准 2016-05-31
-
支票填写的注意事项 2016-05-27
-
跨境人民币可以怎么用 2016-05-18
-
50套会计工作者常用公式 2016-05-18
-
人民币大写金额转换工具 2016-04-27
-
股份制企业经常会用到的会计公式 2016-03-02
-
如何从会计报表中发现税收风险 2016-02-14
-
"三证合一"后,企业注销有涉税疑点咋办? 2016-02-14