Solved

In-Proc ActiveX server?

Posted on 1997-05-21
2
311 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now