Solved

How to create a persistable activex dll?

Posted on 2002-06-24
5
406 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
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

808 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