[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to create a persistable activex dll?

Posted on 2002-06-24
5
Medium Priority
?
412 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

872 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