Solved

In-Proc ActiveX server?

Posted on 1997-05-21
2
313 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
2 Comments
 
LVL 1

Accepted Solution

by:
gtschech earned 150 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 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