vb6为什么我想要无人值守执行并保留在内存集中?

发布于 2024-11-02 07:26:26 字数 384 浏览 0 评论 0原文

14 年前,当我还是个新手时,为经典 ASP 设置组件并不在我的薪资范围内...然而现在,我已经回到了未来,我发现自己必须针对经典 ASP 项目进行维护和编码使用 COM 对象。

现在我发现自己正在查看 1999 年至 2001 年的古代文章,我想知道是否有人对为什么 COM (ActiveX .dll) 应该设置无人值守执行和保留在内存中有一个很好的答案?

我还应该注意到,该网站的当前架构是这些刚刚放到服务器上的 .dll(当然是注册的)。我想知道 COM+ 和 MTS 的情况。我们现在坚持使用经典的 ASP(长话短说)。不过,我希望能够尽快迁移到 .NET。因此,如果我可以最大限度地减少当前架构的维护时间,那将会很有帮助。您能否也给我一个我们应该使用 COM+ 和 MTS 的理由?以及添加这些功能会涉及什么。

14 years ago when I was a green horn, setting up the components for classic ASP was not in my pay grade... Now however, I have gone back to the future and I find myself having to maintain and code against a classic ASP project using a COM object.

Now I'm finding myself looking at ancient articles dated from 1999 to 2001 and I'm wondering if anyone has a good answer as to why the COM (ActiveX .dll) should have Unattended Execution and Retained in Memory set?

I should also note, that the current architecture of the site are these .dlls just dropped on the server (registered of course). I'm wondering about COM+ and MTS. We are sticking with classic ASP for now (long story). However, I'm hoping to move to .NET with the quickness. So if I can minimize the maintenance time of this current architecture that would be helpful. Can you please also give me a reason why we should use COM+ and MTS? As well as what would be involved with adding those features.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

肥爪爪 2024-11-09 07:26:26

无人值守执行会阻止您的 VB6 二进制文件显示交互式对话框,即服务器上的一个窗口,您的 Web 客户端将无法看到该窗口或与之交互。

这可能是 Msgbox() 或运行时错误弹出窗口。当标记无人值守执行时,运行时错误将记录到 Windows 事件日志中。

保留在内存中会阻止 IIS(或您的主机)立即释放您的 DLL。根据您的主机设置,DLL 将保留在内存中并重新使用。某些主机(例如IIS)会在一段时间后释放DLL。

另请参阅:您可以在最新版本的 Msvbvm60.dll 中配置“无人值守执行”选项和“保留在内存中”选项< /a>

您必须开启无人值守
执行选项和保留在
编译前的内存选项
托管 Microsoft Visual Basic
Windows 6.0 企业版
组件(Microsoft ActiveX DLL)
多线程环境,例如
微软交易服务器
(Mtx.exe),互联网信息
服务 (Inetinfo.exe)、COM+
(Dllhost.exe) 和 Microsoft SQL
服务器 7.0 或 SQL Server 2000
(Sqlservr.exe)。然而,你可能不
知道一个组件是否会
在这样的环境中使用或者你
可能忘记打开无人值守
执行选项和保留在
内存选项。为了解决这个问题
问题,最新版本的
Visual Basic 运行时 (Msvbvm60.dll)
引入了一项新功能,允许
你打开无人值守
执行选项和保留在
运行时的内存选项。

并且:Visual Basic 6.0 ActiveX 组件的线程问题

  • MSVBVM60.DLL 内部存在访问冲突。
  • 客户端进入死锁状态。如果视觉效果良好,您可能会看到这两种症状
    基本 ActiveX DLL 托管在
    多线程环境,对于
    例如,IIS、MTS 或多线程
    客户端和内存保留
    选项未启用。

当然,还有: Visual Basic 参考常规选项卡 (项目属性对话框)

无人值守执行 表示项目打算运行
无需用户交互。无人值守
项目没有界面元素。
任何运行时函数,例如
通常会导致用户收到的消息
交互被写入事件
日志。

保留在内存中 将项目保留在内存中。然而,有一个
绩效成本:保留的项目
直到内存中的内容才被卸载
进程终止。

Unattended Execution prevents your VB6 binary from showing an interactive Dialog, i.e. a window on the server that your webclient would be unable to see or interact with.

This could be a Msgbox() or a runtime error popup. When Unattended Execution is flagged, runtime errors are logged to the Windows Event Log.

Retained in memory prevents IIS (or your host) from immediately releasing your DLL. Depending on your host setup, the DLL will be retained in memory and reused. Some hosts (such as IIS) will release the DLL after some time.

See also: You can configure the Unattended Execution option and the Retained In Memory option in the latest version of Msvbvm60.dll

You must turn on the Unattended
Execution option and the Retained In
Memory option before compilation to
host a Microsoft Visual Basic
Enterprise Edition for Windows 6.0
component (Microsoft ActiveX DLL) in a
multi-threaded environment, such as
Microsoft Transaction Server
(Mtx.exe), Internet Information
Services (Inetinfo.exe), COM+
(Dllhost.exe), and Microsoft SQL
Server 7.0 or SQL Server 2000
(Sqlservr.exe). However, you may not
know whether a component is going to
be used in such an environment or you
may forget to turn on the Unattended
Execution option and the Retained In
Memory option. To address this
problem, the latest version of the
Visual Basic runtime (Msvbvm60.dll)
introduces a new feature that permits
you to turn on the Unattended
Execution option and the Retained In
Memory option at run time.

And: Threading issues with Visual Basic 6.0 ActiveX components

  • Access Violation inside MSVBVM60.DLL.
  • Client enters a deadlock state. You may see these two symptoms if a Visual
    Basic ActiveX DLL is hosted in a
    multi-threaded environment, for
    example, IIS, MTS, or a multi-threaded
    client, and the Retain In Memory
    option is not enabled.

And, of course: Visual Basic Reference General Tab (Project Properties Dialog Box)

Unattended Execution Indicates that the project is intended to run
without user interaction. Unattended
projects have no interface elements.
Any run-time functions such as
messages that normally result in user
interaction are written to an event
log.

Retained in Memory Retains a project in memory. However, there is a
performance cost: A project retained
in memory is not unloaded until the
process terminates.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文