?
Solved

In-Proc ActiveX server?

Posted on 1997-05-21
2
Medium Priority
?
317 Views
Last Modified: 2013-12-03
Hi y'all, ActiveX question here.

Say I've got an in-proc ActiveX server that supports ActiveX Automation.

Now say that I want to write automation scripts in various ActiveX-compatible languages that access the in-proc server. (I'm specifically concerned about Lotusscript and Lotus Notes.)

Now, say that these scripts are going to be called and terminated repeatedly, losing all their states each time they are terminated.

What is the most performant way for a script to connect to an ActiveX in-proc server running this way?  If each script starts out with a

server = CreateObject("serverapp.Application") or whatever, will it incur a large performance penalty?  Can you even use an in-proc server this way?

And specifically for Notes, is there any way to keep the handle to my ActiveX in-proc server around between script (agent) invocations?

Answers will result in gratuitous "thank you"s.

Larry Edelstein
Director of Engineering
SpotMedia Communications

0
Comment
Question by:ledelste
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
gtschech earned 300 total points
ID: 1397547
CreateObject() is a high-level interface thats used inside VBA. If you are programming in plain C/C++, your call would be CoCreateInstance().
In any case, the operating system will be invoked to find out where the Class Factorx for the object resindes, which is determined by some Registry entries. After that process, there will be not too much pemalty, because in-process servers behave much like normal 'linked' classes.

You can keep the pointer to the script as long as you wish (but release it before you leave your program), if the scripting language has some form of 'reset' feature, i.e. you can always start a new procedure without having to cope with old variable settings. For I have no special knowledge about Lotus scripting, I can't tell you explicitly, but I believe it should be always possible.
0
 

Author Comment

by:ledelste
ID: 1397548
Don't really understand the second para; in my case, I have an ActiveX server that I want to serially re-use, but it may be that I have no way of maintaining state, so I need to know the quickest way to reconnect to it.  I stated this clearly in my question but it was misunderstood.

The information about CreateObject was useful, however.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question