Solved

How to create a persistable activex dll?

Posted on 2002-06-24
5
407 Views
Last Modified: 2007-12-19
I need to implement a database in memory on the server using VB dll, and acces it on the clients through COM+.

I've created a simple ActiveX dll, added a module with a public variable, and added a class with a get and set public functions.

Then I registered the dll into the components, application settings: server appl. and leave running when idle. If I use multiple instances of the components on the clients, they use own variables, and not share the same one.

I've coded the same in C++/Atl with a global variable, and worked.

How to make a gocal variable in VB dll (I mean the var is global for the class instances)???

0
Comment
Question by:cosie
[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
5 Comments
 

Expert Comment

by:mudasir_ahmed
ID: 7104193
Hi Cosie,
 Set the class properties to 5-Multiple Instancing.

-Mudasir.
0
 

Author Comment

by:cosie
ID: 7106699
I've tried it, but didn't work.
0
 
LVL 10

Accepted Solution

by:
GoodJun earned 500 total points
ID: 7109032
Cosie,
the public variables defined in standart modules aren't really global variables. These public variables are scoped at the STA level rather than at the process level. so only read-only public variables should be in the standard module.

The COM+ Services Type Library has a component Shared Property Manager (SPM). It has the locking scheme to synchronize access to public data. I believe SPM is the solution (I havn't done one yet)
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7962938
Hi cosie,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept GoodJun's comment(s) as an answer.

cosie, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 8023333
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 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