Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to create a persistable activex dll?

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

609 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