Solved

Error when creating a second instance of a COM control

Posted on 2004-09-21
7
279 Views
Last Modified: 2013-11-26
Hi Experts,

I am developing a small COM control using Visual Basic 6.0. Everything works fine with the control until I try to make two simultaneously running instances of it. The first instance is created without any problems, however the second does give the following error:

Not enough storage is aviable to complete this operation

I have enough RAM and hard drive space available. I tried the same control with ASP and with a small Delphi application and I get the same error.

I suppose my control is somehow configured to run only a single instance, but I don't know how to control this. Can someone help?

Thanks!
TheAvenger
0
Comment
Question by:TheAvenger
7 Comments
 
LVL 10

Accepted Solution

by:
fds_fatboy earned 250 total points
ID: 12110719
As a first guess:

Do you have any
        global variables?
        module level or static variables held in standard (not class) modules?
If so, be aware that all these variables will be shared between ALL instances of your control running. This can give unexpected results. If you have, you are almost certainly better off replacing them with other options - ask me if you need to know.

Otherwise - please post some code to let us see what is happening.
0
 
LVL 5

Expert Comment

by:KarcOrigin
ID: 12110740
What is your OS and which service pack you have installed?


0
 
LVL 20

Author Comment

by:TheAvenger
ID: 12110793
The OS is Windows XP, SP 1 and SP2 (two machines).

I have some global variables. I will try to move them in a class and come back with a post after it.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 26

Expert Comment

by:EDDYKT
ID: 12111130
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 12111357
@EDDYKT: Unfortunately not
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 12111540
What do you do inside your COM object? Database accessing?


Is your COM object ocx or dll?
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 12112824
It was a problem with the log I was using - it was using a file and probably locked it. I now use the Event Log of NT and it works just fine.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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 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…

747 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

11 Experts available now in Live!

Get 1:1 Help Now