英语翻译IntroductionActiveX EXEs are a versatile yet relatively uncommon application type unique to Visual Basic 6 development.These are applications that exhibit dual behavior:they can operate either as a standalone executable or as a DLL code l

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 00:49:27
英语翻译IntroductionActiveX EXEs are a versatile yet relatively uncommon application type unique to Visual Basic 6 development.These are applications that exhibit dual behavior:they can operate either as a standalone executable or as a DLL code l

英语翻译IntroductionActiveX EXEs are a versatile yet relatively uncommon application type unique to Visual Basic 6 development.These are applications that exhibit dual behavior:they can operate either as a standalone executable or as a DLL code l
英语翻译
Introduction
ActiveX EXEs are a versatile yet relatively uncommon application type unique to Visual Basic 6 development.These are applications that exhibit dual behavior:they can operate either as a standalone executable or as a DLL code library.ActiveX EXEs create an issue for developers moving their codebase forward to Visual Basic 2005 since ActiveX EXEs can neither be migrated to Visual Basic 2005,nor can they be created by or consumed from a .NET application.
The release of the Visual Basic 2005 Interop Forms Toolkit makes working with ActiveX EXEs easier:the Interop Forms Toolkit provides new capability that allows ActiveX EXEs to be extended with new .NET objects.In addition,Visual Basic 2005 makes the process of working with COM objects easier and more seamless than previous versions of Visual Basic.
This article shows how to add a Visual Basic 2005 form to a Visual Basic 6 ActiveX EXE and interact with the form.It also demonstrates how to invoke classes in a Visual Basic 6 ActiveX EXE from a Visual Basic 2005 application,and discusses options for upgrading code within an ActiveX EXE.
The Visual Basic Interop Forms Toolkit forms the basis of this solution.This toolkit is a free download that enables a Visual Basic 6 form to open a Visual Basic 2005 form,invoke methods,and use a shared property bag to pass state between the forms.
1.3 About ActiveX EXEs
ActiveX EXEs are a feature of Visual Basic 5 and Visual Basic 6 development.They are code library DLLs that can also be run as an executable.ActiveX EXEs differ from traditional DLLs in several ways:
· Run in their own process.Whereas normal DLLs run in the memory process of their parent application,ActiveX EXEs run in their own process.This means they show up as separate applications in Task Manager.It also means ActiveX EXEs are slower than DLLs since Windows has to do extra work to marshal variables when they are passed to and from an ActiveX EXE.
· Class instancing.ActiveX EXEs have two class instancing modes not available to normal DLLs and executables:SingleUse and GlobalSingleUse,both of which ensure that a separate copy of the class is loaded into memory whenever an instance is created.
· Remote execution.It is possible to invoke classes in an ActiveX EXE on a remote computer.In Visual Basic 5 and Visual Basic 6,the only other way to execute code on a remote computer was by creating DLLs hosted in Microsoft Transaction Server.
· Multi-threading.Because ActiveX EXEs run in their own process,they are allocated their own thread.In theory,this enables multi-threading in a Visual Basic 5 or Visual Basic 6 application.In practice,this is problematic since the calling application must wait for the called method in the ActiveX EXE to finish execution before continuing,giving a user-experience that is the same as a single-threaded application.

英语翻译IntroductionActiveX EXEs are a versatile yet relatively uncommon application type unique to Visual Basic 6 development.These are applications that exhibit dual behavior:they can operate either as a standalone executable or as a DLL code l
导言
ActiveX的exes是一个多才多艺,但比较少见,应用型独特,以实践Visual Basic 6的发展.这些都是应用,展出的双重特性:它们可以操作要么作为一个独立的可执行文件或者作为一个DLL的代码库.ActiveX的exes创造一个问题,开发商提出自己的代码着Visual Basic中,2005年以来的ActiveX exes既不能被迁移到Visual Basic的2005年,也不能创造或消耗的,从净申请.
释放Visual Basic中,2005年的Interop形式工具箱,使工作与ActiveX的exes容易:Interop大会形式工具箱提供了新的能力允许的ActiveX exes将延长至新的.NET对象.此外,Visual Basic中,使2005年的过程中与COM对象可以更容易和更流畅比以前版本的Visual Basic的.
这篇文章显示,如何添加Visual Basic中,2005年的形式,以实践Visual Basic 6的ActiveX exe和互动的形式.它还表明,如何援引班在实践Visual Basic 6的ActiveX的EXE从Visual Basic中,2005年申请,并讨论选择升级代码的ActiveX exe文件.
Visual Basic中的Interop形式工具箱形式在此基础上的解决方案.本手册是免费下载,让实践Visual Basic 6的形式打开一个Visual Basic的形式,2005年,引用的方法,并使用共同财产袋通过国家之间的形式.
约1.3的ActiveX exes
ActiveX的exes的一大特色Visual Basic的5和实践Visual Basic 6的发展.他们是代码库的DLL也能办成一个可执行程序.ActiveX的exes不同于传统的DLL在几个方面:
运行在自己的进程.而正常运行的DLL在记忆过程中的其母公司应用,ActiveX的exes来说,在自己的进程.这意味着,他们显示了作为单独的应用程序在任务经理.这也意味着ActiveX的exes是慢的DLL因为Windows必须做额外的工作,以元帅变数时,他们是通过从一个ActiveX exe文件.
一流的实例.ActiveX的exes有两个阶级实例存储模式,并不适用于一般DLL和可执行文件:singleuse和globalsingleuse ,这两项研究确保一个单独的副本每班装载到内存中,每当一个实例是创建.
远程执行.这是有可能援引班,在一个ActiveX的EXE对远程计算机.在Visual Basic中五及Visual Basic 6中,只有其他方式执行代码,对远程计算机是通过创建的DLL主办微软交易服务器.
多线程.因为ActiveX的exes来说,在自己的过程中,他们分配自己的论题.从理论上讲,这使多线程在Visual Basic中五或Visual Basic 6应用程序.在实践中,这是有问题,因为要求申请者必须等待那个所谓的方法在ActiveX的EXE完成执行,然后继续操作,让用户体验是一样的单一线程应用.