vb6 why do I want unattended execution and retained in memory set?
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 futur开发者_JAVA百科e 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.
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.
精彩评论